All of lore.kernel.org
 help / color / mirror / Atom feed
From: huawei.libin@huawei.com (Li Bin)
To: linux-arm-kernel@lists.infradead.org
Subject: [PATCH] arm64: kaslr: fix ARM64_MODULE_PLTS dependency
Date: Mon, 10 Apr 2017 09:52:12 +0800	[thread overview]
Message-ID: <1491789132-18933-1-git-send-email-huawei.libin@huawei.com> (raw)

There is a bug that when RANDOMIZE_BASE enabled and
RANDOMIZE_MODULE_REGION_FULL disabled, and assume that there are
many modules, and module space is not enabled, module_alloc code
now will alloc space in vmalloc space, and the patch
"fe88a4 arm64: kaslr: keep modules close to the kernel when
DYNAMIC_FTRACE=y" will be invalid.

In fact, we only need plt when RANDOMIZE_MODULE_REGION_FULL enabled,
so fix the dependency, that only RANDOMIZE_MODULE_REGION_FULL select
ARM64_MODULE_PLTS.

Signed-off-by: Li Bin <huawei.libin@huawei.com>
---
 arch/arm64/Kconfig | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/arch/arm64/Kconfig b/arch/arm64/Kconfig
index 3741859..40692bb 100644
--- a/arch/arm64/Kconfig
+++ b/arch/arm64/Kconfig
@@ -952,7 +952,6 @@ config RELOCATABLE
 
 config RANDOMIZE_BASE
 	bool "Randomize the address of the kernel image"
-	select ARM64_MODULE_PLTS if MODULES
 	select RELOCATABLE
 	help
 	  Randomizes the virtual address at which the kernel image is
@@ -972,6 +971,7 @@ config RANDOMIZE_BASE
 config RANDOMIZE_MODULE_REGION_FULL
 	bool "Randomize the module region independently from the core kernel"
 	depends on RANDOMIZE_BASE && !DYNAMIC_FTRACE
+	select ARM64_MODULE_PLTS if MODULES
 	default y
 	help
 	  Randomizes the location of the module region without considering the
-- 
1.7.12.4

             reply	other threads:[~2017-04-10  1:52 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2017-04-10  1:52 Li Bin [this message]
2017-04-10  9:12 ` [PATCH] arm64: kaslr: fix ARM64_MODULE_PLTS dependency Ard Biesheuvel
2017-04-11  6:28   ` Li Bin
2017-04-11  7:56     ` Ard Biesheuvel

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=1491789132-18933-1-git-send-email-huawei.libin@huawei.com \
    --to=huawei.libin@huawei.com \
    --cc=linux-arm-kernel@lists.infradead.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.