[PATCH v1 2/5] livepatch: Add klp-convert tool

2023-11-06 Thread Lukas Hruska
update MAINTAINERS file and add a .gitignore file. [jpoim...@redhat.com: initial version] Signed-off-by: Josh Poimboeuf [joe.lawre...@redhat.com: clean-up and fixes] Signed-off-by: Joe Lawrence [lhru...@suse.cz: klp-convert code, minimal approach] Signed-off-by: Lukas Hruska --- MAINT

[PATCH v1 3/5] kbuild/modpost: integrate klp-convert

2023-11-06 Thread Lukas Hruska
From: Josh Poimboeuf Update the modpost program so that it does not warn about unresolved symbols matching the expected format which will be then resolved by klp-convert. Signed-off-by: Josh Poimboeuf Signed-off-by: Lukas Hruska --- .gitignore| 1 + Makefile

[PATCH v1 0/5] livepatch: klp-convert tool - Minimal version

2023-11-06 Thread Lukas Hruska
Summary --- This is a significantly simplified version of the original klp-convert tool. The klp-convert code has never got a proper review and also clean ups were not easy. The last version was v7, see https://lore.kernel.org/r/20230306140824.3858543-1-joe.lawre...@redhat.com The main

[PATCH v1 4/5] livepatch: Add sample livepatch module

2023-11-06 Thread Lukas Hruska
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 Signed-off-by: Lukas Hruska --- samples/livepatch/Makefile| 1 + .../livepatch/livepatch-annotated-sample

[PATCH v1 5/5] documentation: Update on livepatch elf format

2023-11-06 Thread Lukas Hruska
Add a section to Documentation/livepatch/module-elf-format.rst describing how klp-convert works for fixing relocations. Signed-off-by: Lukas Hruska --- Documentation/livepatch/module-elf-format.rst | 67 +++ 1 file changed, 67 insertions(+) diff --git a/Documentation/livepatch

[PATCH v1 1/5] livepatch: Create and include UAPI headers

2023-11-06 Thread Lukas Hruska
From: Josh Poimboeuf Define klp prefixes in include/uapi/linux/livepatch.h, and use them for replacing hard-coded values in kernel/livepatch/core.c. Signed-off-by: Josh Poimboeuf Signed-off-by: Lukas Hruska --- MAINTAINERS| 1 + include/uapi/linux/livepatch.h | 15

Re: [PATCH v1 3/5] kbuild/modpost: integrate klp-convert

2024-01-25 Thread Lukas Hruska
There is also a typo in Makefile which causes a modules.livepatch file to be created in kernel sources even in case of building an external module. > diff --git a/Makefile b/Makefile > index 2fdd8b40b7e0..459b9c9fe0a8 100644 > --- a/Makefile > +++ b/Makefile > @@ -1185,6 +1185,7 @@ PHONY +=

Re: [PATCH v1 0/5] livepatch: klp-convert tool - Minimal version

2024-04-11 Thread Lukas Hruska
Hi, > > Do we have anything that blocks klp-convert-mini to be merged, or something > > that > > needs to be fixed? > > there is feedback from Petr and I agree with him that a selftest would be > appropriate. > > Lukas, are you planning to send v2 with everything addressed? Yes, I definitely

[PATCH v2 6/6] selftests: livepatch: Test livepatching function using an external symbol

2024-05-16 Thread Lukas Hruska
The test proves that klp-convert works as intended and it is possible to livepatch a function that use an external symbol. Signed-off-by: Lukas Hruska --- .../testing/selftests/livepatch/functions.sh | 16 +- .../selftests/livepatch/test-extern.sh| 57

[PATCH v2 1/6] livepatch: Create and include UAPI headers

2024-05-16 Thread Lukas Hruska
From: Josh Poimboeuf Define klp prefixes in include/uapi/linux/livepatch.h, and use them for replacing hard-coded values in kernel/livepatch/core.c. Signed-off-by: Josh Poimboeuf Signed-off-by: Lukas Hruska Reviewed-by: Petr Mladek Reviewed-by: Marcos Paulo de Souza --- MAINTAINERS

[PATCH v2 0/5] livepatch: klp-convert tool - Minimal version

2024-05-16 Thread Lukas Hruska
Summary --- This is a significantly simplified version of the original klp-convert tool. The klp-convert code has never got a proper review and also clean ups were not easy. The last version was v7, see https://lore.kernel.org/r/20230306140824.3858543-1-joe.lawre...@redhat.com The main

[PATCH v2 3/6] kbuild/modpost: integrate klp-convert

2024-05-16 Thread Lukas Hruska
From: Josh Poimboeuf Call klp-convert for the livepatch modules after the final linking. Also update the modpost tool so that it does not warn about unresolved symbols matching the expected format which will be then resolved by klp-convert. Signed-off-by: Josh Poimboeuf Signed-off-by: Lukas

[PATCH v2 2/6] livepatch: Add klp-convert tool

2024-05-16 Thread Lukas Hruska
update MAINTAINERS file and add a .gitignore file. [jpoim...@redhat.com: initial version] Signed-off-by: Josh Poimboeuf [joe.lawre...@redhat.com: clean-up and fixes] Signed-off-by: Joe Lawrence [lhru...@suse.cz: klp-convert code, minimal approach] Signed-off-by: Lukas Hruska Reviewed-by: Marcos Pa

[PATCH v2 5/6] documentation: Update on livepatch elf format

2024-05-16 Thread Lukas Hruska
Add a section to Documentation/livepatch/module-elf-format.rst describing how klp-convert works for fixing relocations. Signed-off-by: Lukas Hruska Reviewed-by: Petr Mladek Reviewed-by: Marcos Paulo de Souza --- Documentation/livepatch/module-elf-format.rst | 67 +++ 1 file

[PATCH v2 4/6] livepatch: Add sample livepatch module

2024-05-16 Thread Lukas Hruska
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 Signed-off-by: Lukas Hruska Reviewed-by: Petr Mladek --- samples/livepatch/Makefile | 1 + samples/livepatch