lkml.org 
[lkml]   [2023]   [Mar]   [31]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
SubjectRe: [PATCH v7 00/10] livepatch: klp-convert tool
On 3/30/23 13:04, Alexey Dobriyan wrote:
> This patchset somehow breaks the build of the simplest livepatch module:
>
> make -f linux/linux-1/scripts/Makefile.modfinal
> make[1]: *** No rule to make target 'linux/module-klp/main.tmp.ko', needed by 'linux/module-klp/main.ko'. Stop.
>

Thanks for testing.

Presumably this is an out-of-tree livepatch module? If so, that is
still on the TODO list. If not, that is weird as the patchset itself
includes updates to samples/ and lib/ livepatches that build and load fine.

--
Joe

> $ cat Kbuild
> obj-m := main.o
>
> $ cat main.c
> #include <linux/module.h>
> #include <linux/kernel.h>
> #include <linux/livepatch.h>
> #include <linux/seq_file.h>
>
> static int livepatch_cmdline_proc_show(struct seq_file *m, void *data)
> {
> seq_puts(m, "REDACTED 001\n");
> return 0;
> }
>
> static struct klp_func funcs[] = {
> {
> .old_name = "cmdline_proc_show",
> .new_func = livepatch_cmdline_proc_show,
> },
> {}
> };
>
> static struct klp_object objs[] = {
> {
> .funcs = funcs,
> },
> {}
> };
>
> static struct klp_patch g_patch = {
> .mod = THIS_MODULE,
> .objs = objs,
> };
>
> static int livepatch_init(void)
> {
> return klp_enable_patch(&g_patch);
> }
>
> static void livepatch_exit(void)
> {
> }
> module_init(livepatch_init);
> module_exit(livepatch_exit);
> MODULE_LICENSE("GPL");
> MODULE_INFO(livepatch, "Y");
>

\
 
 \ /
  Last update: 2023-03-31 18:05    [W:0.062 / U:3.288 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site