aboutsummaryrefslogtreecommitdiff
path: root/include/linux/string_helpers.h
diff options
context:
space:
mode:
authorKees Cook <[email protected]>2024-02-27 09:51:12 -0800
committerKees Cook <[email protected]>2024-02-29 22:34:42 -0800
commitaaa8736370db1a78f0e8434344a484f9fd20be3b (patch)
treef77bcd6d43fbc81943abc588b0c660e4e66c6c7f /include/linux/string_helpers.h
parent10b4c4bce3f5541f54bcc2039720b11d2bc96d79 (diff)
x86, relocs: Ignore relocations in .notes section
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 <[email protected]> Closes: https://lore.kernel.org/all/[email protected]/ Fixes: 5ead97c84fa7 ("xen: Core Xen implementation") Fixes: da1a679cde9b ("Add /sys/kernel/notes") Reviewed-by: Juergen Gross <[email protected]> Signed-off-by: Kees Cook <[email protected]>
Diffstat (limited to 'include/linux/string_helpers.h')
0 files changed, 0 insertions, 0 deletions