On Wed, Apr 15, 2026 at 5:16 PM Song Liu <[email protected]> wrote: > > Add a sample module that demonstrates how BPF struct_ops can work > together with kernel livepatch. The module livepatches > cmdline_proc_show() and delegates the output to a BPF struct_ops > callback. When no BPF program is attached, a fallback message is > shown; when a BPF struct_ops program is attached, it controls the > /proc/cmdline output via the bpf_klp_seq_write kfunc. > > This builds on the existing livepatch-sample.c pattern but shows how > livepatch and BPF struct_ops can be combined to make livepatched > behavior programmable from userspace. > > The module is built when both CONFIG_SAMPLE_LIVEPATCH and > CONFIG_BPF_JIT are enabled. > > Signed-off-by: Song Liu <[email protected]>
Forgot to add Assisted-by: Claude:claude-opus-4-6

