aboutsummaryrefslogtreecommitdiff
path: root/arch/x86/lib/kaslr.c
diff options
context:
space:
mode:
authorGravatar Kristen Carlson Accardi <kristen@linux.intel.com> 2021-10-13 10:57:39 -0700
committerGravatar Peter Zijlstra <peterz@infradead.org> 2021-10-27 11:07:58 +0200
commita54c401ae66fc78f3f0002938b3465ebd6379009 (patch)
tree4b4baf60af608475167868cb59a53e4b47328ee0 /arch/x86/lib/kaslr.c
parentx86/sev: Make the #VC exception stacks part of the default stacks storage (diff)
downloadlinux-a54c401ae66fc78f3f0002938b3465ebd6379009.tar.gz
linux-a54c401ae66fc78f3f0002938b3465ebd6379009.tar.bz2
linux-a54c401ae66fc78f3f0002938b3465ebd6379009.zip
x86/tools/relocs: Support >64K section headers
While the relocs tool already supports finding the total number of section headers if vmlinux exceeds 64K sections, it fails to read the extended symbol table to get section header indexes for symbols, causing incorrect symbol table indexes to be used when there are > 64K symbols. Parse the ELF file to read the extended symbol table info, and then replace all direct references to st_shndx with calls to sym_index(), which will determine whether the value can be read directly or whether the value should be pulled out of the extended table. This is needed for future FGKASLR support, which uses a separate section per function. Signed-off-by: Kristen Carlson Accardi <kristen@linux.intel.com> Signed-off-by: Alexander Lobakin <alexandr.lobakin@intel.com> Signed-off-by: Kees Cook <keescook@chromium.org> Signed-off-by: Peter Zijlstra (Intel) <peterz@infradead.org> Reviewed-by: Kees Cook <keescook@chromium.org> Reviewed-by: Tony Luck <tony.luck@intel.com> Acked-by: H. Peter Anvin (Intel) <hpa@zytor.com> Tested-by: Tony Luck <tony.luck@intel.com> Link: https://lore.kernel.org/r/20211013175742.1197608-2-keescook@chromium.org
Diffstat (limited to 'arch/x86/lib/kaslr.c')
0 files changed, 0 insertions, 0 deletions