Re: [PATCH] samples/livepatch: Add BPF struct_ops integration sample

From: Song Liu

Date: Thu Apr 16 2026 - 12:34:45 EST


On Thu, Apr 16, 2026 at 12:46 AM Yafang Shao <laoar.shao@xxxxxxxxx> wrote:
[...]
> > +
> > +static struct klp_patch patch = {
> > + .mod = THIS_MODULE,
> > + .objs = objs,
>
> Nit: I suggest enabling the replace flag for this patch to align
> with the recommended implementation.
>
> .replace = true,

This is an interesting topic. To fully take advantage of the replace
feature, we need more work on the BPF side.

For this sample, I guess we are OK either way.

>
> Other than that, it looks good to me:
>
> Tested-and-acked-by: Yafang Shao <laoar.shao@xxxxxxxxx>

Thanks,
Song