[PATCH] arm64: assembler: make adr_l work in modules under KASLR

Catalin Marinas catalin.marinas at arm.com
Thu Jan 12 07:57:49 PST 2017


On Thu, Jan 12, 2017 at 03:44:20PM +0000, Will Deacon wrote:
> 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 <ard.biesheuvel at linaro.org>
> > ---
> >  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.deacon at arm.com>

That's fine by me. Thanks for the ack.

-- 
Catalin



More information about the linux-arm-kernel mailing list