linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Nayna Jain <nayna@linux.ibm.com>
To: linux-integrity@vger.kernel.org
Cc: linux-security-module@vger.kernel.org, linux-efi@vger.kernel.org,
	linux-kernel@vger.kernel.org, zohar@linux.ibm.com,
	dhowells@redhat.com, jforbes@redhat.com,
	seth.forshee@canonical.com, kexec@lists.infradead.org,
	keyrings@vger.kernel.org, vgoyal@redhat.com,
	ebiederm@xmission.com, mpe@ellerman.id.au
Subject: [PATCH v2 3/7] efi: Add EFI signature data types
Date: Sun,  9 Dec 2018 01:57:01 +0530	[thread overview]
Message-ID: <20181208202705.18673-4-nayna@linux.ibm.com> (raw)
In-Reply-To: <20181208202705.18673-1-nayna@linux.ibm.com>

From: Dave Howells <dhowells@redhat.com>

Add the data types that are used for containing hashes, keys and
certificates for cryptographic verification along with their corresponding
type GUIDs.

Signed-off-by: David Howells <dhowells@redhat.com>
Acked-by: Nayna Jain <nayna@linux.ibm.com>
Acked-by: Serge Hallyn <serge@hallyn.com>
---
Changelog:

v0:
- No changes

 include/linux/efi.h | 25 +++++++++++++++++++++++++
 1 file changed, 25 insertions(+)

diff --git a/include/linux/efi.h b/include/linux/efi.h
index 845174e113ce..214516b29b36 100644
--- a/include/linux/efi.h
+++ b/include/linux/efi.h
@@ -663,6 +663,10 @@ void efi_native_runtime_setup(void);
 #define EFI_IMAGE_SECURITY_DATABASE_GUID	EFI_GUID(0xd719b2cb, 0x3d3a, 0x4596,  0xa3, 0xbc, 0xda, 0xd0, 0x0e, 0x67, 0x65, 0x6f)
 #define EFI_SHIM_LOCK_GUID			EFI_GUID(0x605dab50, 0xe046, 0x4300,  0xab, 0xb6, 0x3d, 0xd8, 0x10, 0xdd, 0x8b, 0x23)
 
+#define EFI_CERT_SHA256_GUID			EFI_GUID(0xc1c41626, 0x504c, 0x4092, 0xac, 0xa9, 0x41, 0xf9, 0x36, 0x93, 0x43, 0x28)
+#define EFI_CERT_X509_GUID			EFI_GUID(0xa5c059a1, 0x94e4, 0x4aa7, 0x87, 0xb5, 0xab, 0x15, 0x5c, 0x2b, 0xf0, 0x72)
+#define EFI_CERT_X509_SHA256_GUID		EFI_GUID(0x3bd2a492, 0x96c0, 0x4079, 0xb4, 0x20, 0xfc, 0xf9, 0x8e, 0xf1, 0x03, 0xed)
+
 /*
  * This GUID is used to pass to the kernel proper the struct screen_info
  * structure that was populated by the stub based on the GOP protocol instance
@@ -934,6 +938,27 @@ typedef struct {
 	efi_memory_desc_t entry[0];
 } efi_memory_attributes_table_t;
 
+typedef struct  {
+	efi_guid_t signature_owner;
+	u8 signature_data[];
+} efi_signature_data_t;
+
+typedef struct {
+	efi_guid_t signature_type;
+	u32 signature_list_size;
+	u32 signature_header_size;
+	u32 signature_size;
+	u8 signature_header[];
+	/* efi_signature_data_t signatures[][] */
+} efi_signature_list_t;
+
+typedef u8 efi_sha256_hash_t[32];
+
+typedef struct {
+	efi_sha256_hash_t to_be_signed_hash;
+	efi_time_t time_of_revocation;
+} efi_cert_x509_sha256_t;
+
 /*
  * All runtime access to EFI goes through this structure:
  */
-- 
2.13.6


  parent reply	other threads:[~2018-12-08 20:31 UTC|newest]

Thread overview: 23+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2018-12-08 20:26 [PATCH v2 0/7] add platform/firmware keys support for kernel verification by IMA Nayna Jain
2018-12-08 20:26 ` [PATCH v2 1/7] integrity: Define a trusted platform keyring Nayna Jain
2018-12-09  4:48   ` Nayna Jain
2018-12-13  0:15     ` Thiago Jung Bauermann
2018-12-11 18:27   ` James Morris
2018-12-08 20:27 ` [PATCH v2 2/7] integrity: Load certs to the " Nayna Jain
2018-12-11 18:30   ` James Morris
2018-12-13  0:17   ` Thiago Jung Bauermann
2018-12-08 20:27 ` Nayna Jain [this message]
2018-12-11 18:30   ` [PATCH v2 3/7] efi: Add EFI signature data types James Morris
2018-12-08 20:27 ` [PATCH v2 4/7] efi: Add an EFI signature blob parser Nayna Jain
2018-12-08 20:27 ` [PATCH v2 5/7] efi: Import certificates from UEFI Secure Boot Nayna Jain
2018-12-11 18:47   ` James Morris
2018-12-12 17:31     ` Nayna Jain
2018-12-12 21:32   ` [PATCH v2a " Nayna Jain
2018-12-08 20:27 ` [PATCH v2 6/7] efi: Allow the "db" UEFI variable to be suppressed Nayna Jain
2018-12-11 18:49   ` James Morris
2018-12-08 20:27 ` [PATCH v2 7/7] ima: Support platform keyring for kernel appraisal Nayna Jain
2018-12-11 18:53   ` James Morris
2018-12-12 18:14   ` Thiago Jung Bauermann
2018-12-13  0:18     ` Mimi Zohar
2018-12-13  0:19   ` Thiago Jung Bauermann
2018-12-09 18:39 ` [PATCH v2 0/7] add platform/firmware keys support for kernel verification by IMA Mimi Zohar

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20181208202705.18673-4-nayna@linux.ibm.com \
    --to=nayna@linux.ibm.com \
    --cc=dhowells@redhat.com \
    --cc=ebiederm@xmission.com \
    --cc=jforbes@redhat.com \
    --cc=kexec@lists.infradead.org \
    --cc=keyrings@vger.kernel.org \
    --cc=linux-efi@vger.kernel.org \
    --cc=linux-integrity@vger.kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-security-module@vger.kernel.org \
    --cc=mpe@ellerman.id.au \
    --cc=seth.forshee@canonical.com \
    --cc=vgoyal@redhat.com \
    --cc=zohar@linux.ibm.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).