x86/insn: Make inat-tables.c suitable for pre-decompression code
authorJoerg Roedel <jroedel@suse.de>
Mon, 7 Sep 2020 13:15:08 +0000 (15:15 +0200)
committerBorislav Petkov <bp@suse.de>
Mon, 7 Sep 2020 17:45:24 +0000 (19:45 +0200)
commit05a2ae7c033ee30f25fbed3ceed549a5cac398a9
tree1d38f9698cff4c21fd2f24c91894be94df97b510
parent05a2fdf3230306daee1def019b8f52cd06bd2e48
x86/insn: Make inat-tables.c suitable for pre-decompression code

The inat-tables.c file has some arrays in it that contain pointers to
other arrays. These pointers need to be relocated when the kernel
image is moved to a different location.

The pre-decompression boot-code has no support for applying ELF
relocations, so initialize these arrays at runtime in the
pre-decompression code to make sure all pointers are correctly
initialized.

Signed-off-by: Joerg Roedel <jroedel@suse.de>
Signed-off-by: Borislav Petkov <bp@suse.de>
Acked-by: Masami Hiramatsu <mhiramat@kernel.org>
Link: https://lkml.kernel.org/r/20200907131613.12703-8-joro@8bytes.org
arch/x86/tools/gen-insn-attr-x86.awk
tools/arch/x86/tools/gen-insn-attr-x86.awk