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: 130635 Delivered-To: patch@linaro.org Received: by 10.46.66.2 with SMTP id p2csp2756050lja; Mon, 5 Mar 2018 06:34:19 -0800 (PST) X-Google-Smtp-Source: AG47ELuCa3V3zuLbbDa/YOySIRS+2c7qpS3+mR4leWsbYgYEirW0gsz+43h0ViTEXqEwUK75RR2O X-Received: by 10.99.163.1 with SMTP id s1mr12622813pge.47.1520260458984; Mon, 05 Mar 2018 06:34:18 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1520260458; cv=none; d=google.com; s=arc-20160816; b=Lrjn4Ie+IS/43y9qsZSjGZa92VEL9LRXEqLrnEwe2hHhT6FhKpCX/MdIUKGDT5LiTn PDEqvk5qm+I0807bh09DjxrhRQJuJ8kPPK1pu8J0f2lVJEJK1sDINiAcF6Dtci90S7iB pOAWIpRmGmroYrPQl4ArUBO+kB5KfiKz+9i35ODkYvPHU4+w8Q31ySYV8N4jHRmcJ2Dc CQ4RRGZMPggiY9b4EN4MJ7ByyBMdeGVP0VVWSpl4FCl9pMmIAKndk3SIQayQNqDcU+AW R6pUWo58BErZ6JMJHqQxjkpj/+vfN07lgvjnSMznOuWZHw5+KHua9OBr+soEOKaEJO1s SanQ== 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 x2si10286704pfk.231.2018.03.05.06.34.18; Mon, 05 Mar 2018 06:34:18 -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 S1752556AbeCEOeQ (ORCPT + 28 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(-) -- 2.11.0 Acked-by: Ard Biesheuvel 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"