Re: [PATCH 20/25] MODSIGN: Provide module signing public keys tothe kernel

From: Michal Marek
Date: Fri Aug 31 2012 - 10:33:04 EST


On 16.8.2012 03:37, David Howells wrote:
> +asm(".section .init.data,\"aw\"\n"
> + "modsign_public_keys:\n"
> + ".incbin \"modsign.pub\"\n"
> + "modsign_public_keys_end:"
> + );
> +
> +/*
> + * We need to make sure ccache doesn't cache the .o file as it doesn't notice
> + * if modsign.pub changes.
> + */
> +static __initdata const char annoy_ccache[] = __TIME__ "foo";

This results in a different object file after each build, even if
modsign.pub is the same :(. How about generating a modsign-hash.c with
the following content

static __initdata const char annoy_ccache[] = "<some checksum of
modsign.pub, or the key fingerprint>";

and including it in modsign-pubkey.c with the preprocessor? When
changing the public key, modsign.hash.c would change as well and ccache
would notice it. But when doing a rebuild from the same source with the
same public key, the resulting object file would not change.

Thanks,
Michal
--
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/