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

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Mon, Dec 07, 2020 at 06:10:34PM -0700, dann frazier wrote:
> From: Ard Biesheuvel <ard.biesheuvel@xxxxxxxxxx>
> 
> commit 41c066f2c4d436c535616fe182331766c57838f0 upstream
> 
> 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.
> 
> Acked-by: Mark Rutland <mark.rutland@xxxxxxx>
> Acked-by: Will Deacon <will.deacon@xxxxxxx>
> Signed-off-by: Ard Biesheuvel <ard.biesheuvel@xxxxxxxxxx>
> Signed-off-by: Catalin Marinas <catalin.marinas@xxxxxxx>
> [ dannf: backported to v4.4 by replacing the 3-arg adr_l macro in head.S
>   with it's output, as this commit drops the 3-arg variant ]
> Fixes: c042dd600f4e ("crypto: arm64/sha - avoid non-standard inline asm tricks")
> Signed-off-by: dann frazier <dann.frazier@xxxxxxxxxxxxx>
> ---
>  arch/arm64/include/asm/assembler.h | 36 +++++++++++++++++++++++++++---------
>  arch/arm64/kernel/head.S           |  3 ++-
>  2 files changed, 29 insertions(+), 10 deletions(-)

Now queued up, thanks!

greg k-h



[Index of Archives]     [Linux Kernel]     [Kernel Development Newbies]     [Linux USB Devel]     [Video for Linux]     [Linux Audio Users]     [Yosemite Hiking]     [Linux Kernel]     [Linux SCSI]

  Powered by Linux