Skip to content

Instantly share code, notes, and snippets.

@Flex1911
Created December 7, 2014 15:06
Show Gist options
  • Save Flex1911/f63d62ca2fe9941b0d2a to your computer and use it in GitHub Desktop.
Save Flex1911/f63d62ca2fe9941b0d2a to your computer and use it in GitHub Desktop.
Patch to disable vermagic check for kernel module(dangerous)
diff --git a/kernel/module.c b/kernel/module.c
index 78ac6ec..1260650 100644
--- a/kernel/module.c
+++ b/kernel/module.c
@@ -2553,7 +2553,7 @@ static int check_modinfo(struct module *mod, struct load_info *info)
} else if (!same_magic(modmagic, vermagic, info->index.vers)) {
printk(KERN_ERR "%s: version magic '%s' should be '%s'\n",
mod->name, modmagic, vermagic);
- return -ENOEXEC;
+ //return -ENOEXEC;
}
if (!get_modinfo(info, "intree"))
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment