Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > linux.kernel > #1361855

Re: [PATCH v5 2/6] module: preserve Elf information for livepatch modules

From Miroslav Benes <mbenes@suse.cz>
Newsgroups linux.kernel
Subject Re: [PATCH v5 2/6] module: preserve Elf information for livepatch modules
Date 2016-03-21 14:50 +0100
Message-ID <rf8nv-6o5-7@gated-at.bofh.it> (permalink)
References <rdpCa-4V9-7@gated-at.bofh.it> <rdpCa-4V9-25@gated-at.bofh.it>
Organization linux.* mail to news gateway

Show all headers | View raw


On Wed, 16 Mar 2016, Jessica Yu wrote:

> For livepatch modules, copy Elf section, symbol, and string information
> from the load_info struct in the module loader. Persist copies of the
> original symbol table and string table.
> 
> Livepatch manages its own relocation sections in order to reuse module
> loader code to write relocations. Livepatch modules must preserve Elf
> information such as section indices in order to apply livepatch relocation
> sections using the module loader's apply_relocate_add() function.
> 
> In order to apply livepatch relocation sections, livepatch modules must
> keep a complete copy of their original symbol table in memory. Normally, a
> stripped down copy of a module's symbol table (containing only "core"
> symbols) is made available through module->core_symtab. But for livepatch
> modules, the symbol table copied into memory on module load must be exactly
> the same as the symbol table produced when the patch module was compiled.
> This is because the relocations in each livepatch relocation section refer
> to their respective symbols with their symbol indices, and the original
> symbol indices (and thus the symtab ordering) must be preserved in order
> for apply_relocate_add() to find the right symbol.
> 
> Signed-off-by: Jessica Yu <jeyu@redhat.com>

With a fix for a bug reported by kbuild test robot

Reviewed-by: Miroslav Benes <mbenes@suse.cz>

Back to linux.kernel | Previous | Next | Find similar | Unroll thread


Thread

Re: [PATCH v5 2/6] module: preserve Elf information for livepatch  modules Miroslav Benes <mbenes@suse.cz> - 2016-03-21 14:50 +0100

csiph-web