diff options
author | Kamalesh Babulal <kamalesh@linux.vnet.ibm.com> | 2017-11-14 12:29:08 +0300 |
---|---|---|
committer | Michael Ellerman <mpe@ellerman.id.au> | 2017-12-11 05:03:28 +0300 |
commit | a443bf6e8a7674b86221f4922cae82d67dc9e8ad (patch) | |
tree | e034083a3bb332df792e8c3ee8f6579cc59e8910 /lib | |
parent | 5138b31422efec897461951f7ce72e59bbb9cb1a (diff) | |
download | linux-a443bf6e8a7674b86221f4922cae82d67dc9e8ad.tar.xz |
powerpc/modules: Add REL24 relocation support of livepatch symbols
Livepatch re-uses module loader function apply_relocate_add() to write
relocations, instead of managing them by arch-dependent
klp_write_module_reloc() function.
apply_relocate_add() doesn't understand livepatch symbols (marked with
SHN_LIVEPATCH symbol section index) and assumes them to be local
symbols by default for R_PPC64_REL24 relocation type. It fails with an
error, when trying to calculate offset with local_entry_offset():
module_64: kpatch_meminfo: REL24 -1152921504897399800 out of range!
Whereas livepatch symbols are essentially SHN_UNDEF, should be called
via stub used for global calls. This issue can be fixed by teaching
apply_relocate_add() to handle both SHN_UNDEF/SHN_LIVEPATCH symbols
via the same stub. This patch extends SHN_UNDEF code to handle
livepatch symbols too.
Signed-off-by: Kamalesh Babulal <kamalesh@linux.vnet.ibm.com>
Signed-off-by: Michael Ellerman <mpe@ellerman.id.au>
Diffstat (limited to 'lib')
0 files changed, 0 insertions, 0 deletions