Re: TPM/Verifiers testing bug?

2019-01-14 Thread Matthew Garrett
On Mon, Jan 14, 2019 at 6:09 AM 'Max Tottenham' via mjg59 wrote: > I went ahead and did some debugging. Below is a patch that seems to fix > my problem. Although those calls to grub_efi_open_protocol() in the tpm > module should probably check their return value and do something sane if > 0x0 is

Re: Discuss support for the linux kernel's EFI Handover Protocol on x86 and ARM

2019-01-14 Thread Peter Jones
On Mon, Jan 14, 2019 at 05:14:21PM +0800, Michael Chang wrote: > > > 3. The Shim's fallback mode has been used to recreate boot entries after > > > firmware update for x86, not sure if that any problem for ARM. > > > > It thought fallback was a separate binary? If the distros sign that, > > there

Re: [PATCH] grub: add grub variable update functionality

2019-01-14 Thread Daniel Kiper
On Fri, Jan 04, 2019 at 07:53:42AM -0500, Prarit Bhargava wrote: > Please be aware I am NOT subscribed to grub-devel. > > P. > > ---8<--- > > Customers and users of the kernel are commenting that there is no way to > update > a grub variable without copy and pasting the existing data. > > For exam

Re: Discuss support for the linux kernel's EFI Handover Protocol on x86 and ARM

2019-01-14 Thread Peter Jones
On Mon, Jan 14, 2019 at 08:07:34AM +0100, Ard Biesheuvel wrote: > > 3. The Shim's fallback mode has been used to recreate boot entries > > after firmware update for x86, not sure if that any problem for ARM. > > It thought fallback was a separate binary? If the distros sign that, > there is no rea

[PATCH v3 2/4] mkimage: Use EFI32_HEADER_SIZE define in arm-efi case

2019-01-14 Thread Alexander Graf
The efi-arm case was defining its own header size calculation, even though it's 100% identical to the common EFI32_HEADER_SIZE definition. So let's clean it up to use the common define. Signed-off-by: Alexander Graf --- util/mkimage.c | 7 +-- 1 file changed, 1 insertion(+), 6 deletions(-)

[PATCH v3 1/4] mkimage: Simplify header size logic

2019-01-14 Thread Alexander Graf
For EFI images, we always have the following layout: [PE header] [padding] [first section (which also is the entry point)] Currently there are 2 places where we define how big header+padding are: in the .vaddr_offset member of our target image definition struct as well as in code in grub_in

[PATCH v3 3/4] mkimage: arm64-efi: Align header to page granularity

2019-01-14 Thread Alexander Graf
In order to enforce NX semantics on non-code pages, UEFI firmware may require that all code is EFI_PAGE_SIZE (4k) aligned. A similar change has recently been applied to edk2 to accomodate for the same fact: https://lists.01.org/pipermail/edk2-devel/2018-December/033708.html This patch adapts gr

[PATCH v3 0/4] arm64: Support HP Envy X2

2019-01-14 Thread Alexander Graf
I got a new toy this week: An HP Envy X2 system. This is one of those shiny new Qualcomm Snapdragon based Windows tablet/notebook hybrid things. While running Windows on those is actually not a terribly bad experience now that WSL is out, I would like to see Linux run on those as well in the futur

[PATCH v3 4/4] mkimage: Align efi sections on 4k boundary

2019-01-14 Thread Alexander Graf
There is UEFI firmware popping up in the wild now that implements stricter permission checks using NX and write protect page table entry bits. This means that firmware now may fail to load binaries if its individual sections are not page aligned, as otherwise it can not ensure permission boundarie

Re: TPM/Verifiers testing bug?

2019-01-14 Thread Max Tottenham
On 01/14, Daniel Kiper wrote: > On Wed, Jan 09, 2019 at 02:16:16PM +, Max Tottenham wrote: > > Hi Folks > > > > I was curious about the upstream work on the verifiers framework (and > > the TPM patches). I have both a TPM 2.0 based system and a QEMU + swtpm > > setup with which to test. I compi

