On Thu, Oct 09, 2025 at 02:29:43PM +0200, Petr Mladek wrote: > Sounds reasonable and I am fine with it. I have one more question > before I give my ack ;-) > > I wonder about the patchset which better integrate callbacks with shadow > variables and state API, see > https://lore.kernel.org/r/[email protected] > > I think that it should not be that big problem to update it on top > of this patchset. It would require: > > + moving declarations from livepatch.h to livepatch_external.h > + updating the macros in livepatch_helpers.h > + update callback-related code in create_klp_sections() > > Or do you expect bigger problems, please?
Yeah, that should be pretty straightforward. I can help with that. Right now there's not even a way to create a klp_state. (not sure if anybody's actually using that feature today?) For your patch set we can add a macro to livepatch_helpers.h for adding a state (and its callbacks). And then corresponding code in create_klp_sections() as you mentioned, and a small change to scripts/livepatch/init.c to set the klp_patch.states pointer. -- Josh

