kernel-hacking-2024-linux-s.../scripts
Linus Torvalds b05e585d49 kbuild: Fix module signature generation
Rusty had clearly not actually tested his module signing changes that I
(trustingly) applied as commit e2a666d52b ("kbuild: sign the modules
at install time"). That commit had multiple bugs:

 - using "${#VARIABLE}" to get the number of characters in a shell
   variable may look clever, but it's locale-dependent: it returns the
   number of *characters*, not bytes. And we do need bytes.

   So don't use "${#..}" expansion, do the stupid "wc -c" thing instead
   (where "c" stands for "bytes", not "characters", despite the letter.

 - Rusty had confused "siglen" and "signerlen", and his conversion
   didn't set "signerlen" at all, and incorrectly set "siglen" to the
   size of the signer, not the size of the signature.

End result: the modified sign-file script did create something that
superficially *looked* like a signature, but didn't actually work at
all, and would fail the signature check. Oops.

Tssk, tssk, Rusty.

But Rusty was definitely right that this whole thing should be rewritten
in perl by somebody who has the perl-fu to do so.  That is not me,
though - I'm just doing an emergency fix for the shell script.

Cc: Rusty Russell <rusty@rustcorp.com.au>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
2012-10-19 12:43:19 -07:00
..
basic
coccinelle Merge branch 'misc' of git://git.kernel.org/pub/scm/linux/kernel/git/mmarek/kbuild 2012-10-12 10:32:29 +09:00
dtc dtc: fix for_each_*() to skip first object if deleted 2012-10-17 15:53:04 -05:00
genksyms
kconfig Merge branch 'kconfig' of git://git.kernel.org/pub/scm/linux/kernel/git/mmarek/kbuild 2012-10-12 10:28:52 +09:00
ksymoops
mod Merge branch 'kbuild' of git://git.kernel.org/pub/scm/linux/kernel/git/mmarek/kbuild 2012-10-12 10:27:27 +09:00
package Merge branch 'kbuild' of git://git.kernel.org/pub/scm/linux/kernel/git/mmarek/kbuild 2012-10-12 10:27:27 +09:00
rt-tester
selinux
tracing
.gitignore X.509: Add simple ASN.1 grammar compiler 2012-10-08 13:50:19 +10:30
asn1_compiler.c X.509: Add simple ASN.1 grammar compiler 2012-10-08 13:50:19 +10:30
bin2c.c
bloat-o-meter
bootgraph.pl
checkincludes.pl
checkkconfigsymbols.sh
checkpatch.pl checkpatch: fix name of "MODULE_PARM_DESC" 2012-10-06 03:05:00 +09:00
checkstack.pl
checksyscalls.sh checksyscalls: fix "here document" handling 2012-09-25 08:59:21 -07:00
checkversion.pl
cleanfile
cleanpatch
coccicheck coccicheck: Add the rep+ctxt mode 2012-10-11 15:11:12 +02:00
config Merge branch 'misc' of git://git.kernel.org/pub/scm/linux/kernel/git/mmarek/kbuild 2012-07-30 11:23:37 -07:00
conmakehash.c
decodecode scripts/decodecode: Fixup trapping instruction marker 2012-08-16 11:15:09 -07:00
depmod.sh
diffconfig
docproc.c
export_report.pl
extract-ikconfig
extract-vmlinux
gcc-goto.sh
gcc-version.sh kbuild: Fix gcc -x syntax 2012-10-03 09:03:24 +02:00
gcc-x86_32-has-stack-protector.sh kbuild: Fix gcc -x syntax 2012-10-03 09:03:24 +02:00
gcc-x86_64-has-stack-protector.sh kbuild: Fix gcc -x syntax 2012-10-03 09:03:24 +02:00
gen_initramfs_list.sh
get_maintainer.pl get_maintainer: Fix --help warning 2012-06-20 14:39:36 -07:00
gfp-translate chmod +x scripts/gfp-translate 2012-06-27 12:44:29 -07:00
headerdep.pl
headers.sh
headers_check.pl
headers_install.pl UAPI: Plumb the UAPI Kbuilds into the user header installation and checking 2012-10-02 18:01:57 +01:00
kallsyms.c
Kbuild.include Merge branch 'rc-fixes' of git://git.kernel.org/pub/scm/linux/kernel/git/mmarek/kbuild 2012-10-08 07:56:10 +09:00
kernel-doc Merge branch 'misc' of git://git.kernel.org/pub/scm/linux/kernel/git/mmarek/kbuild 2012-10-12 10:32:29 +09:00
Lindent
link-vmlinux.sh Merge branch 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/lliubbo/blackfin 2012-09-12 07:12:53 +08:00
Makefile X.509: Add simple ASN.1 grammar compiler 2012-10-08 13:50:19 +10:30
Makefile.asm-generic uapi: Allow automatic generation of uapi/asm/ header files 2012-10-17 12:25:44 +01:00
Makefile.build X.509: Add simple ASN.1 grammar compiler 2012-10-08 13:50:19 +10:30
Makefile.clean
Makefile.fwinst kbuild: Fix accidental revert in commit fe04ddf 2012-10-15 13:01:05 -07:00
Makefile.headersinst UAPI: Plumb the UAPI Kbuilds into the user header installation and checking 2012-10-02 18:01:57 +01:00
Makefile.help
Makefile.host
Makefile.lib
Makefile.modbuiltin
Makefile.modinst kbuild: sign the modules at install time 2012-10-19 08:27:43 -07:00
Makefile.modpost kbuild: sign the modules at install time 2012-10-19 08:27:43 -07:00
makelst
markup_oops.pl
mkcompile_h
mkmakefile
mksysmap trivial: typo in comment in mksysmap 2012-07-20 10:36:05 +02:00
mkuboot.sh
mkversion
module-common.lds
namespace.pl
patch-kernel
pnmtologo.c
profile2linkerlist.pl
recordmcount.c
recordmcount.h ftrace: Make recordmcount.c handle __fentry__ 2012-08-23 11:24:43 -04:00
recordmcount.pl
setlocalversion
show_delta
sign-file kbuild: Fix module signature generation 2012-10-19 12:43:19 -07:00
sortextable.c s390/exceptions: switch to relative exception table entries 2012-09-26 15:45:10 +02:00
sortextable.h
tags.sh scripts/tags.sh: Add magic for pci access functions 2012-08-31 17:14:19 +02:00
unifdef.c
ver_linux
x509keyid kbuild: sign the modules at install time 2012-10-19 08:27:43 -07:00
xz_wrap.sh