Re: [PATCH v2 2/2] mkimage: arm64-efi: Align first section to page

2019-01-14 Thread Leif Lindholm
On Mon, Jan 14, 2019 at 02:41:30PM +0100, Alexander Graf wrote: > On 01/14/2019 02:37 PM, Daniel Kiper wrote: > > On Sun, Dec 23, 2018 at 03:52:07AM +0100, Alexander Graf wrote: > > > In order to enforce NX semantics on non-code pages, UEFI firmware > > > may require that all code is EFI_PAGE_SIZE

Re: [PATCH v2 2/2] mkimage: arm64-efi: Align first section to page

2019-01-14 Thread Alexander Graf
On 01/14/2019 02:37 PM, Daniel Kiper wrote: On Sun, Dec 23, 2018 at 03:52:07AM +0100, Alexander Graf wrote: In order to enforce NX semantics on non-code pages, UEFI firmware may require that all code is EFI_PAGE_SIZE (4k) aligned. A similar change has recently been applied to edk2 to accomodate

Re: [PATCH v2 2/2] mkimage: arm64-efi: Align first section to page

2019-01-14 Thread Daniel Kiper
On Sun, Dec 23, 2018 at 03:52:07AM +0100, Alexander Graf wrote: > In order to enforce NX semantics on non-code pages, UEFI firmware > may require that all code is EFI_PAGE_SIZE (4k) aligned. A similar > change has recently been applied to edk2 to accomodate for the same > fact: > > https://lists.

Re: [PATCH v2 1/2] mkimage: Simplify header size logic

2019-01-14 Thread Daniel Kiper
On Sun, Dec 23, 2018 at 03:52:06AM +0100, Alexander Graf wrote: > For EFI images, we always have the following layout: > > [PE header] > [padding] > [first section (which also is the entry point)] > > Currently there are 2 places where we define how big header+padding are: > in the .vaddr_off

Re: [PATCH] Fix syslinux_test in out-of-tree builds

2019-01-14 Thread Daniel Kiper
On Wed, Jan 09, 2019 at 02:59:12PM +, Colin Watson wrote: > syslinux_parse simplifies some filenames by removing things like ".." > segments, but the tests assumed that @abs_top_srcdir@ would be > untouched, which is not true in the case of out-of-tree builds where > @abs_top_srcdir@ may contai

Menu time-out missing when GRUB is loaded quickly and `at_keyboard`

2019-01-14 Thread Paul Menzel
Dear GRUB folks, When the module `at_keyboard` is directly into the GRUB image (`--modules`), and GRUB is loaded really quickly, then the timer, which, after counting down to 0 (`GRUB_TIMEOUT`), starts the selected entry, is not shown. I noticed this issue on the ASRock E350M1 with coreboot

Re: [PATCH] Fix emu build and tests after pgp module renaming

2019-01-14 Thread Daniel Kiper
On Wed, Jan 09, 2019 at 02:54:39PM +, Colin Watson wrote: > Commit b07feb8746c3bb845e3f0d33d37c0bded704d14d renamed the "verify" > module to "pgp", but the GRUB_MOD_INIT and GRUB_MOD_FINI macros were > left as "verify", which broke the emu target build; and file_filter_test > still referred to

Re: Current Projects

2019-01-14 Thread Daniel Kiper
Hi Levi, On Sun, Dec 23, 2018 at 08:53:56PM -0700, Levi Bradford wrote: > Hello! > > As a longtime user of GRUB, I find myself owing to those who helped > make this excellent system. In return for your usefulness, I want to > aid in development. I haven’t been able to find any current “project > l

Re: [PATCH V3 3/3] verifiers: Add TPM documentation

2019-01-14 Thread Daniel Kiper
On Mon, Dec 17, 2018 at 03:47:20PM +0100, Daniel Kiper wrote: > On Wed, Dec 12, 2018 at 09:57:48AM -0800, Matthew Garrett wrote: > > On Wed, Dec 12, 2018 at 6:31 AM Daniel Kiper wrote: > > > > > > On Mon, Dec 03, 2018 at 03:48:17PM +0100, Daniel Kiper wrote: > > > > On Thu, Nov 29, 2018 at 11:28:1

