mirror of
https://mirrors.bfsu.edu.cn/git/linux.git
synced 2024-11-23 12:14:10 +08:00
223abe96ac
Xen puts virtual and physical addresses into ELF notes that are treated by the linker as relocatable by default. Doing so is not only pointless, given that the ELF notes are only intended for consumption by Xen before the kernel boots. It is also a KASLR leak, given that the kernel's ELF notes are exposed via the world readable /sys/kernel/notes. So emit these constants in a way that prevents the linker from marking them as relocatable. This involves place-relative relocations (which subtract their own virtual address from the symbol value) and linker provided absolute symbols that add the address of the place to the desired value. Tested-by: Jason Andryuk <jason.andryuk@amd.com> Signed-off-by: Ard Biesheuvel <ardb@kernel.org> Reviewed-by: Jason Andryuk <jason.andryuk@amd.com> Message-ID: <20241009160438.3884381-11-ardb+git@google.com> Signed-off-by: Juergen Gross <jgross@suse.com> |
||
---|---|---|
.. | ||
apic.c | ||
debugfs.c | ||
efi.c | ||
enlighten_hvm.c | ||
enlighten_pv.c | ||
enlighten_pvh.c | ||
enlighten.c | ||
grant-table.c | ||
irq.c | ||
Kconfig | ||
Makefile | ||
mmu_hvm.c | ||
mmu_pv.c | ||
mmu.c | ||
multicalls.c | ||
p2m.c | ||
platform-pci-unplug.c | ||
pmu.c | ||
setup.c | ||
smp_hvm.c | ||
smp_pv.c | ||
smp.c | ||
spinlock.c | ||
suspend_hvm.c | ||
suspend_pv.c | ||
suspend.c | ||
time.c | ||
trace.c | ||
vga.c | ||
xen-asm.S | ||
xen-head.S | ||
xen-ops.h |