linux_dsm_epyc7002/arch
Jessica Yu 425595a7fc livepatch: reuse module loader code to write relocations
Reuse module loader code to write relocations, thereby eliminating the need
for architecture specific relocation code in livepatch. Specifically, reuse
the apply_relocate_add() function in the module loader to write relocations
instead of duplicating functionality in livepatch's arch-dependent
klp_write_module_reloc() function.

In order to accomplish this, livepatch modules manage their own relocation
sections (marked with the SHF_RELA_LIVEPATCH section flag) and
livepatch-specific symbols (marked with SHN_LIVEPATCH symbol section
index). To apply livepatch relocation sections, livepatch symbols
referenced by relocs are resolved and then apply_relocate_add() is called
to apply those relocations.

In addition, remove x86 livepatch relocation code and the s390
klp_write_module_reloc() function stub. They are no longer needed since
relocation work has been offloaded to module loader.

Lastly, mark the module as a livepatch module so that the module loader
canappropriately identify and initialize it.

Signed-off-by: Jessica Yu <jeyu@redhat.com>
Reviewed-by: Miroslav Benes <mbenes@suse.cz>
Acked-by: Josh Poimboeuf <jpoimboe@redhat.com>
Acked-by: Heiko Carstens <heiko.carstens@de.ibm.com>   # for s390 changes
Signed-off-by: Jiri Kosina <jkosina@suse.cz>
2016-04-01 15:00:11 +02:00
..
alpha This is the bulk of GPIO changes for kernel v4.6: 2016-03-17 21:05:32 -07:00
arc PCI changes for the v4.6 merge window: 2016-03-16 14:45:55 -07:00
arm This is the bulk of GPIO changes for kernel v4.6: 2016-03-17 21:05:32 -07:00
arm64 arm64 updates for 4.6: 2016-03-17 20:03:47 -07:00
avr32 This is the bulk of GPIO changes for kernel v4.6: 2016-03-17 21:05:32 -07:00
blackfin This is the bulk of GPIO changes for kernel v4.6: 2016-03-17 21:05:32 -07:00
c6x locking/lockdep: Eliminate lockdep_init() 2016-02-09 12:03:25 +01:00
cris PCI: Move pci_dma_* helpers to common code 2016-03-07 10:40:02 -06:00
frv TTY/Serial patches for 4.6-rc1 2016-03-17 13:53:25 -07:00
h8300 Merge branch 'akpm' (patches from Andrew) 2016-01-21 12:32:08 -08:00
hexagon arch/hotplug: Call into idle with a proper state 2016-03-01 20:36:57 +01:00
ia64 This is the bulk of GPIO changes for kernel v4.6: 2016-03-17 21:05:32 -07:00
m32r PCI changes for the v4.6 merge window: 2016-03-16 14:45:55 -07:00
m68k This is the bulk of GPIO changes for kernel v4.6: 2016-03-17 21:05:32 -07:00
metag This is the bulk of GPIO changes for kernel v4.6: 2016-03-17 21:05:32 -07:00
microblaze This is the bulk of GPIO changes for kernel v4.6: 2016-03-17 21:05:32 -07:00
mips This is the bulk of GPIO changes for kernel v4.6: 2016-03-17 21:05:32 -07:00
mn10300 TTY/Serial patches for 4.6-rc1 2016-03-17 13:53:25 -07:00
nios2 dma-mapping: always provide the dma_map_ops based implementation 2016-01-20 17:09:18 -08:00
openrisc gpio: Remove unused asm/gpio.h files 2016-02-16 00:20:04 +01:00
parisc Merge branch 'next' of git://git.kernel.org/pub/scm/linux/kernel/git/jmorris/linux-security 2016-03-17 11:33:45 -07:00
powerpc This is the bulk of GPIO changes for kernel v4.6: 2016-03-17 21:05:32 -07:00
s390 livepatch: reuse module loader code to write relocations 2016-04-01 15:00:11 +02:00
score Merge branch 'next' of git://git.kernel.org/pub/scm/linux/kernel/git/jmorris/linux-security 2016-03-17 11:33:45 -07:00
sh This is the bulk of GPIO changes for kernel v4.6: 2016-03-17 21:05:32 -07:00
sparc This is the bulk of GPIO changes for kernel v4.6: 2016-03-17 21:05:32 -07:00
tile Merge branch 'next' of git://git.kernel.org/pub/scm/linux/kernel/git/jmorris/linux-security 2016-03-17 11:33:45 -07:00
um um: Export pm_power_off 2016-03-05 22:17:52 +01:00
unicore32 This is the bulk of GPIO changes for kernel v4.6: 2016-03-17 21:05:32 -07:00
x86 livepatch: reuse module loader code to write relocations 2016-04-01 15:00:11 +02:00
xtensa This is the bulk of GPIO changes for kernel v4.6: 2016-03-17 21:05:32 -07:00
.gitignore
Kconfig dma-mapping: always provide the dma_map_ops based implementation 2016-01-20 17:09:18 -08:00