Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > linux.kernel > #1527903

Re: [PATCH 4/6] efi: Get the secure boot status

From Lukas Wunner <lukas@wunner.de>
Newsgroups linux.kernel
Subject Re: [PATCH 4/6] efi: Get the secure boot status
Date 2016-11-22 21:30 +0100
Message-ID <sGpRw-3CL-29@gated-at.bofh.it> (permalink)
References <sGgOd-61X-21@gated-at.bofh.it> <sEw14-1T0-39@gated-at.bofh.it> <sG7hU-8nV-49@gated-at.bofh.it> <sGkyt-8rC-13@gated-at.bofh.it>
Organization linux.* mail to news gateway

Show all headers | View raw


On Tue, Nov 22, 2016 at 02:47:27PM +0000, David Howells wrote:
> Lukas Wunner <lukas@wunner.de> wrote:
> > The "out_efi_err" portion differs from the previous version of this
> > patch.  Setting a __u8 to a negative value, is this really what you
> > want?
> 
> Eh?  efi_get_secureboot() returns an int as before.  The out_efi_err:
> portions are exactly the same:

By "the previous version of this patch" I was referring to your
submission of Nov 16, not the existing code in the kernel.
Your patch didn't contain the out_efi_err portion.

You're assigning a negative value to boot_params->secure_boot
(which is declared __u8).

In the next patch you're just checking if the value isn't 0
and you're considerung secure boot to be enabled even though
GetVariable failed.  Hence my question above, is this what
you want?  Likely not, perhaps this is what you really want:

	boot_params->secure_boot = (efi_get_secureboot() == 1);

Best regards,

Lukas

Back to linux.kernel | Previous | NextPrevious in thread | Next in thread | Find similar | Unroll thread


Thread

[PATCH 02/16] efi: Get the secure boot status David Howells <dhowells@redhat.com> - 2016-11-16 22:50 +0100
  Re: [PATCH 02/16] efi: Get the secure boot status Lukas Wunner <lukas@wunner.de> - 2016-11-17 15:40 +0100
    Re: [PATCH 02/16] efi: Get the secure boot status David Howells <dhowells@redhat.com> - 2016-11-21 12:50 +0100
      Re: [PATCH 02/16] efi: Get the secure boot status Lukas Wunner <lukas@wunner.de> - 2016-11-21 21:00 +0100
    Re: [PATCH 02/16] efi: Get the secure boot status David Howells <dhowells@redhat.com> - 2016-11-21 12:50 +0100
      Re: [PATCH 02/16] efi: Get the secure boot status Ard Biesheuvel <ard.biesheuvel@linaro.org> - 2016-11-21 13:00 +0100
        Re: [PATCH 02/16] efi: Get the secure boot status David Howells <dhowells@redhat.com> - 2016-11-21 13:50 +0100
          Re: [PATCH 02/16] efi: Get the secure boot status Ard Biesheuvel <ard.biesheuvel@linaro.org> - 2016-11-21 14:20 +0100
            Re: [PATCH 02/16] efi: Get the secure boot status Lukas Wunner <lukas@wunner.de> - 2016-11-21 16:20 +0100
              Re: [PATCH 02/16] efi: Get the secure boot status Ard Biesheuvel <ard.biesheuvel@linaro.org> - 2016-11-21 16:30 +0100
    [PATCH 6/6] efi: Add EFI_SECURE_BOOT bit David Howells <dhowells@redhat.com> - 2016-11-22 01:40 +0100
      Re: [PATCH 6/6] efi: Add EFI_SECURE_BOOT bit Lukas Wunner <lukas@wunner.de> - 2016-11-22 14:10 +0100
    [PATCH 5/6] efi: Disable secure boot if shim is in insecure mode David Howells <dhowells@redhat.com> - 2016-11-22 01:40 +0100
      Re: [PATCH 5/6] efi: Disable secure boot if shim is in insecure mode Lukas Wunner <lukas@wunner.de> - 2016-11-22 14:10 +0100
    [PATCH 2/6] arm/efi: Allow invocation of arbitrary runtime services David Howells <dhowells@redhat.com> - 2016-11-22 01:40 +0100
    [PATCH 1/6] x86/efi: Allow invocation of arbitrary runtime services David Howells <dhowells@redhat.com> - 2016-11-22 01:40 +0100
      Re: [PATCH 1/6] x86/efi: Allow invocation of arbitrary runtime  services Lukas Wunner <lukas@wunner.de> - 2016-11-22 11:20 +0100
        Re: [PATCH 1/6] x86/efi: Allow invocation of arbitrary runtime services David Howells <dhowells@redhat.com> - 2016-11-22 15:20 +0100
          Re: [PATCH 1/6] x86/efi: Allow invocation of arbitrary runtime  services Joe Perches <joe@perches.com> - 2016-11-22 16:00 +0100
            Re: [PATCH 1/6] x86/efi: Allow invocation of arbitrary runtime services David Howells <dhowells@redhat.com> - 2016-11-22 17:00 +0100
              Re: [PATCH 1/6] x86/efi: Allow invocation of arbitrary runtime  services Joe Perches <joe@perches.com> - 2016-11-22 17:30 +0100
                Re: [PATCH 1/6] x86/efi: Allow invocation of arbitrary runtime services David Howells <dhowells@redhat.com> - 2016-11-22 17:50 +0100
                Re: [PATCH 1/6] x86/efi: Allow invocation of arbitrary runtime  services Joe Perches <joe@perches.com> - 2016-11-22 18:00 +0100
    [PATCH 3/6] efi: Add SHIM and image security database GUID  definitions David Howells <dhowells@redhat.com> - 2016-11-22 01:40 +0100
    [PATCH 4/6] efi: Get the secure boot status David Howells <dhowells@redhat.com> - 2016-11-22 01:40 +0100
      Re: [PATCH 4/6] efi: Get the secure boot status Lukas Wunner <lukas@wunner.de> - 2016-11-22 11:50 +0100
        Re: [PATCH 4/6] efi: Get the secure boot status Ard Biesheuvel <ard.biesheuvel@linaro.org> - 2016-11-22 11:50 +0100
        Re: [PATCH 4/6] efi: Get the secure boot status David Howells <dhowells@redhat.com> - 2016-11-22 15:50 +0100
          Re: [PATCH 4/6] efi: Get the secure boot status David Howells <dhowells@redhat.com> - 2016-11-22 16:00 +0100
          Re: [PATCH 4/6] efi: Get the secure boot status Lukas Wunner <lukas@wunner.de> - 2016-11-22 21:30 +0100
            Re: [PATCH 4/6] efi: Get the secure boot status David Howells <dhowells@redhat.com> - 2016-11-23 01:10 +0100
        Re: [PATCH 4/6] efi: Get the secure boot status David Howells <dhowells@redhat.com> - 2016-11-22 16:10 +0100
          Re: [PATCH 4/6] efi: Get the secure boot status Lukas Wunner <lukas@wunner.de> - 2016-11-22 21:40 +0100

csiph-web