]> xenbits.xensource.com Git - xen.git/commit
livepatch: avoid relocations referencing ignored section symbols
authorRoger Pau Monné <roger.pau@citrix.com>
Fri, 8 Apr 2022 13:08:19 +0000 (15:08 +0200)
committerJan Beulich <jbeulich@suse.com>
Fri, 8 Apr 2022 13:08:19 +0000 (15:08 +0200)
commiteeaf24ccedf79941a4d1511daca4966b4e03cb91
treead10760e0f97bcbf227289c2bb252259d4838e1b
parent97258d8819a8b1ccafc47e3c688ab4f7bac2082c
livepatch: avoid relocations referencing ignored section symbols

Track whether symbols belong to ignored sections in order to avoid
applying relocations referencing those symbols. The address of such
symbols won't be resolved and thus the relocation will likely fail or
write garbage to the destination.

Return an error in that case, as leaving unresolved relocations would
lead to malfunctioning payload code.

Signed-off-by: Roger Pau Monné <roger.pau@citrix.com>
Tested-by: Bjoern Doebel <doebel@amazon.de>
Reviewed-by: Jan Beulich <jbeulich@suse.com>
Reviewed-by: Ross Lagerwall <ross.lagerwall@citrix.com>
master commit: 9120b5737f517fe9d2a3936c38d3a2211630323b
master date: 2022-04-08 10:27:11 +0200
xen/arch/arm/arm32/livepatch.c
xen/arch/arm/arm64/livepatch.c
xen/arch/x86/livepatch.c
xen/common/livepatch_elf.c
xen/include/xen/livepatch_elf.h