Received: by 10.213.65.68 with SMTP id h4csp182883imn; Fri, 23 Mar 2018 02:14:06 -0700 (PDT) X-Google-Smtp-Source: AG47ELvo3+JWSVZfpmyOMQeJsrg+4wWBEj5KHqGp454IfNq3If2bHSqhq2QzEnaRcSTPhrJ5en4A X-Received: by 10.99.152.68 with SMTP id l4mr20030661pgo.75.1521796446168; Fri, 23 Mar 2018 02:14:06 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1521796446; cv=none; d=google.com; s=arc-20160816; b=r3s3sgRCLMqsvw7VFjwE53YCwySm0ccbQDz8g4c7DVS+UPPHb44FJZp9iV2mNIE8fz UXAjYdIljZGTSC80ql+VxPDLXbiyNnWY2YOuUtm6UzYX9+3rM18bhp5p7uesmxOXaGLh odM3m0aOTUVUsbtvHwbt0du2IzVEEb2QYuBUH6XCsj5IqPjDAobZSUYKPVVjX23birKA BeLt6hiA9fBAH1+ng1qm/+SpX3gvkQ/eb7oGHQnOfuGHqGET6lpkoJ39ldrIutdJwNB2 s+v8Xd3KddCa1SatxEqXkmfSv4M/sHW+UmFgdk0UYSt/eIAO+tWQtmOjFaiWGbcT0brF Q5pw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:cc:to:subject:message-id:date:from :references:in-reply-to:mime-version:dkim-signature :arc-authentication-results; bh=/SCQmIP6mfG+pVhSg4RX0ddUAl8/VV7iwjsg/yiOzHs=; b=WqHXsrls4MJ8xvuJ+aOuy085giiUR+83NUqozNwV0g4/S9fDd6jSlV9u9fDEYXduQC MjTM/KHd2jqUGRkEZwbGK0MCL0JJ84D3Lfnsh8vVYcoQE+FpRnWnUVHz7rLCUjE5r1kO O8nOxURZ2jdQv3zLLzkQTdgC0pXnCEcfLxZhvfxudKKi+v9ScJ2AfAJ9VqJevgtk5Vmg IRVwQNtlqL8NdbA1TI0/2Wn3MXv5pJ8wzGgnauE65Dz0pEIC1GrHsM+ffzWkib+ZWnVS 1h/83VEp8n2mh269W0wUaPYzIRjDUTgOFG1mfumEsATSlsX7+R9omUJsDUs+niuvbrBB T8jw== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=KEYduQbt; 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 o69si6366299pfj.329.2018.03.23.02.13.51; Fri, 23 Mar 2018 02:14:06 -0700 (PDT) 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=KEYduQbt; 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 S1751993AbeCWJMt (ORCPT + 99 others); Fri, 23 Mar 2018 05:12:49 -0400 Received: from mail-io0-f193.google.com ([209.85.223.193]:38917 "EHLO mail-io0-f193.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751668AbeCWJMs (ORCPT ); Fri, 23 Mar 2018 05:12:48 -0400 Received: by mail-io0-f193.google.com with SMTP id v13so14306932iob.6 for ; Fri, 23 Mar 2018 02:12:47 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; h=mime-version:in-reply-to:references:from:date:message-id:subject:to :cc; bh=/SCQmIP6mfG+pVhSg4RX0ddUAl8/VV7iwjsg/yiOzHs=; b=KEYduQbthkCMopCL8Mo18bz+dUM3QJns4Mm1iYRtd3bf1IocpiwE1/02sJtBNIhN+v hzCUQNXrys8PZSYFgxlL4LOJtS+JrBmdh3th8+voHlOHIWANbXONEcj2h/RFcJKgkG9c 2s8BVtX9ruO25phh/LxxUs+2rw73B24Jr2vaI= X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:in-reply-to:references:from:date :message-id:subject:to:cc; bh=/SCQmIP6mfG+pVhSg4RX0ddUAl8/VV7iwjsg/yiOzHs=; b=uhM4aVCIpK4q+RsRthCYsOThQeAzxP8wuJrsnbHD2Lc/7Qsni6WAquAP82TZJyizPN GzCIUgWti8sFFw9qdsJ68jOiwm8Et93SysaZ1nJk37Mc1/NYXExUNp4q64QcuQm1SbOr L9gc2uRFUdQOgrqVNUdfcO+3cfwPWKIsp7l0RNYpA2sDmz2HR2QoUQF/oIbOvWKssROi xuzm3KSqw9yB66F5NLRqwN+CNioDCOPFhvOGtQwus/wv1KCiRXKKLtdwtnBQOMiW9npl dHW/rWs8LwEqb/2/NOOJ2db8W2dj+Lbm4CNaPbcBRkWFqyYxyd8j9pXVQq6r6546bEQB LA6g== X-Gm-Message-State: AElRT7FkwYnr7ElXnVsCYmRtxbAqm8V8kvYD9zlCGQfKxmfr27haa9M3 nIgQZRGalEDndEqMsDBtD/S7e8WT4a84QVdf1H5QqeoW X-Received: by 10.107.5.199 with SMTP id 190mr30553548iof.107.1521796367364; Fri, 23 Mar 2018 02:12:47 -0700 (PDT) MIME-Version: 1.0 Received: by 10.107.187.67 with HTTP; Fri, 23 Mar 2018 02:12:46 -0700 (PDT) In-Reply-To: <20180305143405.12187-1-anders.roxell@linaro.org> References: <20180305143405.12187-1-anders.roxell@linaro.org> From: Ard Biesheuvel Date: Fri, 23 Mar 2018 17:12:46 +0800 Message-ID: Subject: Re: [PATCH v3] arch/arm/Kconfig: default ARM_MODULE_PLTS to 'y' To: Anders Roxell Cc: linux-arm-kernel , Linux Kernel Mailing List , Russell King , Arnd Bergmann Content-Type: text/plain; charset="UTF-8" Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On 5 March 2018 at 22:34, Anders Roxell wrote: > 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" > > -- > 2.11.0 > > > _______________________________________________ > linux-arm-kernel mailing list > linux-arm-kernel@lists.infradead.org > http://lists.infradead.org/mailman/listinfo/linux-arm-kernel