riscv: libstub: Implement KASLR by using generic functions
We can now use arm64 functions to handle the move of the kernel physical mapping: if KASLR is enabled, we will try to get a random seed from the firmware, if not possible, the kernel will be moved to a location that suits its alignment constraints. Signed-off-by:Alexandre Ghiti <alexghiti@rivosinc.com> Tested-by:
Conor Dooley <conor.dooley@microchip.com> Tested-by:
Song Shuai <songshuaishuai@tinylab.org> Reviewed-by:
Sami Tolvanen <samitolvanen@google.com> Tested-by:
Sami Tolvanen <samitolvanen@google.com> Link: https://lore.kernel.org/r/20230722123850.634544-6-alexghiti@rivosinc.com Signed-off-by:
Palmer Dabbelt <palmer@rivosinc.com>
Showing
- arch/riscv/include/asm/efi.h 2 additions, 0 deletionsarch/riscv/include/asm/efi.h
- arch/riscv/kernel/image-vars.h 1 addition, 0 deletionsarch/riscv/kernel/image-vars.h
- drivers/firmware/efi/libstub/Makefile 1 addition, 1 deletiondrivers/firmware/efi/libstub/Makefile
- drivers/firmware/efi/libstub/riscv-stub.c 15 additions, 18 deletionsdrivers/firmware/efi/libstub/riscv-stub.c
Please register or sign in to comment