[PATCH 0/2] Introduce macros for the offsets to reserved_pg_dir and tramp_pg_dir

Mark Rutland mark.rutland at arm.com
Wed Feb 3 07:28:29 EST 2021


On Tue, Feb 02, 2021 at 12:36:56PM +0000, Joey Gouly wrote:
> Make the offsets to reserved_pg_dir and tramp_pg_dir less fragile by
> introducing macros that contain their offsets.
> 
> Also use these macros to verify the offsets at link time.

I like the idea, the implementation appears to be correct, both patches
build and boot without issue, and if I mess with the offsets I get the
expected warnings. So, for both patches:

Reviewed-by: Mark Rutland <mark.rutland at arm.com>
Tested-by: Mark Rutland <mark.rutland at arm.com>

Mark.

> 
> Joey Gouly (2):
>   arm64: vmlinux.ld.S: add assertion for reserved_pg_dir offset
>   arm64: vmlinux.ld.S: add assertion for tramp_pg_dir offset
> 
>  arch/arm64/include/asm/asm-uaccess.h |  4 ++--
>  arch/arm64/include/asm/memory.h      | 12 ++++++++++++
>  arch/arm64/include/asm/uaccess.h     |  2 +-
>  arch/arm64/kernel/entry.S            |  4 ++--
>  arch/arm64/kernel/vmlinux.lds.S      |  8 ++++++++
>  5 files changed, 25 insertions(+), 5 deletions(-)
> 
> -- 
> 2.17.1
> 



More information about the linux-arm-kernel mailing list