Received: by 10.223.185.116 with SMTP id b49csp2649724wrg; Mon, 5 Mar 2018 06:36:09 -0800 (PST) X-Google-Smtp-Source: AG47ELu7dtvCrkBFuXv7J/8PzMm1KftMCfRLRAx4j9SqdU1+ZiKd35/vye0SGO0eN4QR7MydvhPV X-Received: by 10.101.86.138 with SMTP id v10mr12391077pgs.353.1520260569722; Mon, 05 Mar 2018 06:36:09 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1520260569; cv=none; d=google.com; s=arc-20160816; b=L81kThPOw3uzn+WMuS0B9KG8+NXIlQT3K6BrCicG6eyqhZYRuwJkYgMpGrW5RM5XMS gvpi6dDGqt+r2Du1pAIGkHSU+lANZTaq82cVEIVAoSqkqHaxxBCpmYTIqR78usqklUYz KIib10Mx5qbwo6gNKySegQ/pzx4cO/bwRTzVUlxCnD5HTV+5yG8BWqCMidfSrknEC5ye nhBtNsU99gu0tjYNs8OQc9mXQSNhREYmpQMQ+Aas3KiLk5ltEDJwdUCMFO6fEGlRgA+8 El9fMXdpHlWdZ/PmdPK8PH5yOdPhXUpzi/Xeb1SCgAoeR84LKpsmAKru6IV8YuY+K44a qeJg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:message-id:date:subject:cc:to:from :dkim-signature:arc-authentication-results; bh=ibVxEtEi/1dQMT63fH6Y9ACr9i1d+bTa01LbcvZhYSI=; b=O28LQJ5KgL+uZjZCc8zymdIbW7CTFv2aGMRoGhXYfC7Wo3IcZjyZ60ryxmwPeWsvrk QnCxiaUffmCADUG69PVVN+BvJq+kq9CC2bCUSOMs+JXN8MYHB6yEXlaH0kffCq+kYX8j TKPPEFhpBHpnUJ3bqP5GwuzfioY7/bDmCSJFTOtZ1qg4bksbAnNYfuOuIWESmIjKlZwz tezP+LHtamQUhX1rkDitVBlxl7OpRODIH8ziDBHTS3TRFkr+lJHX0mQJyKf3iuvd3uXr FpbM4F/Zy0OtGfKWx+IMQZdTK1aexcV4sAB2Dwdbkj3vh7YzK8xLrCn1COVhs13l3E1j B9tw== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=BtCVtXqb; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linaro.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id d15-v6si9677129pln.186.2018.03.05.06.35.55; Mon, 05 Mar 2018 06:36:09 -0800 (PST) Received-SPF: pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=BtCVtXqb; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linaro.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1752522AbeCEOeQ (ORCPT + 99 others); Mon, 5 Mar 2018 09:34:16 -0500 Received: from mail-lf0-f68.google.com ([209.85.215.68]:44213 "EHLO mail-lf0-f68.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S932201AbeCEOeK (ORCPT ); Mon, 5 Mar 2018 09:34:10 -0500 Received: by mail-lf0-f68.google.com with SMTP id v9so23328735lfa.11 for ; Mon, 05 Mar 2018 06:34:10 -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=VHsUILrm1IfQD6PP52GjCI7sXD/NQwqJYQ2ONLzMVvPhKogAAioykzZLSuCPNd27Hh Id2TTaugFVKe88eAhHrOlKlZSVp2ku3QzeDA734N2I41Qb0CkOyUGc51wEDnUC5lEwfV VX00Gyu3/U1ZPLPcu68QoDHYij+3J0VK2KK9/srH1qRhwzk02YrzA1xoRpQuDqQsCnog YlcdqoVZD3SLGIH/7R3rk75rT0A4rVvcltJG03M8WqvKcT7qbvAC4nZXMcd2eYF1P1jH cuadxggaO0RNcoSprUGlAtfjudmgu3n8h5CxZznvEvndh/T0bDXqQW1dDMUjtVHRdjHS tSrA== X-Gm-Message-State: APf1xPDmDBoisGfUs6xxArIxJYh9cASQE1SlZnRxn84aW2TJ87P9NDU/ INgZADa9FRdrfEUuz9pPrWukiSfqDeE= 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 Cc: linux@armlinux.org.uk, arnd@arndb.de, Anders Roxell 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 Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org 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 --- 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" -- 2.11.0