Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]
Groups > linux.kernel > #1275182
| From | Miroslav Benes <mbenes@suse.cz> |
|---|---|
| Newsgroups | linux.kernel |
| Subject | Re: [PATCH 1/3 v8] livepatch: add old_sympos as disambiguator field to klp_func |
| Date | 2015-11-23 10:50 +0100 |
| Message-ID | <qxVV1-8qv-17@gated-at.bofh.it> (permalink) |
| References | <qvvrX-1EC-5@gated-at.bofh.it> <qwXFw-1Np-17@gated-at.bofh.it> <qwXFx-1Np-33@gated-at.bofh.it> |
| Organization | linux.* mail to news gateway |
On Fri, 20 Nov 2015, Chris J Arges wrote: > Currently, patching objects with duplicate symbol names fail because the > creation of the sysfs function directory collides with the previous > attempt. Appending old_addr to the function name is problematic as it > reveals the address of the function being patch to a normal user. Using > the symbol's occurrence in kallsyms to postfix the function name in the > sysfs directory solves the issue of having consistent unique names and > ensuring that the address is not exposed to a normal user. > > In addition, using the symbol position as the user's method to disambiguate > symbols instead of addr allows for disambiguating symbols in modules as > well for both function addresses and for relocs. This also simplifies much > of the code. Special handling for kASLR is no longer needed and can be > removed. The klp_find_verify_func_addr function can be replaced by > klp_find_object_symbol, and klp_verify_vmlinux_symbol and its callback can > be removed completely. > > In cases of duplicate symbols, old_sympos will be used to disambiguate > instead of old_addr. By default old_sympos will be 0, and patching will > only succeed if the symbol is unique. Specifying a positive value will > ensure that occurrence of the symbol in kallsyms for the patched object > will be used for patching if it is valid. > > In addition, make old_addr an internal structure field not to be specified > by the user. Finally, remove klp_find_verify_func_addr as it can be > replaced by klp_find_object_symbol directly. > > Support for symbol position disambiguation for relocations is added in the > next patch in this series. > > Signed-off-by: Chris J Arges <chris.j.arges@canonical.com> Reviewed-by: Miroslav Benes <mbenes@suse.cz> Miroslav -- To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/
Back to linux.kernel | Previous | Next — Previous in thread | Find similar | Unroll thread
[PATCH 0/3 v8] livepatch: disambiguate symbols with the same name Chris J Arges <chris.j.arges@canonical.com> - 2015-11-20 18:30 +0100
[PATCH 2/3 v8] livepatch: add sympos as disambiguator field to klp_reloc Chris J Arges <chris.j.arges@canonical.com> - 2015-11-20 18:30 +0100
Re: [PATCH 2/3 v8] livepatch: add sympos as disambiguator field to klp_reloc Miroslav Benes <mbenes@suse.cz> - 2015-11-23 11:00 +0100
[PATCH 3/3 v8] livepatch: function,sympos scheme in livepatch sysfs directory Chris J Arges <chris.j.arges@canonical.com> - 2015-11-20 18:30 +0100
Re: [PATCH 3/3 v8] livepatch: function,sympos scheme in livepatch sysfs directory Miroslav Benes <mbenes@suse.cz> - 2015-11-23 10:50 +0100
[PATCH 1/3 v8] livepatch: add old_sympos as disambiguator field to klp_func Chris J Arges <chris.j.arges@canonical.com> - 2015-11-20 18:30 +0100
Re: [PATCH 1/3 v8] livepatch: add old_sympos as disambiguator field to klp_func Miroslav Benes <mbenes@suse.cz> - 2015-11-23 10:50 +0100
csiph-web