diff options
author | Jessica Yu <jeyu@kernel.org> | 2018-11-05 19:53:23 +0100 |
---|---|---|
committer | Will Deacon <will.deacon@arm.com> | 2018-11-20 11:38:26 +0000 |
commit | c8ebf64eab743130fe404dc6679c2ff0cbc01615 (patch) | |
tree | 5fbae96f2dbb03d1ea65fa778ba96455c3ac4eab /arch/arm64/include/asm/io.h | |
parent | c55191e96caa9d787e8f682c5e525b7f8172a3b4 (diff) |
arm64/module: use plt section indices for relocations
Instead of saving a pointer to the .plt and .init.plt sections to apply
plt-based relocations, save and use their section indices instead.
The mod->arch.{core,init}.plt pointers were problematic for livepatch
because they pointed within temporary section headers (provided by the
module loader via info->sechdrs) that would be freed after module load.
Since livepatch modules may need to apply relocations post-module-load
(for example, to patch a module that is loaded later), using section
indices to offset into the section headers (instead of accessing them
through a saved pointer) allows livepatch modules on arm64 to pass in
their own copy of the section headers to apply_relocate_add() to apply
delayed relocations.
Reviewed-by: Ard Biesheuvel <ard.biesheuvel@linaro.org>
Reviewed-by: Miroslav Benes <mbenes@suse.cz>
Signed-off-by: Jessica Yu <jeyu@kernel.org>
Signed-off-by: Will Deacon <will.deacon@arm.com>
Diffstat (limited to 'arch/arm64/include/asm/io.h')
0 files changed, 0 insertions, 0 deletions