https://github.com/torvalds/linux
Revision caabe240574aec05b2f5667414ce80f9075c2ba1 authored by David Howells on 20 October 2012, 00:19:29 UTC, committed by Linus Torvalds on 20 October 2012, 00:30:40 UTC
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>
1 parent b6bb324
History
Tip revision: caabe240574aec05b2f5667414ce80f9075c2ba1 authored by David Howells on 20 October 2012, 00:19:29 UTC
MODSIGN: Move the magic string to the end of a module and eliminate the search
Tip revision: caabe24
File Mode Size
Documentation
arch
block
crypto
drivers
firmware
fs
include
init
ipc
kernel
lib
mm
net
samples
scripts
security
sound
tools
usr
virt
.gitignore -rw-r--r-- 1.1 KB
.mailmap -rw-r--r-- 4.4 KB
COPYING -rw-r--r-- 18.3 KB
CREDITS -rw-r--r-- 92.7 KB
Kbuild -rw-r--r-- 2.5 KB
Kconfig -rw-r--r-- 252 bytes
MAINTAINERS -rw-r--r-- 222.4 KB
Makefile -rw-r--r-- 46.6 KB
README -rw-r--r-- 18.2 KB
REPORTING-BUGS -rw-r--r-- 3.3 KB

README

back to top