MODSIGN: Export module signature definitions
IMA will use the module_signature format for append signatures, so export
the relevant definitions and factor out the code which verifies that the
appended signature trailer is valid.
Also, create a CONFIG_MODULE_SIG_FORMAT option so that IMA can select it
and be able to use mod_check_sig() without having to depend on either
CONFIG_MODULE_SIG or CONFIG_MODULES.
s390 duplicated the definition of struct module_signature so now they can
use the new <linux/module_signature.h> header instead.
Signed-off-by: Thiago Jung Bauermann <[email protected]>
Acked-by: Jessica Yu <[email protected]>
Reviewed-by: Philipp Rudo <[email protected]>
Cc: Heiko Carstens <[email protected]>
Signed-off-by: Mimi Zohar <[email protected]>