]> git.proxmox.com Git - mirror_ubuntu-artful-kernel.git/commit
Elf: add livepatch-specific Elf constants
authorJessica Yu <jeyu@redhat.com>
Wed, 23 Mar 2016 00:03:15 +0000 (20:03 -0400)
committerJiri Kosina <jkosina@suse.cz>
Fri, 1 Apr 2016 13:00:10 +0000 (15:00 +0200)
commit8d98e96b345e13659aa42bdc611368863ce65cbe
tree21d42ee59d5367e1dcf857debb4a9f991aeaa89b
parent0f49fc95b86fc77b867d643e2d38bc9f28035ed4
Elf: add livepatch-specific Elf constants

Livepatch manages its own relocation sections and symbols in order to be
able to reuse module loader code to write relocations. This removes
livepatch's dependence on separate "dynrela" sections to write relocations
and also allows livepatch to patch modules that are not yet loaded.

The livepatch Elf relocation section flag (SHF_RELA_LIVEPATCH),
and symbol section index (SHN_LIVEPATCH) allow both livepatch and the
module loader to identity livepatch relocation sections and livepatch
symbols.

Livepatch relocation sections are marked with SHF_RELA_LIVEPATCH to
indicate to the module loader that it should not apply that relocation
section and that livepatch will handle them.

The SHN_LIVEPATCH shndx marks symbols that will be resolved by livepatch.
The module loader ignores these symbols and does not attempt to resolve
them.

The values of these Elf constants were selected from OS-specific
ranges according to the definitions from glibc.

Signed-off-by: Jessica Yu <jeyu@redhat.com>
Reviewed-by: Miroslav Benes <mbenes@suse.cz>
Acked-by: Josh Poimboeuf <jpoimboe@redhat.com>
Signed-off-by: Jiri Kosina <jkosina@suse.cz>
include/uapi/linux/elf.h