kernel_samsung_a53x/arch/riscv/kernel
Heinrich Schuchardt ac316782b9 riscv: efi: Set NX compat flag in PE/COFF header
[ Upstream commit d41373a4b910961df5a5e3527d7bde6ad45ca438 ]

The IMAGE_DLLCHARACTERISTICS_NX_COMPAT informs the firmware that the
EFI binary does not rely on pages that are both executable and
writable.

The flag is used by some distro versions of GRUB to decide if the EFI
binary may be executed.

As the Linux kernel neither has RWX sections nor needs RWX pages for
relocation we should set the flag.

Cc: Ard Biesheuvel <ardb@kernel.org>
Cc: <stable@vger.kernel.org>
Signed-off-by: Heinrich Schuchardt <heinrich.schuchardt@canonical.com>
Reviewed-by: Emil Renner Berthing <emil.renner.berthing@canonical.com>
Fixes: cb7d2dd5612a ("RISC-V: Add PE/COFF header for EFI stub")
Acked-by: Ard Biesheuvel <ardb@kernel.org>
Link: https://lore.kernel.org/r/20240929140233.211800-1-heinrich.schuchardt@canonical.com
Signed-off-by: Palmer Dabbelt <palmer@rivosinc.com>
Signed-off-by: Sasha Levin <sashal@kernel.org>
2024-11-23 23:22:05 +01:00
..
vdso riscv: vdso: Prevent the compiler from inserting calls to memset() 2024-11-23 23:22:05 +01:00
asm-offsets.c riscv: Enable per-task stack canaries 2024-11-19 11:32:21 +01:00
cacheinfo.c Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
cpu-hotplug.c Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
cpu.c Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
cpu_ops.c Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
cpu_ops_sbi.c Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
cpu_ops_spinwait.c Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
cpufeature.c Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
efi-header.S riscv: efi: Set NX compat flag in PE/COFF header 2024-11-23 23:22:05 +01:00
efi.c Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
entry.S Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
fpu.S Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
ftrace.c Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
head.h Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
head.S Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
image-vars.h Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
irq.c Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
jump_label.c Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
kgdb.c Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
Makefile Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
mcount-dyn.S Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
mcount.S Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
module-sections.c Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
module.c Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
patch.c Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
perf_callchain.c riscv: Fix fp alignment bug in perf_callchain_user() 2024-11-23 23:21:26 +01:00
perf_event.c Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
perf_regs.c Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
process.c riscv: process: Fix kernel gp leakage 2024-11-19 11:32:21 +01:00
ptrace.c Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
reset.c Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
riscv_ksyms.c Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
sbi.c Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
setup.c Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
signal.c Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
smp.c Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
smpboot.c Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
soc.c Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
stacktrace.c Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
sys_riscv.c Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
syscall_table.c Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
time.c Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
trace_irq.c Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
trace_irq.h Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
traps.c Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
traps_misaligned.c riscv: fix misaligned access handling of C.SWSP and C.SDSP 2024-11-18 12:11:41 +01:00
vdso.c Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
vmlinux.lds.S Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00