Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux
1
fork

Configure Feed

Select the types of activity you want to include in your feed.

tools uapi headers: add linux/module_signature.h

This header is going to be used from scripts/sign-file.

Signed-off-by: Thomas Weißschuh <thomas.weissschuh@linutronix.de>
Reviewed-by: Petr Pavlu <petr.pavlu@suse.com>
Reviewed-by: Nicolas Schier <nsc@kernel.org>
Signed-off-by: Sami Tolvanen <samitolvanen@google.com>

authored by

Thomas Weißschuh and committed by
Sami Tolvanen
d2d7561d f9909cf0

+41
+41
tools/include/uapi/linux/module_signature.h
··· 1 + /* SPDX-License-Identifier: GPL-2.0+ WITH Linux-syscall-note */ 2 + /* 3 + * Module signature handling. 4 + * 5 + * Copyright (C) 2012 Red Hat, Inc. All Rights Reserved. 6 + * Written by David Howells (dhowells@redhat.com) 7 + */ 8 + 9 + #ifndef _UAPI_LINUX_MODULE_SIGNATURE_H 10 + #define _UAPI_LINUX_MODULE_SIGNATURE_H 11 + 12 + #include <linux/types.h> 13 + 14 + /* In stripped ARM and x86-64 modules, ~ is surprisingly rare. */ 15 + #define MODULE_SIGNATURE_MARKER "~Module signature appended~\n" 16 + 17 + enum module_signature_type { 18 + MODULE_SIGNATURE_TYPE_PKCS7 = 2, /* Signature in PKCS#7 message */ 19 + }; 20 + 21 + /* 22 + * Module signature information block. 23 + * 24 + * The constituents of the signature section are, in order: 25 + * 26 + * - Signer's name 27 + * - Key identifier 28 + * - Signature data 29 + * - Information block 30 + */ 31 + struct module_signature { 32 + __u8 algo; /* Public-key crypto algorithm [0] */ 33 + __u8 hash; /* Digest algorithm [0] */ 34 + __u8 id_type; /* Key identifier type [enum module_signature_type] */ 35 + __u8 signer_len; /* Length of signer's name [0] */ 36 + __u8 key_id_len; /* Length of key identifier [0] */ 37 + __u8 __pad[3]; 38 + __be32 sig_len; /* Length of signature data */ 39 + }; 40 + 41 + #endif /* _UAPI_LINUX_MODULE_SIGNATURE_H */