On Mon 2023-11-06 17:25:12, Lukas Hruska wrote: > From: Josh Poimboeuf <jpoimboe@xxxxxxxxxx> > > Add a new livepatch sample in samples/livepatch/ to make use of symbols > that must be post-processed to enable load-time relocation resolution. > As the new sample is to be used as an example, it is annotated with > KLP_RELOC_SYMBOL macro. > > The livepatch sample updates the function cmdline_proc_show to print the > string referenced by the symbol saved_command_line appended by the > string "livepatch=1". > > Signed-off-by: Josh Poimboeuf <jpoimboe@xxxxxxxxxx> > Signed-off-by: Lukas Hruska <lhruska@xxxxxxx> > --- > samples/livepatch/Makefile | 1 + > .../livepatch/livepatch-annotated-sample.c | 84 +++++++++++++++++++ The name is ambiguous. I would use something like livepatch-extern-symbol.c Also it would be great to prepare a selftest. In this case, I would suggest to livepatch a symbol from another test module so that it does not modify the running system and the result is predictable. Otherwise it looks good. With a better module name: Reviewed-by: Petr Mladek <pmladek@xxxxxxxx> Best Regards, Petr