android_kernel_xiaomi_sm8450/arch
Kees Cook a4e7ff1a74 x86, relocs: Ignore relocations in .notes section
[ Upstream commit aaa8736370db1a78f0e8434344a484f9fd20be3b ]

When building with CONFIG_XEN_PV=y, .text symbols are emitted into
the .notes section so that Xen can find the "startup_xen" entry point.
This information is used prior to booting the kernel, so relocations
are not useful. In fact, performing relocations against the .notes
section means that the KASLR base is exposed since /sys/kernel/notes
is world-readable.

To avoid leaking the KASLR base without breaking unprivileged tools that
are expecting to read /sys/kernel/notes, skip performing relocations in
the .notes section. The values readable in .notes are then identical to
those found in System.map.

Reported-by: Guixiong Wei <guixiongwei@gmail.com>
Closes: https://lore.kernel.org/all/20240218073501.54555-1-guixiongwei@gmail.com/
Fixes: 5ead97c84f ("xen: Core Xen implementation")
Fixes: da1a679cde ("Add /sys/kernel/notes")
Reviewed-by: Juergen Gross <jgross@suse.com>
Signed-off-by: Kees Cook <keescook@chromium.org>
Signed-off-by: Sasha Levin <sashal@kernel.org>
2024-03-26 18:21:51 -04:00
..
alpha alpha: remove __init annotation from exported page_is_ram() 2023-08-16 18:21:03 +02:00
arc ARC: fix spare error 2024-01-25 14:37:38 -08:00
arm ARM: dts: imx6dl-yapp4: Move the internal switch PHYs under the switch node 2024-03-26 18:21:51 -04:00
arm64 arm64: dts: marvell: reorder crypto interrupts on Armada SoCs 2024-03-26 18:21:51 -04:00
c6x c6x: add support for TIF_NOTIFY_SIGNAL 2023-01-04 11:39:21 +01:00
csky csky: Fix function name in csky_alignment() and die() 2023-02-01 08:23:20 +01:00
h8300 h8300: Fix build errors from do_exit() to make_task_dead() transition 2023-02-01 08:23:19 +01:00
hexagon hexagon: Fix function name in die() 2023-02-01 08:23:19 +01:00
ia64 ia64/cpu: Switch to arch_cpu_finalize_init() 2023-08-08 19:57:36 +02:00
m68k m68k: Fix invalid .section syntax 2023-09-19 12:20:04 +02:00
microblaze exit: Add and use make_task_dead. 2023-02-01 08:23:19 +01:00
mips MIPS: Clear Cause.BD in instruction_pointer_set 2024-03-26 18:21:46 -04:00
nds32 exit: Add and use make_task_dead. 2023-02-01 08:23:19 +01:00
nios2 nios2: dts: Fix tse_mac "max-frame-size" property 2023-06-21 15:45:37 +02:00
openrisc openrisc: Properly store r31 to pt_regs on unhandled exceptions 2023-05-17 11:48:03 +02:00
parisc parisc/ftrace: add missing CONFIG_DYNAMIC_FTRACE check 2024-03-26 18:21:46 -04:00
powerpc powerpc/watchpoints: Annotate atomic context in more places 2024-03-01 13:16:46 +01:00
riscv riscv: Sparse-Memory/vmemmap out-of-bounds fix 2024-03-06 14:37:49 +00:00
s390 s390: use the correct count for __iowrite64_copy() 2024-03-01 13:16:50 +01:00
sh sh: bios: Revive earlyprintk support 2023-11-20 11:06:51 +01:00
sparc sparc32: fix a braino in fault handling in csum_and_copy_..._user() 2023-11-08 17:30:45 +01:00
um um: allow not setting extra rpaths in the linux binary 2024-03-15 10:48:18 -04:00
x86 x86, relocs: Ignore relocations in .notes section 2024-03-26 18:21:51 -04:00
xtensa xtensa: boot/lib: fix function prototypes 2023-10-10 21:53:31 +02:00
.gitignore
Kconfig init: Provide arch_cpu_finalize_init() 2023-08-08 19:57:36 +02:00