Messages in this thread | | | Subject | Re: [RFC 0/3] x86: Patchable constants | From | "H. Peter Anvin" <> | Date | Wed, 7 Feb 2018 12:43:33 -0800 |
| |
FYI: the interface I'm implementing looks like this:
[output =] const_op(data, variable);
... where variable can be any variable with a static address, although in any sane scenario it should be __ro_after_init. During initialization, it kicks out to an out-of-line (.alternatives_aux) handler which accesses the variable in normal fashion, but at alternatives-patching time it inlines the relevant opcodes.
Some of the assembly infrastructure for this is indeed hairy, especially when the out-of-line hander needs temp registers.
-hpa
| |