summaryrefslogtreecommitdiff
path: root/kernel/module-internal.h
diff options
context:
space:
mode:
authorDavid Howells <dhowells@redhat.com>2012-10-20 01:19:29 +0100
committerLinus Torvalds <torvalds@linux-foundation.org>2012-10-19 17:30:40 -0700
commitcaabe240574aec05b2f5667414ce80f9075c2ba1 (patch)
treed92bf96b009bd0b0caec44c21348812b06805909 /kernel/module-internal.h
parentb6bb324dbddd704b4b9a85971e1f7ae79abb2e1d (diff)
MODSIGN: Move the magic string to the end of a module and eliminate the search
Emit the magic string that indicates a module has a signature after the signature data instead of before it. This allows module_sig_check() to be made simpler and faster by the elimination of the search for the magic string. Instead we just need to do a single memcmp(). This works because at the end of the signature data there is the fixed-length signature information block. This block then falls immediately prior to the magic number. From the contents of the information block, it is trivial to calculate the size of the signature data and thus the size of the actual module data. Signed-off-by: David Howells <dhowells@redhat.com> Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
Diffstat (limited to 'kernel/module-internal.h')
-rw-r--r--kernel/module-internal.h3
1 files changed, 1 insertions, 2 deletions
diff --git a/kernel/module-internal.h b/kernel/module-internal.h
index 6114a13419bd..24f9247b7d02 100644
--- a/kernel/module-internal.h
+++ b/kernel/module-internal.h
@@ -11,5 +11,4 @@
extern struct key *modsign_keyring;
-extern int mod_verify_sig(const void *mod, unsigned long modlen,
- const void *sig, unsigned long siglen);
+extern int mod_verify_sig(const void *mod, unsigned long *_modlen);