From patchwork Mon Mar 5 14:34:05 2018 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Anders Roxell X-Patchwork-Id: 10259073 Return-Path: Received: from mail.wl.linuxfoundation.org (pdx-wl-mail.web.codeaurora.org [172.30.200.125]) by pdx-korg-patchwork.web.codeaurora.org (Postfix) with ESMTP id DFAF360211 for ; Mon, 5 Mar 2018 14:35:23 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id CE2FF28A48 for ; Mon, 5 Mar 2018 14:35:23 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id C247028A72; Mon, 5 Mar 2018 14:35:23 +0000 (UTC) X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on pdx-wl-mail.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-1.9 required=2.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID autolearn=ham version=3.3.1 Received: from bombadil.infradead.org (bombadil.infradead.org [198.137.202.133]) (using TLSv1.2 with cipher AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.wl.linuxfoundation.org (Postfix) with ESMTPS id 4467D28A48 for ; Mon, 5 Mar 2018 14:35:23 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=bombadil.20170209; h=Sender: Content-Transfer-Encoding:Content-Type:MIME-Version:Cc:List-Subscribe: List-Help:List-Post:List-Archive:List-Unsubscribe:List-Id:Message-Id:Date: Subject:To:From:Reply-To:Content-ID:Content-Description:Resent-Date: Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID:In-Reply-To: References:List-Owner; bh=IwqtzpM2Zg8kUsyYkv/gm/h04C77V4tvk/kAxrYs2KE=; b=rru K20FRM52jhkKmqUDK6R3WmM4eRxQibHFGtbYF7FZyStDka3seEycEXtJigRfrY6nROsqPg4vL8Ghc KQQ+p+zmrC3B37//N+LwOfNNKHqXkrV0PALRhUksmCq1Vliyu56EfzJXdY10kKXffBqpKX/AJzEbr J2vwrQIGXdaqFEiMnkFmbUh8MtxI8T28NsRVs1cHK4VkCRW+TLTuTpf+m8cgvV3cQU2SfFev3OqA3 CIUQN3Xr13rRjxROe+goi4bQEEidb0F1jwMZWht73UxaDwCTzTL5pVIdGXcMkuJkhqrTvoLqkMrYO bI6/PGFPxTyKTPWcDhxcgwzTeGpe+Zw==; Received: from localhost ([127.0.0.1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.89 #1 (Red Hat Linux)) id 1esrCv-0005Xx-CT; Mon, 05 Mar 2018 14:35:17 +0000 Received: from mail-lf0-x241.google.com ([2a00:1450:4010:c07::241]) by bombadil.infradead.org with esmtps (Exim 4.89 #1 (Red Hat Linux)) id 1esrC1-0004WL-W5 for linux-arm-kernel@lists.infradead.org; Mon, 05 Mar 2018 14:35:14 +0000 Received: by mail-lf0-x241.google.com with SMTP id r80so23372442lfe.13 for ; Mon, 05 Mar 2018 06:34:11 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; h=from:to:cc:subject:date:message-id; bh=ibVxEtEi/1dQMT63fH6Y9ACr9i1d+bTa01LbcvZhYSI=; b=BtCVtXqbF2MbMmTXAZfNGzscnr8DXnWsMbbHrpEgp5uixevq2rQVs43G/z9IRM0fP9 ADKPwOygsQp+1+lzuiFzbjUOqa7zFguJnoKY4/lvCpbn71mPv97ZJJ+pCylTEIj2eowK p3fnzXVRpc2kcyhNNpwKTdw6dtehsiVAL0GqM= X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:date:message-id; bh=ibVxEtEi/1dQMT63fH6Y9ACr9i1d+bTa01LbcvZhYSI=; b=nanjRwC4e8360MSm8PU1INvpiqmq+cKABHNAMiS3IJ8f0r+xF1wqDoYzyMPrvJm3Sz cQcaBJ8LoPE7IlSBhC9MeJO/rmSE3d7vRwFxjWVe/dZrujh7TOjP0iLJJKfxCVRfKX+1 dPC88ajLC8bww6nmSbh1oj3hg4NeXK0aNRsnuKw4x2PVBs1FWae3QHzdelvGSvi48BKQ C3EUNXrqruu2tOik8qQHg8ggmqlFXiCjScbvxqeMyHQPOE3D7HpKp90qZmjJ5uN2uTS9 rHNt6RdKjzfG6G6XtCUryuz+nDKdIOpkeWWsD26X8dNOvlNDNsWh6Vox6WlM0n6o+qMY K0OA== X-Gm-Message-State: APf1xPCLSt0FBj6YvWLG7UQw57XyKNgITFJBqhAYz5DlyA6hQGxApTgy 2TtwTc561boXF3WMzfG3QcsPwfjbOX0= X-Google-Smtp-Source: AG47ELu7pMyjFLI0ZyLskSSPlF2UL8GCpN2OioCrkbgwBXQDXg3dFS+labAejARzLToeqF2MAGX8nA== X-Received: by 10.46.129.216 with SMTP id s24mr10493018ljg.2.1520260449348; Mon, 05 Mar 2018 06:34:09 -0800 (PST) Received: from localhost (c-2c3d70d5.07-21-73746f28.cust.bredbandsbolaget.se. [213.112.61.44]) by smtp.gmail.com with ESMTPSA id v29sm2713893ljv.11.2018.03.05.06.34.08 (version=TLS1_2 cipher=ECDHE-RSA-CHACHA20-POLY1305 bits=256/256); Mon, 05 Mar 2018 06:34:08 -0800 (PST) From: Anders Roxell To: linux-arm-kernel@lists.infradead.org, linux-kernel@vger.kernel.org Subject: [PATCH v3] arch/arm/Kconfig: default ARM_MODULE_PLTS to 'y' Date: Mon, 5 Mar 2018 15:34:05 +0100 Message-Id: <20180305143405.12187-1-anders.roxell@linaro.org> X-Mailer: git-send-email 2.11.0 X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20180305_063422_652275_6A505DD1 X-CRM114-Status: GOOD ( 12.82 ) X-BeenThere: linux-arm-kernel@lists.infradead.org X-Mailman-Version: 2.1.21 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: Anders Roxell , linux@armlinux.org.uk, arnd@arndb.de MIME-Version: 1.0 Sender: "linux-arm-kernel" Errors-To: linux-arm-kernel-bounces+patchwork-linux-arm=patchwork.kernel.org@lists.infradead.org X-Virus-Scanned: ClamAV using ClamSMTP While testing multi_v7_defconfig with config fragments that makes the kernel size to grow. The kernel fails to load simple modules, as reported by kselftest: [ 34.107620] test_printf: section 4 reloc 2 sym 'memset': relocation 28 out of range (0xbf046044 -> 0xc109f720) selftests: printf.sh [FAIL] The problem that is seen when enabling too much in the kernel without enabling ARM_MODULE_PLTS, is that the top of the kernel gets out of reach from the bottom of the module area. Suggested-by: Arnd Bergmann Signed-off-by: Anders Roxell Acked-by: Ard Biesheuvel --- arch/arm/Kconfig | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/arch/arm/Kconfig b/arch/arm/Kconfig index 7e3d53575486..6831f2d4ee75 100644 --- a/arch/arm/Kconfig +++ b/arch/arm/Kconfig @@ -1701,6 +1701,7 @@ config ARCH_WANT_GENERAL_HUGETLB config ARM_MODULE_PLTS bool "Use PLTs to allow module memory to spill over into vmalloc area" depends on MODULES + default y help Allocate PLTs when loading modules so that jumps and calls whose targets are too far away for their relative offsets to be encoded @@ -1711,7 +1712,8 @@ config ARM_MODULE_PLTS rounding up to page size, the actual memory footprint is usually the same. - Say y if you are getting out of memory errors while loading modules + Disabling this is usually safe for small single-platform + configurations. If unsure, say y. source "mm/Kconfig"