mirror of
https://github.com/dynup/kpatch
synced 2025-03-03 09:18:22 +00:00
Add support for the __key and __warned "special" static local variables. I'm calling them that for lack of a better term, analagous to the kernel's special sections that we have to deal with. __warned: Used by WARN_ONCE et al as an indicator as to whether a message has already been printed. I think it makes sense (and is much easier) to reset this counter for a given function when replacing the function, since the user may expect the new function to warn again. __key: Used by lockdep as an identifier for a given lock initialization code path (see http://lwn.net/Articles/185666/ for more info). I think it makes sense (and is much easier) to create a new key for a given function when replacing the function, because the locking semantics may have changed, so it makes sense for lockdep to use a new key to validate the new locking behavior. So for both __warned and __key static variables, the new version of the variable should be used when referenced by an included function. Made the following changes to support these special variables: - Ignore their suffixes when comparing them in rela_equal, so that gcc renaming them will not result in a function being marked as changed just because it referenced a renamed static local - Don't ever correlate them, so that their new versions will be included if a changed or new function uses their corresponding symbols Fixes #402. |
||
---|---|---|
.. | ||
.gitignore | ||
bug-table-section.patch | ||
cmdline-string-LOADED.test | ||
cmdline-string.patch | ||
data-new-LOADED.test | ||
data-new.patch | ||
data-read-mostly.patch | ||
fixup-section.patch | ||
gcc-constprop.patch | ||
gcc-isra.patch | ||
gcc-static-local-var-2.patch | ||
gcc-static-local-var.patch | ||
kpatch-test | ||
macro-hooks-LOADED.test | ||
macro-hooks.patch | ||
macro-printk.patch | ||
Makefile | ||
meminfo-cmdline-LOADED.test | ||
meminfo-cmdline.patch | ||
meminfo-init2-FAIL.patch | ||
meminfo-init-FAIL.patch | ||
meminfo-string-LOADED.test | ||
meminfo-string.patch | ||
multiple.test | ||
new-function.patch | ||
new-globals.patch | ||
parainstructions-section.patch | ||
replace.test | ||
shadow-newpid-LOADED.test | ||
shadow-newpid.patch | ||
smp-locks-section.patch | ||
special-static.patch | ||
tracepoints-section.patch |