From mboxrd@z Thu Jan 1 00:00:00 1970 From: will.deacon@arm.com (Will Deacon) Date: Thu, 12 Jan 2017 15:44:20 +0000 Subject: [PATCH] arm64: assembler: make adr_l work in modules under KASLR In-Reply-To: <1484146493-18460-1-git-send-email-ard.biesheuvel@linaro.org> References: <1484146493-18460-1-git-send-email-ard.biesheuvel@linaro.org> Message-ID: <20170112154420.GE13843@arm.com> To: linux-arm-kernel@lists.infradead.org List-Id: linux-arm-kernel.lists.infradead.org On Wed, Jan 11, 2017 at 02:54:53PM +0000, Ard Biesheuvel wrote: > When CONFIG_RANDOMIZE_MODULE_REGION_FULL=y, the offset between loaded > modules and the core kernel may exceed 4 GB, putting symbols exported > by the core kernel out of the reach of the ordinary adrp/add instruction > pairs used to generate relative symbol references. So make the adr_l > macro emit a movz/movk sequence instead when executing in module context. > > While at it, remove the pointless special case for the stack pointer. > > Signed-off-by: Ard Biesheuvel > --- > arch/arm64/include/asm/assembler.h | 36 +++++++++++++++----- > 1 file changed, 27 insertions(+), 9 deletions(-) Given that you need this for 4.11, I suggest Catalin takes it as a fix for 4.10 to avoid the crypto dependency. Acked-by: Will Deacon Will