Received: by 2002:a25:ab43:0:0:0:0:0 with SMTP id u61csp2807525ybi; Mon, 17 Jun 2019 10:45:24 -0700 (PDT) X-Google-Smtp-Source: APXvYqx9/+WOb9rSTXnHCFB5z5ihBPOKuKh63b2Swpj7zbX/I+sTzKDTwsKoJMxAd5e1J09cIK32 X-Received: by 2002:aa7:9212:: with SMTP id 18mr76083635pfo.120.1560792824614; Mon, 17 Jun 2019 10:33:44 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1560792824; cv=none; d=google.com; s=arc-20160816; b=0n82RnIaCJ/S5FIsTyB16FmAWyQbaTUvbrLhXd4YA/cGgVOAEhpMDakl8ASMetdu4i 4+FwsF/HUX/KT92VZ6dFa0WK/nr7YnWMpOrUx5P01CQG2k0F8LzPY/kD0BqHZM1HjHVy kJeCGOpvMjajaoe/Ra2IzulnqrspvkOeHTd+1WL20/kRFh7W4WgD4l4gO9GSQsKr0J59 5KKxSa2M58QULKeezoeR7LAm3b9BCoCWN5LolV2oDib0dsafvFTdQ5dCf4dm7WJ5d26C vEcDuIXza0eJQaw3ObbOVR9zl5TDfMMJBgvNcCA4GQn3pGBnslsJeWZYkx/xWrruz73E gUtw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:user-agent:in-reply-to :content-disposition:mime-version:references:message-id:subject:cc :to:from:date; bh=RFLtPP3ucPAtDypsR7hu7C1FIGmSv6EughCrekzsiNA=; b=RD8mOYAz6XmMg0I9bH4m2zdOsmh1mWL6A0cy8fS+rvfyu/h4WdplwxLd5pfRaQjlwz 1rDSIjn3o/kmbhcx+gQj/0XTNThkqMjuAojaI0ntBJAXbv0EvQ5EFMfN1No63qFC5ndf J+V186YZqDJ6d8C7af13y+pvw9DvqFLzdqXL1jhgbKooghGdnY+Xi38fdLJCKQeUBI/b HjzWFz19lP4+EHxSDb48h4LJa34oVmVRP/yfxmfzO19BXVY2lr9E9eImrGgqyQbKZN3r D3b1j8jc4rUtQFZqglJ8UWgPAE5plJxF0eRWVEe6vUZMwPmx4qGhQ6yZoC2Y4buJKlpE YT4A== ARC-Authentication-Results: i=1; mx.google.com; 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 Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id w4si10624228pgr.150.2019.06.17.10.33.29; Mon, 17 Jun 2019 10:33:44 -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; 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 Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1728575AbfFQRcq (ORCPT + 99 others); Mon, 17 Jun 2019 13:32:46 -0400 Received: from foss.arm.com ([217.140.110.172]:57454 "EHLO foss.arm.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1725995AbfFQRcp (ORCPT ); Mon, 17 Jun 2019 13:32:45 -0400 Received: from usa-sjc-imap-foss1.foss.arm.com (unknown [10.121.207.14]) by usa-sjc-mx-foss1.foss.arm.com (Postfix) with ESMTP id CADFE28; Mon, 17 Jun 2019 10:32:44 -0700 (PDT) Received: from fuggles.cambridge.arm.com (usa-sjc-imap-foss1.foss.arm.com [10.121.207.14]) by usa-sjc-imap-foss1.foss.arm.com (Postfix) with ESMTPSA id C6A293F246; Mon, 17 Jun 2019 10:32:43 -0700 (PDT) Date: Mon, 17 Jun 2019 18:32:41 +0100 From: Will Deacon To: Florian Fainelli Cc: linux-arm-kernel@vger.kernel.org, bcm-kernel-feedback-list@Broadcom.com, ard.biesheuvel@linaro.org, Catalin Marinas , "moderated list:ARM64 PORT (AARCH64 ARCHITECTURE)" , open list Subject: Re: [PATCH] arm64: Allow user selection of ARM64_MODULE_PLTS Message-ID: <20190617173241.GM30800@fuggles.cambridge.arm.com> References: <20190614025932.533-1-f.fainelli@gmail.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20190614025932.533-1-f.fainelli@gmail.com> User-Agent: Mutt/1.11.1+86 (6f28e57d73f2) () Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Thu, Jun 13, 2019 at 07:59:32PM -0700, Florian Fainelli wrote: > Make ARM64_MODULE_PLTS a selectable Kconfig symbol, since some people > might have very big modules spilling out of the dedicated module area > into vmalloc. Help text is copied from the ARM 32-bit counterpart. > > Signed-off-by: Florian Fainelli > --- > arch/arm64/Kconfig | 14 +++++++++++++- > 1 file changed, 13 insertions(+), 1 deletion(-) > > diff --git a/arch/arm64/Kconfig b/arch/arm64/Kconfig > index 697ea0510729..36befe987b73 100644 > --- a/arch/arm64/Kconfig > +++ b/arch/arm64/Kconfig > @@ -1418,8 +1418,20 @@ config ARM64_SVE > KVM in the same kernel image. > > config ARM64_MODULE_PLTS > - bool > + bool "Use PLTs to allow module memory to spill over into vmalloc area" > select HAVE_MOD_ARCH_SPECIFIC > + help > + Allocate PLTs when loading modules so that jumps and calls whose > + targets are too far away for their relative offsets to be encoded > + in the instructions themselves can be bounced via veneers in the > + module's PLT. This allows modules to be allocated in the generic > + vmalloc area after the dedicated module memory area has been > + exhausted. The modules will use slightly more memory, but after > + rounding up to page size, the actual memory footprint is usually > + the same. Isn't the worry really about the runtime performance overhead introduced by the veneers, as opposed to the memory usage of the module? > + Disabling this is usually safe for small single-platform > + configurations. If unsure, say y. So should this be on by default? Will