Re: [RFC 31/31] objtool, livepatch: Livepatch module generation

2024-09-11 Thread laokz
On Mon, 2024-09-02 at 21:00 -0700, Josh Poimboeuf wrote: > diff --git a/tools/objtool/klp-diff.c b/tools/objtool/klp-diff.c > new file mode 100644 > index ..76296e38f9ff > --- /dev/null > +++ b/tools/objtool/klp-diff.c > ... > +static unsigned int reloc_size(struct reloc *reloc) > +{ >

Re: [RFC 31/31] objtool, livepatch: Livepatch module generation

2024-09-04 Thread Josh Poimboeuf
On Wed, Sep 04, 2024 at 02:38:14PM -0700, Jeff Johnson wrote: > On 9/2/24 21:00, Josh Poimboeuf wrote: > ... > > diff --git a/scripts/livepatch/module.c b/scripts/livepatch/module.c > > new file mode 100644 > > index ..101cabf6b2f1 > > --- /dev/null > > +++ b/scripts/livepatch/module.c

Re: [RFC 31/31] objtool, livepatch: Livepatch module generation

2024-09-04 Thread Jeff Johnson
On 9/2/24 21:00, Josh Poimboeuf wrote: ... > diff --git a/scripts/livepatch/module.c b/scripts/livepatch/module.c > new file mode 100644 > index ..101cabf6b2f1 > --- /dev/null > +++ b/scripts/livepatch/module.c > @@ -0,0 +1,120 @@ > +// SPDX-License-Identifier: GPL-2.0-or-later > +/* >

[RFC 31/31] objtool, livepatch: Livepatch module generation

2024-09-02 Thread Josh Poimboeuf
Add a klp-build script which makes use of a new "objtool klp" subcommand to generate livepatch modules using a source patch as input. The concept is similar to kpatch-build which has been a successful out-of-tree project for over a decade. It takes a source .patch as an input, builds kernels befo