Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

allow a patch that only contains hook functions #357

Closed
jpoimboe opened this issue Aug 13, 2014 · 0 comments · Fixed by #361
Closed

allow a patch that only contains hook functions #357

jpoimboe opened this issue Aug 13, 2014 · 0 comments · Fixed by #361
Assignees

Comments

@jpoimboe
Copy link
Member

The following patch isn't currently allowed:

Index: src/fs/aio.c
===================================================================
--- src.orig/fs/aio.c
+++ src/fs/aio.c
@@ -1642,3 +1642,15 @@ SYSCALL_DEFINE5(io_getevents, aio_contex
    }
    return ret;
 }
+
+void kpatch_load_aio_max_nr(void)
+{
+   aio_max_nr = 0x40000;
+}
+void kpatch_unload_aio_max_nr(void)
+{
+   aio_max_nr = 0x10000;
+}
+#include "kpatch-macros.h"
+KPATCH_LOAD_HOOK(kpatch_load_aio_max_nr);
+KPATCH_UNLOAD_HOOK(kpatch_unload_aio_max_nr);
$ kpatch-build/kpatch-build -t vmlinux ~/aio.patch 
Using cache at /home/jpoimboe/.kpatch/src
Testing patch file
checking file fs/aio.c
Building original kernel
Building patched kernel
Extracting new and modified ELF sections
aio.o: found hook: kpatch_unload_aio_max_nr
aio.o: found hook: kpatch_load_aio_max_nr
aio.o: no changed functions were found
ERROR: no functional changes found
@sjenning sjenning self-assigned this Aug 13, 2014
jpoimboe added a commit to jpoimboe/kpatch that referenced this issue Aug 13, 2014
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants