mirror of
https://github.com/dynup/kpatch
synced 2024-12-11 16:04:40 +00:00
2982962549
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. |
||
---|---|---|
.. | ||
integration | ||
testmod | ||
difftree.sh |