From: Mark Rutland <mark.rutland-5wv7dgnIgG8@public.gmane.org>
To: David Howells <dhowells-H+wXaHxf7aLQT0dZR+AlfA@public.gmane.org>
Cc: lukas-JFq808J9C/izQB+pC5nmwQ@public.gmane.org,
linux-efi-u79uwXL29TY76Z2rM5mHXA@public.gmane.org,
linux-kernel-u79uwXL29TY76Z2rM5mHXA@public.gmane.org,
linux-security-module-u79uwXL29TY76Z2rM5mHXA@public.gmane.org,
Josh Boyer
<jwboyer-rxtnV0ftBwyoClj4AeEUq9i2O/JbrIOy@public.gmane.org>,
keyrings-u79uwXL29TY76Z2rM5mHXA@public.gmane.org
Subject: Re: [PATCH 5/6] efi: Disable secure boot if shim is in insecure mode [ver #2]
Date: Wed, 23 Nov 2016 13:38:17 +0000 [thread overview]
Message-ID: <20161123133817.GF24624@leverpostej> (raw)
In-Reply-To: <147986058486.13790.8455439853105793460.stgit-S6HVgzuS8uM4Awkfq6JHfwNdhmdF6hFW@public.gmane.org>
On Wed, Nov 23, 2016 at 12:23:04AM +0000, David Howells wrote:
> + /* See if a user has put shim into insecure mode. If so, and if the
> + * variable doesn't have the runtime attribute set, we might as well
> + * honor that.
> + */
> + size = sizeof(moksbstate);
> + status = get_efi_var(shim_MokSBState_name, &shim_guid,
> + &attr, &size, &moksbstate);
> +
> + /* If it fails, we don't care why. Default to secure */
> + if (status != EFI_SUCCESS)
> + return 1;
I was going to suggest branching to out_efi_err, but I see that wouldn't
work when EFI_NOT_FOUND was returned. It might be worth noting
explicitly that we can't use that, so as to avoid 'obvious' cleanup in
future.
Thanks,
Mark.
WARNING: multiple messages have this Message-ID (diff)
From: Mark Rutland <mark.rutland@arm.com>
To: David Howells <dhowells@redhat.com>
Cc: lukas@wunner.de, linux-efi@vger.kernel.org,
linux-kernel@vger.kernel.org,
linux-security-module@vger.kernel.org,
Josh Boyer <jwboyer@fedoraproject.org>,
keyrings@vger.kernel.org
Subject: Re: [PATCH 5/6] efi: Disable secure boot if shim is in insecure mode [ver #2]
Date: Wed, 23 Nov 2016 13:38:17 +0000 [thread overview]
Message-ID: <20161123133817.GF24624@leverpostej> (raw)
In-Reply-To: <147986058486.13790.8455439853105793460.stgit@warthog.procyon.org.uk>
On Wed, Nov 23, 2016 at 12:23:04AM +0000, David Howells wrote:
> + /* See if a user has put shim into insecure mode. If so, and if the
> + * variable doesn't have the runtime attribute set, we might as well
> + * honor that.
> + */
> + size = sizeof(moksbstate);
> + status = get_efi_var(shim_MokSBState_name, &shim_guid,
> + &attr, &size, &moksbstate);
> +
> + /* If it fails, we don't care why. Default to secure */
> + if (status != EFI_SUCCESS)
> + return 1;
I was going to suggest branching to out_efi_err, but I see that wouldn't
work when EFI_NOT_FOUND was returned. It might be worth noting
explicitly that we can't use that, so as to avoid 'obvious' cleanup in
future.
Thanks,
Mark.
next prev parent reply other threads:[~2016-11-23 13:38 UTC|newest]
Thread overview: 35+ messages / expand[flat|nested] mbox.gz Atom feed top
2016-11-23 0:22 [PATCH 0/6] efi: Pass secure boot mode to kernel [ver #2] David Howells
2016-11-23 0:22 ` [PATCH 1/6] x86/efi: Allow invocation of arbitrary runtime services " David Howells
[not found] ` <147986054870.13790.8640536414645705863.stgit-S6HVgzuS8uM4Awkfq6JHfwNdhmdF6hFW@public.gmane.org>
2016-11-23 0:22 ` [PATCH 2/6] arm/efi: " David Howells
2016-11-23 0:22 ` David Howells
2016-11-23 9:34 ` David Howells
2016-11-23 10:35 ` Ard Biesheuvel
2016-11-23 11:51 ` David Howells
2016-11-23 10:27 ` Mark Rutland
2016-11-23 11:46 ` David Howells
[not found] ` <6125.1479901598-S6HVgzuS8uM4Awkfq6JHfwNdhmdF6hFW@public.gmane.org>
2016-11-23 13:38 ` Mark Rutland
2016-11-23 13:38 ` Mark Rutland
2016-11-23 0:22 ` [PATCH 3/6] efi: Add SHIM and image security database GUID definitions " David Howells
2016-11-23 0:22 ` David Howells
2016-11-23 0:22 ` [PATCH 4/6] efi: Get the secure boot status " David Howells
2016-11-23 9:31 ` Lukas Wunner
2016-11-23 9:53 ` David Howells
2016-11-23 10:10 ` Lukas Wunner
[not found] ` <147986057768.13790.3027173260868896792.stgit-S6HVgzuS8uM4Awkfq6JHfwNdhmdF6hFW@public.gmane.org>
2016-11-23 10:47 ` Mark Rutland
2016-11-23 10:47 ` Mark Rutland
2016-11-23 11:25 ` David Howells
2016-11-23 13:42 ` Mark Rutland
2016-11-23 14:13 ` David Howells
2016-11-23 14:24 ` Mark Rutland
2016-11-23 14:55 ` David Howells
[not found] ` <2794.1479912933-S6HVgzuS8uM4Awkfq6JHfwNdhmdF6hFW@public.gmane.org>
2016-11-29 18:11 ` Matthew Garrett
2016-11-29 18:11 ` Matthew Garrett
2016-11-30 16:51 ` David Howells
2016-11-30 16:51 ` David Howells
2016-11-23 0:23 ` [PATCH 5/6] efi: Disable secure boot if shim is in insecure mode " David Howells
[not found] ` <147986058486.13790.8455439853105793460.stgit-S6HVgzuS8uM4Awkfq6JHfwNdhmdF6hFW@public.gmane.org>
2016-11-23 13:38 ` Mark Rutland [this message]
2016-11-23 13:38 ` Mark Rutland
2016-11-23 0:23 ` [PATCH 6/6] efi: Add EFI_SECURE_BOOT bit " David Howells
2016-11-23 9:27 ` Lukas Wunner
2016-11-23 10:07 ` David Howells
2016-11-23 10:09 ` David Howells
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=20161123133817.GF24624@leverpostej \
--to=mark.rutland-5wv7dgnigg8@public.gmane.org \
--cc=dhowells-H+wXaHxf7aLQT0dZR+AlfA@public.gmane.org \
--cc=jwboyer-rxtnV0ftBwyoClj4AeEUq9i2O/JbrIOy@public.gmane.org \
--cc=keyrings-u79uwXL29TY76Z2rM5mHXA@public.gmane.org \
--cc=linux-efi-u79uwXL29TY76Z2rM5mHXA@public.gmane.org \
--cc=linux-kernel-u79uwXL29TY76Z2rM5mHXA@public.gmane.org \
--cc=linux-security-module-u79uwXL29TY76Z2rM5mHXA@public.gmane.org \
--cc=lukas-JFq808J9C/izQB+pC5nmwQ@public.gmane.org \
/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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.