Re: [PATCH 00/23] Crypto keys and module signing
From: David Howells
Date: Wed May 23 2012 - 10:21:35 EST
Rusty Russell <rusty@xxxxxxxxxxxxxxx> wrote:
> That's pretty weird. Why not put the "@This Is A Crypto Signed
> Module\n" before the signature? Then module-size is implied: everything
> before that signature. The signature size is implied: everything after
> that signature.
This makes it simpler. No scanning required. The magic number can only be in
one place and you can find it by dead reckoning.
> In fact, I'd modify this slightly, to allow multiple signatures.
> This would work nicely with a deterministic strip. Find the signatures
> backward, and truncate as they fail.
Why would you want multiple signatures? That just complicates things. If
you're in FIPS mode, you probably have to panic if any of them fail.
I suppose I may as well punt the signature detection and removal to userspace
and pass the signature as an argument to init_module() as Dmitry suggested.
Then the signature need not be in the file at all (he wants to use an xattr or
hardware, I think). mkinitrd and rpmbuild/kernel spec have to be changed to
accommodate enablement of these patches, so why not module-init-tools, dracut
and busybox whilst we're at it?
David
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/