diff options
author | Rusty Russell <rusty@rustcorp.com.au> | 2012-10-22 09:39:41 +0200 |
---|---|---|
committer | Rusty Russell <rusty@rustcorp.com.au> | 2012-12-14 03:35:23 +0100 |
commit | 2f3238aebedb243804f58d62d57244edec4149b2 (patch) | |
tree | 984f7f4a6b2225649120c55a7b89e65e9de55ee2 /include | |
parent | module: add syscall to load module from fd (diff) | |
download | linux-2f3238aebedb243804f58d62d57244edec4149b2.tar.xz linux-2f3238aebedb243804f58d62d57244edec4149b2.zip |
module: add flags arg to sys_finit_module()
Thanks to Michael Kerrisk for keeping us honest. These flags are actually
useful for eliminating the only case where kmod has to mangle a module's
internals: for overriding module versioning.
Signed-off-by: Rusty Russell <rusty@rustcorp.com.au>
Acked-by: Lucas De Marchi <lucas.demarchi@profusion.mobi>
Acked-by: Kees Cook <keescook@chromium.org>
Diffstat (limited to 'include')
-rw-r--r-- | include/linux/syscalls.h | 2 | ||||
-rw-r--r-- | include/uapi/linux/module.h | 8 |
2 files changed, 9 insertions, 1 deletions
diff --git a/include/linux/syscalls.h b/include/linux/syscalls.h index 32bc035bcd68..8cf7b508cb50 100644 --- a/include/linux/syscalls.h +++ b/include/linux/syscalls.h @@ -868,5 +868,5 @@ asmlinkage long sys_process_vm_writev(pid_t pid, asmlinkage long sys_kcmp(pid_t pid1, pid_t pid2, int type, unsigned long idx1, unsigned long idx2); -asmlinkage long sys_finit_module(int fd, const char __user *uargs); +asmlinkage long sys_finit_module(int fd, const char __user *uargs, int flags); #endif diff --git a/include/uapi/linux/module.h b/include/uapi/linux/module.h new file mode 100644 index 000000000000..38da4258b12f --- /dev/null +++ b/include/uapi/linux/module.h @@ -0,0 +1,8 @@ +#ifndef _UAPI_LINUX_MODULE_H +#define _UAPI_LINUX_MODULE_H + +/* Flags for sys_finit_module: */ +#define MODULE_INIT_IGNORE_MODVERSIONS 1 +#define MODULE_INIT_IGNORE_VERMAGIC 2 + +#endif /* _UAPI_LINUX_MODULE_H */ |