From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-6.7 required=3.0 tests=DKIMWL_WL_HIGH,DKIM_SIGNED, DKIM_VALID,HEADER_FROM_DIFFERENT_DOMAINS,INCLUDES_PATCH,MAILING_LIST_MULTI, SIGNED_OFF_BY,SPF_HELO_NONE,SPF_PASS autolearn=ham autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id 40616C31E44 for ; Fri, 14 Jun 2019 07:03:20 +0000 (UTC) Received: from bombadil.infradead.org (bombadil.infradead.org [198.137.202.133]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPS id 0E6862084E for ; Fri, 14 Jun 2019 07:03:19 +0000 (UTC) Authentication-Results: mail.kernel.org; dkim=pass (2048-bit key) header.d=lists.infradead.org header.i=@lists.infradead.org header.b="qihDo0f+"; dkim=fail reason="signature verification failed" (2048-bit key) header.d=linaro.org header.i=@linaro.org header.b="VeS3CU0G" DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org 0E6862084E Authentication-Results: mail.kernel.org; dmarc=fail (p=none dis=none) header.from=linaro.org Authentication-Results: mail.kernel.org; spf=none smtp.mailfrom=linux-arm-kernel-bounces+infradead-linux-arm-kernel=archiver.kernel.org@lists.infradead.org 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:Cc:List-Subscribe:List-Help:List-Post: List-Archive:List-Unsubscribe:List-Id:To:Subject:Message-ID:Date:From: In-Reply-To:References:MIME-Version:Reply-To:Content-ID:Content-Description: Resent-Date:Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID: List-Owner; bh=lVdH9KfHxk93cZEtra6xo1bwZBGBBbkodqiE9AZY6Lk=; b=qihDo0f+tnSgrz QyBpw5x12146/v8Kt9XNyVQR2UYLe3A5i/jojFcKY55GvnktK7+W/B08LHyF1/kK1miADKt1SwtmG HgJASsV+xh2RbrTW20bXcoo6Hn0o6m7AHJRYBBM+Jq6WtxZ0z33NWAVzB6L0bQJJHdKukKZHnJFrb Te3kylQ83r0sxttc1sA1PN2R1r4fIdk9NZ/hz+sdtu3IQrTz6nTRpreluf3T2KTatwY1paLU5KRdx DzTQhXCxfLu5uZCpa0CBnxO4yLsL9BKKoPyqDU316v9ufTEYgojYT/eyPLUBVRp2AhG6UlAMYo+iv MsG8hWapLqbgA4bex44w==; Received: from localhost ([127.0.0.1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.92 #3 (Red Hat Linux)) id 1hbgEz-0005Ys-4V; Fri, 14 Jun 2019 07:03:13 +0000 Received: from mail-io1-xd42.google.com ([2607:f8b0:4864:20::d42]) by bombadil.infradead.org with esmtps (Exim 4.92 #3 (Red Hat Linux)) id 1hbgEt-0005XZ-HJ for linux-arm-kernel@lists.infradead.org; Fri, 14 Jun 2019 07:03:09 +0000 Received: by mail-io1-xd42.google.com with SMTP id e5so3579535iok.4 for ; Fri, 14 Jun 2019 00:03:02 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; h=mime-version:references:in-reply-to:from:date:message-id:subject:to :cc; bh=/e9SMaz1f2hGhr+Y7ePFxQlAt1pAXhkHDxZGScVnsP0=; b=VeS3CU0GVfEu7mUzCPUp6p8noRpmTbKdsRVKGt5bZ4jZnOSQhpuqS+ezrT+pak6Dc4 wCCOwBgDRwBJPwMdJdXl9ISTJZgvJVhwnxtLKKyovc07NM/cjyPDPQsrrEtSfVvR1bDA IAuZZgXXVBUlis5movc1J9Nxn7jJoc9wK1V2yrB0jG32i+tZ9ii9CKS4mszok4ieLBvk Rk1EBY/iZaFkhvgzNS3AsIW2B6tVwziphPKYyJbMNQQs5ynzTSn874Hu8rrAePxMF/c4 UpbX4ImEi2jtEVWL0lAhtd8KupAEgjqL/1GHGIjqMO0WgUSDYfVw0w6ecfBdH+3Par36 fWYA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:references:in-reply-to:from:date :message-id:subject:to:cc; bh=/e9SMaz1f2hGhr+Y7ePFxQlAt1pAXhkHDxZGScVnsP0=; b=GSpkplyFldXGSQB8UfnBR1K+F9bvWsj6xtKqR1QQafhn5hbXTZfWVkTwnLU0oRBaCw /wyYHa6UOUVBnGdnCpNM/PLYuhTLslLo06YPIUyLKQqtsDjOHzsa+K+32bFUL+OG3xtn HkH+fSqfqF52PPOqq94ZurrdQlXf2bYz8HCI9vosqjjBuqiT47WFBgD2Da7PD0Hconye slkonW258GRirNmFWVe5YCed5QRpGBs+2OA2KBss90vfnqDAHm2YJKpOQSfr1GRiWOHN v6Rz2XgL2ksUDLzcYDVFUNQwEN7cwCPMJ6+xFN22wzfhFKUDSBYeU/T88NtWe/5QAAJx L+GA== X-Gm-Message-State: APjAAAUAIL9veq30t8a+cSALxo3eQ8m2VmpXVdJJ1ZiA3mVLCoSzzgpE aZ0LZ4o7spzU6QMlXGMkwdEqZht7NWnDTNckLD7/Tc2Fb5g= X-Google-Smtp-Source: APXvYqy6ncGT/KFf173rk/8qVGA0xxyZvKYmkEWhVq/Wy6GUm3QlOI5jun6ArLYaraXYK9V3vC277oAE7HAUOelPlDY= X-Received: by 2002:a5e:820a:: with SMTP id l10mr5570290iom.283.1560495781891; Fri, 14 Jun 2019 00:03:01 -0700 (PDT) MIME-Version: 1.0 References: <20190614025932.533-1-f.fainelli@gmail.com> In-Reply-To: <20190614025932.533-1-f.fainelli@gmail.com> From: Ard Biesheuvel Date: Fri, 14 Jun 2019 09:02:49 +0200 Message-ID: Subject: Re: [PATCH] arm64: Allow user selection of ARM64_MODULE_PLTS To: Florian Fainelli X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20190614_000307_645017_86872489 X-CRM114-Status: GOOD ( 17.08 ) X-BeenThere: linux-arm-kernel@lists.infradead.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: Catalin Marinas , Will Deacon , open list , bcm-kernel-feedback-list@broadcom.com, linux-arm-kernel@vger.kernel.org, "moderated list:ARM64 PORT \(AARCH64 ARCHITECTURE\)" Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Sender: "linux-arm-kernel" Errors-To: linux-arm-kernel-bounces+infradead-linux-arm-kernel=archiver.kernel.org@lists.infradead.org On Fri, 14 Jun 2019 at 04:59, 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. > + > + Disabling this is usually safe for small single-platform > + configurations. If unsure, say y. > I don't mind adding this, but it makes sense to add an explanation why KASLR enables this. E.g., """ When running with address space randomization (KASLR), the module region itself may be too far away for ordinary relative jumps and calls, and so in that case, module PLTs are required and cannot be disabled. """ > config ARM64_PSEUDO_NMI > bool "Support for NMI-like interrupts" > -- > 2.17.1 > _______________________________________________ linux-arm-kernel mailing list linux-arm-kernel@lists.infradead.org http://lists.infradead.org/mailman/listinfo/linux-arm-kernel