]> git.karo-electronics.de Git - karo-tx-linux.git/commit
MODSIGN: Don't use enum-type bitfields in module signature info block
authorDavid Howells <dhowells@redhat.com>
Mon, 22 Oct 2012 14:05:48 +0000 (15:05 +0100)
committerRusty Russell <rusty@rustcorp.com.au>
Wed, 24 Oct 2012 01:17:36 +0000 (11:47 +1030)
commit657d000d97b6718d927a114d332e3fda398344f6
treeed65ac8df0498e480177d8ae360d8e438631120e
parent3d0ceac129f3ea0b125289055a3aa7519d38df77
MODSIGN: Don't use enum-type bitfields in module signature info block

Don't use enum-type bitfields in the module signature info block as we can't be
certain how the compiler will handle them.  As I understand it, it is arch
dependent, and it is possible for the compiler to rearrange them based on
endianness and to insert a byte of padding to pad the three enums out to four
bytes.

Instead use u8 fields for these, which the compiler should emit in the right
order without padding.

Signed-off-by: David Howells <dhowells@redhat.com>
Signed-off-by: Rusty Russell <rusty@rustcorp.com.au>
kernel/module_signing.c