From: Lukas Wunner <lukas-JFq808J9C/izQB+pC5nmwQ@public.gmane.org>
To: David Howells <dhowells-H+wXaHxf7aLQT0dZR+AlfA@public.gmane.org>
Cc: matt-mF/unelCI9GS6iBeEJttW/XRex20P6io@public.gmane.org,
ard.biesheuvel-QSEj5FYQhm4dnm+yROfE0A@public.gmane.org,
linux-efi-u79uwXL29TY76Z2rM5mHXA@public.gmane.org,
linux-kernel-u79uwXL29TY76Z2rM5mHXA@public.gmane.org,
linux-security-module-u79uwXL29TY76Z2rM5mHXA@public.gmane.org,
keyrings-u79uwXL29TY76Z2rM5mHXA@public.gmane.org,
linux-arm-kernel-IAPFreCvJWM7uuMidbF8XUB+6BGkLq7r@public.gmane.org
Subject: Re: [PATCH 5/8] efi: Get the secure boot status [ver #5]
Date: Fri, 9 Dec 2016 01:35:27 +0100 [thread overview]
Message-ID: <20161209003527.GA9062@wunner.de> (raw)
In-Reply-To: <14655.1481218273-S6HVgzuS8uM4Awkfq6JHfwNdhmdF6hFW@public.gmane.org>
On Thu, Dec 08, 2016 at 05:31:13PM +0000, David Howells wrote:
> Lukas Wunner <lukas-JFq808J9C/izQB+pC5nmwQ@public.gmane.org> wrote:
> > > +out_efi_err:
> > > + pr_efi_err(sys_table_arg, "Could not determine UEFI Secure Boot status.\n");
> > > + if (status == EFI_NOT_FOUND)
> > > + return efi_secureboot_mode_disabled;
> > > + return efi_secureboot_mode_unknown;
> > > +}
> >
> > In the out_efi_err path, the if-statement needs to come before the
> > pr_efi_err() call. Otherwise it would be a change of behaviour for
> > ARM to what we have now.
>
> As I understand it, if the BIOS is an EFI BIOS, these variables must exist -
> in which case I would argue that the pr_efi_err-statement should be before
> the if-statement.
The existing efi_get_secureboot() in arm-stub.c returns 0 in the
EFI_NOT_FOUND case and the "Could not determine ..." error is only
printed if the return value is < 0. So you're introducing a change
of behaviour.
If you feel the change is justified, fine, I won't argue against it
since I don't have a dog in this fight.
But obviously it's something that a reader of your patch will trip over,
so at least explain it in the commit message. It would also be good to
explain why you're moving the pr_efi_err() calls in the first place.
ISTR it has to do with the different interpretation of an error,
what I wrote in my previous e-mail: x86 defaults to considering secureboot
disabled on error, ARM to enabled. I'm not even sure that's correct,
I'd have to go re-read the whole thread, which again shows that there's
too little documentation in the commit message.
Thanks,
Lukas
WARNING: multiple messages have this Message-ID (diff)
From: lukas@wunner.de (Lukas Wunner)
To: linux-arm-kernel@lists.infradead.org
Subject: [PATCH 5/8] efi: Get the secure boot status [ver #5]
Date: Fri, 9 Dec 2016 01:35:27 +0100 [thread overview]
Message-ID: <20161209003527.GA9062@wunner.de> (raw)
In-Reply-To: <14655.1481218273@warthog.procyon.org.uk>
On Thu, Dec 08, 2016 at 05:31:13PM +0000, David Howells wrote:
> Lukas Wunner <lukas@wunner.de> wrote:
> > > +out_efi_err:
> > > + pr_efi_err(sys_table_arg, "Could not determine UEFI Secure Boot status.\n");
> > > + if (status == EFI_NOT_FOUND)
> > > + return efi_secureboot_mode_disabled;
> > > + return efi_secureboot_mode_unknown;
> > > +}
> >
> > In the out_efi_err path, the if-statement needs to come before the
> > pr_efi_err() call. Otherwise it would be a change of behaviour for
> > ARM to what we have now.
>
> As I understand it, if the BIOS is an EFI BIOS, these variables must exist -
> in which case I would argue that the pr_efi_err-statement should be before
> the if-statement.
The existing efi_get_secureboot() in arm-stub.c returns 0 in the
EFI_NOT_FOUND case and the "Could not determine ..." error is only
printed if the return value is < 0. So you're introducing a change
of behaviour.
If you feel the change is justified, fine, I won't argue against it
since I don't have a dog in this fight.
But obviously it's something that a reader of your patch will trip over,
so@least explain it in the commit message. It would also be good to
explain why you're moving the pr_efi_err() calls in the first place.
ISTR it has to do with the different interpretation of an error,
what I wrote in my previous e-mail: x86 defaults to considering secureboot
disabled on error, ARM to enabled. I'm not even sure that's correct,
I'd have to go re-read the whole thread, which again shows that there's
too little documentation in the commit message.
Thanks,
Lukas
WARNING: multiple messages have this Message-ID (diff)
From: Lukas Wunner <lukas@wunner.de>
To: David Howells <dhowells@redhat.com>
Cc: matt@codeblueprint.co.uk, ard.biesheuvel@linaro.org,
linux-efi@vger.kernel.org, linux-kernel@vger.kernel.org,
linux-security-module@vger.kernel.org, keyrings@vger.kernel.org,
linux-arm-kernel@lists.infradead.org
Subject: Re: [PATCH 5/8] efi: Get the secure boot status [ver #5]
Date: Fri, 9 Dec 2016 01:35:27 +0100 [thread overview]
Message-ID: <20161209003527.GA9062@wunner.de> (raw)
In-Reply-To: <14655.1481218273@warthog.procyon.org.uk>
On Thu, Dec 08, 2016 at 05:31:13PM +0000, David Howells wrote:
> Lukas Wunner <lukas@wunner.de> wrote:
> > > +out_efi_err:
> > > + pr_efi_err(sys_table_arg, "Could not determine UEFI Secure Boot status.\n");
> > > + if (status == EFI_NOT_FOUND)
> > > + return efi_secureboot_mode_disabled;
> > > + return efi_secureboot_mode_unknown;
> > > +}
> >
> > In the out_efi_err path, the if-statement needs to come before the
> > pr_efi_err() call. Otherwise it would be a change of behaviour for
> > ARM to what we have now.
>
> As I understand it, if the BIOS is an EFI BIOS, these variables must exist -
> in which case I would argue that the pr_efi_err-statement should be before
> the if-statement.
The existing efi_get_secureboot() in arm-stub.c returns 0 in the
EFI_NOT_FOUND case and the "Could not determine ..." error is only
printed if the return value is < 0. So you're introducing a change
of behaviour.
If you feel the change is justified, fine, I won't argue against it
since I don't have a dog in this fight.
But obviously it's something that a reader of your patch will trip over,
so at least explain it in the commit message. It would also be good to
explain why you're moving the pr_efi_err() calls in the first place.
ISTR it has to do with the different interpretation of an error,
what I wrote in my previous e-mail: x86 defaults to considering secureboot
disabled on error, ARM to enabled. I'm not even sure that's correct,
I'd have to go re-read the whole thread, which again shows that there's
too little documentation in the commit message.
Thanks,
Lukas
next prev parent reply other threads:[~2016-12-09 0:35 UTC|newest]
Thread overview: 32+ messages / expand[flat|nested] mbox.gz Atom feed top
2016-12-07 13:18 [PATCH 0/8] efi: Pass secure boot mode to kernel [ver #5] David Howells
2016-12-07 13:18 ` David Howells
2016-12-07 13:18 ` David Howells
2016-12-07 13:18 ` [PATCH 1/8] efi: use typed function pointers for runtime services table " David Howells
2016-12-07 13:18 ` David Howells
2016-12-07 13:18 ` [PATCH 2/8] x86/efi: Allow invocation of arbitrary runtime services " David Howells
2016-12-07 13:18 ` David Howells
2016-12-07 13:18 ` [PATCH 3/8] arm/efi: " David Howells
2016-12-07 13:18 ` David Howells
2016-12-07 13:18 ` [PATCH 4/8] efi: Add SHIM and image security database GUID definitions " David Howells
2016-12-07 13:18 ` David Howells
2016-12-07 13:18 ` [PATCH 5/8] efi: Get the secure boot status " David Howells
2016-12-07 13:18 ` David Howells
2016-12-08 6:57 ` Lukas Wunner
2016-12-08 6:57 ` Lukas Wunner
[not found] ` <20161208065735.GB8549-JFq808J9C/izQB+pC5nmwQ@public.gmane.org>
2016-12-08 8:16 ` David Howells
2016-12-08 8:16 ` David Howells
2016-12-08 8:16 ` David Howells
2016-12-08 12:42 ` Lukas Wunner
2016-12-08 12:42 ` Lukas Wunner
[not found] ` <20161208124236.GA8757-JFq808J9C/izQB+pC5nmwQ@public.gmane.org>
2016-12-08 17:31 ` David Howells
2016-12-08 17:31 ` David Howells
2016-12-08 17:31 ` David Howells
[not found] ` <14655.1481218273-S6HVgzuS8uM4Awkfq6JHfwNdhmdF6hFW@public.gmane.org>
2016-12-09 0:35 ` Lukas Wunner [this message]
2016-12-09 0:35 ` Lukas Wunner
2016-12-09 0:35 ` Lukas Wunner
2016-12-07 13:18 ` [PATCH 6/8] efi: Disable secure boot if shim is in insecure mode " David Howells
2016-12-07 13:18 ` David Howells
2016-12-07 13:18 ` [PATCH 7/8] efi: Add EFI_SECURE_BOOT bit " David Howells
2016-12-07 13:18 ` David Howells
2016-12-07 13:19 ` [PATCH 8/8] efi: Handle secure boot from UEFI-2.6 " David Howells
2016-12-07 13:19 ` 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=20161209003527.GA9062@wunner.de \
--to=lukas-jfq808j9c/izqb+pc5nmwq@public.gmane.org \
--cc=ard.biesheuvel-QSEj5FYQhm4dnm+yROfE0A@public.gmane.org \
--cc=dhowells-H+wXaHxf7aLQT0dZR+AlfA@public.gmane.org \
--cc=keyrings-u79uwXL29TY76Z2rM5mHXA@public.gmane.org \
--cc=linux-arm-kernel-IAPFreCvJWM7uuMidbF8XUB+6BGkLq7r@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=matt-mF/unelCI9GS6iBeEJttW/XRex20P6io@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.