Re: TPM/Verifiers testing bug?

2019-01-14 Thread Daniel Kiper
On Wed, Jan 09, 2019 at 02:16:16PM +, Max Tottenham wrote: > Hi Folks > > I was curious about the upstream work on the verifiers framework (and > the TPM patches). I have both a TPM 2.0 based system and a QEMU + swtpm > setup with which to test. I compiled the head of the master branch, if I >

Re: Discuss support for the linux kernel's EFI Handover Protocol on x86 and ARM

2019-01-14 Thread Michael Chang
On Mon, Jan 14, 2019 at 10:57:10AM +0100, Ard Biesheuvel wrote: > On Mon, 14 Jan 2019 at 10:53, Michael Chang wrote: > > > > On Mon, Jan 14, 2019 at 08:41:21AM +0100, Ard Biesheuvel wrote: > > > On Mon, 14 Jan 2019 at 08:30, Michael Chang wrote: > > > > > > > > On Fri, Jan 11, 2019 at 03:17:54PM

Re: Discuss support for the linux kernel's EFI Handover Protocol on x86 and ARM

2019-01-14 Thread Alexander Graf
On 01/11/2019 11:58 AM, Leif Lindholm wrote: On Thu, Jan 10, 2019 at 09:59:38AM +0100, Alexander Graf wrote: Am 10.01.2019 um 09:12 schrieb Michael Chang : Hi, With the advent of new verifier framework and shim lock protocol support to the grub's community, we are driving to the world of UEFI

Re: Discuss support for the linux kernel's EFI Handover Protocol on x86 and ARM

2019-01-14 Thread Alexander Graf
On 01/14/2019 10:14 AM, Michael Chang wrote: On Mon, Jan 14, 2019 at 08:07:34AM +0100, Ard Biesheuvel wrote: On Mon, 14 Jan 2019 at 05:58, Michael Chang wrote: On Fri, Jan 11, 2019 at 10:58:54AM +, Leif Lindholm wrote: On Thu, Jan 10, 2019 at 09:59:38AM +0100, Alexander Graf wrote: Am 10

Re: Discuss support for the linux kernel's EFI Handover Protocol on x86 and ARM

2019-01-14 Thread Ard Biesheuvel
On Mon, 14 Jan 2019 at 10:53, Michael Chang wrote: > > On Mon, Jan 14, 2019 at 08:41:21AM +0100, Ard Biesheuvel wrote: > > On Mon, 14 Jan 2019 at 08:30, Michael Chang wrote: > > > > > > On Fri, Jan 11, 2019 at 03:17:54PM +0100, Ard Biesheuvel wrote: > > > > On Fri, 11 Jan 2019 at 11:58, Leif Lind

Re: Discuss support for the linux kernel's EFI Handover Protocol on x86 and ARM

2019-01-14 Thread Michael Chang
On Mon, Jan 14, 2019 at 08:41:21AM +0100, Ard Biesheuvel wrote: > On Mon, 14 Jan 2019 at 08:30, Michael Chang wrote: > > > > On Fri, Jan 11, 2019 at 03:17:54PM +0100, Ard Biesheuvel wrote: > > > On Fri, 11 Jan 2019 at 11:58, Leif Lindholm > > > wrote: > > > > > > > > On Thu, Jan 10, 2019 at 09:5

Re: Discuss support for the linux kernel's EFI Handover Protocol on x86 and ARM

2019-01-14 Thread Michael Chang
On Mon, Jan 14, 2019 at 08:07:34AM +0100, Ard Biesheuvel wrote: > On Mon, 14 Jan 2019 at 05:58, Michael Chang wrote: > > > > On Fri, Jan 11, 2019 at 10:58:54AM +, Leif Lindholm wrote: > > > On Thu, Jan 10, 2019 at 09:59:38AM +0100, Alexander Graf wrote: > > > > > Am 10.01.2019 um 09:12 schrieb