Re: [PATCH] Documentation/x86/boot.rst: Correct the example of SETUP_INDIRECT

2021-01-27 Thread Daniel Kiper
On Wed, Jan 27, 2021 at 04:49:11PM +0800, Cao jin wrote: > struct setup_data.len is the length of data field. In case of > SETUP_INDIRECT, it should be sizeof(setup_indirect). > > Signed-off-by: Cao jin Reviewed-by: Daniel Kiper Daniel

[SPECIFICATION RFC] The firmware and bootloader log specification

2020-11-13 Thread Daniel Kiper
Hey, This is next attempt to create firmware and bootloader log specification. Due to high interest among industry it is an extension to the initial bootloader log only specification. It takes into the account most of the comments which I got up until now. The goal is to pass all logs produced

Re: [PATCH 07/13] x86: Secure Launch kernel early boot stub

2020-10-21 Thread Daniel Kiper
On Mon, Oct 19, 2020 at 01:18:22PM -0400, Arvind Sankar wrote: > On Mon, Oct 19, 2020 at 04:51:53PM +0200, Daniel Kiper wrote: > > On Fri, Oct 16, 2020 at 04:51:51PM -0400, Arvind Sankar wrote: > > > On Thu, Oct 15, 2020 at 08:26:54PM +0200, Daniel Kiper wrote: > > >

Re: [PATCH 07/13] x86: Secure Launch kernel early boot stub

2020-10-19 Thread Daniel Kiper
On Fri, Oct 16, 2020 at 04:51:51PM -0400, Arvind Sankar wrote: > On Thu, Oct 15, 2020 at 08:26:54PM +0200, Daniel Kiper wrote: > > > > I am discussing with Ross the other option. We can create > > .rodata.mle_header section and put it at fixed offset as > > kernel_info

Re: [PATCH 07/13] x86: Secure Launch kernel early boot stub

2020-10-15 Thread Daniel Kiper
On Tue, Sep 29, 2020 at 10:03:47AM -0400, Ross Philipson wrote: > On 9/25/20 3:18 PM, Arvind Sankar wrote: [...] > > You should see them if you do > > readelf -r arch/x86/boot/compressed/vmlinux > > > > In terms of the code, things like: > > > > addl%ebx, (sl_gdt_desc + 2)(%ebx) > >

Re: [BOOTLOADER SPECIFICATION RFC] The bootloader log format for TrenchBoot and others

2020-06-01 Thread Daniel Kiper
On Fri, May 29, 2020 at 10:11:40AM -0700, Andy Lutomirski wrote: > > On May 29, 2020, at 4:30 AM, Daniel Kiper wrote: > > > > Hey, > > > > Below you can find my rough idea of the bootloader log format which is > > generic thing but initially will be u

[BOOTLOADER SPECIFICATION RFC] The bootloader log format for TrenchBoot and others

2020-05-29 Thread Daniel Kiper
Hey, Below you can find my rough idea of the bootloader log format which is generic thing but initially will be used for TrenchBoot work. I discussed this proposal with Ross and Daniel S. So, the idea went through initial sanitization. Now I would like to take feedback from other folks too. So,

Re: [GRUB PATCH RFC 00/18] i386: Intel TXT secure launcher

2020-05-07 Thread Daniel Kiper
Hi Ɓukasz, On Tue, May 05, 2020 at 04:38:02PM +0200, Lukasz Hawrylko wrote: > On Tue, 2020-05-05 at 01:21 +0200, Daniel Kiper wrote: > > Hi, > > > > This is an RFC patchset for the GRUB introducing the Intel TXT secure > > launcher. > > This is a part of la

Re: [GRUB PATCH RFC 12/18] i386/efi: Report UEFI Secure Boot status to the Linux kernel

2020-05-07 Thread Daniel Kiper
On Wed, May 06, 2020 at 11:36:49AM -0700, Matthew Garrett wrote: > On Wed, May 6, 2020 at 6:33 AM Daniel Kiper wrote: > > > > On Tue, May 05, 2020 at 10:29:05AM -0700, Matthew Garrett wrote: > > > On Mon, May 4, 2020 at 4:25 PM Daniel Kiper > > > wrote: > >

Re: [GRUB PATCH RFC 12/18] i386/efi: Report UEFI Secure Boot status to the Linux kernel

2020-05-06 Thread Daniel Kiper
On Tue, May 05, 2020 at 10:29:05AM -0700, Matthew Garrett wrote: > On Mon, May 4, 2020 at 4:25 PM Daniel Kiper wrote: > > > > Otherwise the kernel does not know its state and cannot enable various > > security features depending on UEFI Secure Boot. > > I th

[GRUB PATCH RFC 15/18] i386/txt: Add Intel TXT core implementation

2020-05-04 Thread Daniel Kiper
From: Ross Philipson Signed-off-by: Ross Philipson Signed-off-by: Daniel Kiper --- grub-core/loader/i386/txt/txt.c | 887 include/grub/i386/memory.h | 5 + 2 files changed, 892 insertions(+) create mode 100644 grub-core/loader/i386/txt/txt.c

[GRUB PATCH RFC 12/18] i386/efi: Report UEFI Secure Boot status to the Linux kernel

2020-05-04 Thread Daniel Kiper
Otherwise the kernel does not know its state and cannot enable various security features depending on UEFI Secure Boot. Signed-off-by: Ignat Korchagin Signed-off-by: Daniel Kiper --- grub-core/loader/i386/linux.c | 86 ++- include/grub/i386/linux.h

[GRUB PATCH RFC 08/18] i386/tpm: Add TPM TIS and CRB driver

2020-05-04 Thread Daniel Kiper
It will be used by Intel TXT secure launcher introduced by subsequent patches. Signed-off-by: Daniel Kiper --- grub-core/commands/i386/tpm.c | 182 ++ include/grub/i386/tpm.h | 36 + 2 files changed, 218 insertions(+) create mode 100644

[GRUB PATCH RFC 07/18] i386/tpm: Rename tpm module to tpm_verifier

2020-05-04 Thread Daniel Kiper
..to avoid naming collision with TPM TIS and CRB driver introduced by subsequent patch. Signed-off-by: Daniel Kiper --- docs/grub.texi | 15 --- grub-core/Makefile.core.def | 4 ++-- grub-core/commands/{tpm.c => tpm_verifier.c} |

[GRUB PATCH RFC 02/18] i386/msr: Rename grub_msr_read() and grub_msr_write()

2020-05-04 Thread Daniel Kiper
.. to grub_rdmsr() and grub_wrmsr() respectively. New names are more obvious than older ones. Signed-off-by: Daniel Kiper --- grub-core/commands/i386/rdmsr.c | 2 +- grub-core/commands/i386/wrmsr.c | 2 +- include/grub/i386/msr.h | 4 ++-- 3 files changed, 4 insertions(+), 4 deletions

[GRUB PATCH RFC 14/18] i386/txt: Add Intel TXT definitions header file

2020-05-04 Thread Daniel Kiper
From: Ross Philipson Signed-off-by: Ross Philipson Signed-off-by: Daniel Kiper --- include/grub/i386/txt.h | 690 1 file changed, 690 insertions(+) create mode 100644 include/grub/i386/txt.h diff --git a/include/grub/i386/txt.h b/include/grub

[GRUB PATCH RFC 16/18] i386/txt: Add Intel TXT ACM module support

2020-05-04 Thread Daniel Kiper
From: Ross Philipson Signed-off-by: Ross Philipson Signed-off-by: Daniel Kiper --- grub-core/loader/i386/txt/acmod.c | 575 ++ 1 file changed, 575 insertions(+) create mode 100644 grub-core/loader/i386/txt/acmod.c diff --git a/grub-core/loader/i386/txt

[GRUB PATCH RFC 18/18] i386/slaunch: Add secure launch framework and commands

2020-05-04 Thread Daniel Kiper
From: Ross Philipson Signed-off-by: Ross Philipson Signed-off-by: Daniel Kiper --- grub-core/Makefile.am| 3 + grub-core/Makefile.core.def | 15 +++ grub-core/lib/i386/relocator32.S | 8 ++ grub-core/loader/i386/bsd.c | 7 ++ grub-core/loader/i386/linux.c| 206

[GRUB PATCH RFC 06/18] mmap: Add grub_mmap_get_lowest() and grub_mmap_get_highest()

2020-05-04 Thread Daniel Kiper
The functions calculate lowest and highest available RAM addresses respectively. Both functions are needed to calculate PMR boundaries for Intel TXT secure launcher introduced by subsequent patches. Signed-off-by: Daniel Kiper --- grub-core/mmap/mmap.c | 64

[GRUB PATCH RFC 13/18] i386/slaunch: Add basic platform support for secure launch

2020-05-04 Thread Daniel Kiper
From: Ross Philipson Signed-off-by: Ross Philipson Signed-off-by: Daniel Kiper --- include/grub/i386/cpuid.h | 13 include/grub/i386/crfr.h | 186 ++ include/grub/i386/mmio.h | 90 ++ include/grub/i386/msr.h | 61

[GRUB PATCH RFC 11/18] efi: Add a function to read EFI variables with attributes

2020-05-04 Thread Daniel Kiper
It will be used to properly detect and report UEFI Secure Boot status to the x86 Linux kernel. The functionality will be added by subsequent patches. Signed-off-by: Ignat Korchagin Signed-off-by: Daniel Kiper --- grub-core/kern/efi/efi.c | 16 +--- include/grub/efi/efi.h | 5

[GRUB PATCH RFC 17/18] i386/txt: Add Intel TXT verification routines

2020-05-04 Thread Daniel Kiper
From: Ross Philipson Signed-off-by: Ross Philipson Signed-off-by: Daniel Kiper --- grub-core/loader/i386/txt/verify.c | 297 + 1 file changed, 297 insertions(+) create mode 100644 grub-core/loader/i386/txt/verify.c diff --git a/grub-core/loader/i386/txt

[GRUB PATCH RFC 10/18] efi: Return grub_efi_status_t from grub_efi_get_variable()

2020-05-04 Thread Daniel Kiper
This is needed to properly detect and report UEFI Secure Boot status to the x86 Linux kernel. The functionality will be added by subsequent patches. Signed-off-by: Daniel Kiper --- grub-core/commands/efi/efifwsetup.c | 8 grub-core/kern/efi/efi.c| 16 +--- grub

[GRUB PATCH RFC 00/18] i386: Intel TXT secure launcher

2020-05-04 Thread Daniel Kiper
Hi, This is an RFC patchset for the GRUB introducing the Intel TXT secure launcher. This is a part of larger work known as the TrenchBoot. Patchset can be split into two distinct parts: - 01-12: preparatory patches, - 13-18: the Intel TXT secure launcher itself. The initial implementation of

[GRUB PATCH RFC 01/18] i386/msr: Merge rdmsr.h and wrmsr.h into msr.h

2020-05-04 Thread Daniel Kiper
It does not make sense to have separate headers for separate static functions. Additionally, we have to add some constants with MSR addresses in subsequent patches. So, make one common place to store them. Signed-off-by: Daniel Kiper --- grub-core/commands/i386/rdmsr.c | 2 +- grub-core

[GRUB PATCH RFC 05/18] i386/memory: Rename PAGE_SIZE to GRUB_PAGE_SIZE and make it global

2020-05-04 Thread Daniel Kiper
Subsequent patches will use that constant. Signed-off-by: Daniel Kiper --- grub-core/loader/i386/xen.c | 35 +-- include/grub/i386/memory.h | 1 + 2 files changed, 18 insertions(+), 18 deletions(-) diff --git a/grub-core/loader/i386/xen.c b/grub-core/loader

[GRUB PATCH RFC 04/18] i386/memory: Rename PAGE_SHIFT to GRUB_PAGE_SHIFT

2020-05-04 Thread Daniel Kiper
..to avoid potential conflicts and confusion. Signed-off-by: Daniel Kiper --- grub-core/lib/i386/xen/relocator.S | 6 +++--- grub-core/lib/x86_64/xen/relocator.S | 4 ++-- grub-core/loader/i386/xen.c | 28 ++-- include/grub/i386/memory.h | 2 +- 4

[GRUB PATCH RFC 09/18] efi: Make shim_lock GUID and protocol type public

2020-05-04 Thread Daniel Kiper
The GUID will be used to properly detect and report UEFI Secure Boot status to the x86 Linux kernel. The functionality will be added by subsequent patches. The shim_lock protocol type is made public for completeness. Additionally, fix formatting of four preceding GUIDs. Signed-off-by: Daniel

[GRUB PATCH RFC 03/18] i386/msr: Extract and improve MSR support detection code

2020-05-04 Thread Daniel Kiper
GRUB_ERR_BAD_DEVICE instead of GRUB_ERR_BUG to signal an error because errors encountered by this new routine are not bugs. Signed-off-by: Daniel Kiper --- grub-core/commands/i386/rdmsr.c | 21 + grub-core/commands/i386/wrmsr.c | 21 + include/grub/i386/msr.h | 29

Re: [PATCH v2 1/3] x86/boot: Introduce the kernel_info

2019-10-02 Thread Daniel Kiper
On Tue, Oct 01, 2019 at 03:28:01PM -0700, H. Peter Anvin wrote: > On 2019-10-01 04:41, Daniel Kiper wrote: > > > > OK, so, this is more or less what I had in my v3 patch before sending > > this email. So, it looks that I am on good track. Great! Though I am not > > sur

Re: [PATCH RFC 1/2] x86/boot: Introduce the setup_header2

2019-06-14 Thread Daniel Kiper
I am working on new version of patches but I have some concerns. Please look below for more details... On Thu, Jun 06, 2019 at 03:06:30PM -0700, H. Peter Anvin wrote: > On 5/24/19 2:55 AM, Daniel Kiper wrote: > > Due to limited space left in the setup header it was decided to >

Re: [PATCH RFC 0/2] x86/boot: Introduce the setup_header2

2019-06-06 Thread Daniel Kiper
On Thu, Jun 06, 2019 at 01:30:46PM -0400, Konrad Rzeszutek Wilk wrote: > On Thu, Jun 06, 2019 at 01:51:08PM +0200, Daniel Kiper wrote: > > On Wed, Jun 05, 2019 at 10:01:17AM -0400, Konrad Rzeszutek Wilk wrote: > > > On Wed, Jun 05, 2019 at 03:50:31PM +0200, Daniel Kiper wrote: &

Re: [PATCH RFC 0/2] x86/boot: Introduce the setup_header2

2019-06-06 Thread Daniel Kiper
On Wed, Jun 05, 2019 at 10:01:17AM -0400, Konrad Rzeszutek Wilk wrote: > On Wed, Jun 05, 2019 at 03:50:31PM +0200, Daniel Kiper wrote: > > On Fri, May 24, 2019 at 11:55:02AM +0200, Daniel Kiper wrote: > > > Hi, > > > > > > This change is needed to properly

Re: [PATCH RFC 0/2] x86/boot: Introduce the setup_header2

2019-06-05 Thread Daniel Kiper
On Fri, May 24, 2019 at 11:55:02AM +0200, Daniel Kiper wrote: > Hi, > > This change is needed to properly start the Linux kernel in Intel TXT mode and > is a part of the TrenchBoot project (https://github.com/TrenchBoot). > > Daniel > > Documentation/x86/boo

[PATCH RFC 1/2] x86/boot: Introduce the setup_header2

2019-05-24 Thread Daniel Kiper
-by: Daniel Kiper Reviewed-by: Ross Philipson Reviewed-by: Eric Snowberg --- I know that setup_header2 is not the best name. There were some alternatives proposed like setup_header_extra, setup_header_addendum, setup_header_more, ext_setup_header, extended_setup_header, extended_header

[PATCH RFC 0/2] x86/boot: Introduce the setup_header2

2019-05-24 Thread Daniel Kiper
| 3 ++- arch/x86/boot/tools/build.c | 8 arch/x86/include/uapi/asm/bootparam.h| 1 + 9 files changed, 123 insertions(+), 4 deletions(-) Daniel Kiper (2): x86/boot: Introduce the setup_header2 x86/boot: Introduce dummy MLE header

[PATCH RFC 2/2] x86/boot: Introduce dummy MLE header

2019-05-24 Thread Daniel Kiper
DO NOT APPLY!!! THIS PATCH INTRODUCES DUMMY MLE HEADER AND SIMPLY ILLUSTRATES HOW TO EXTEND THE setup_header2 PROPERLY. DO NOT APPLY!!! Signed-off-by: Ross Philipson Signed-off-by: Daniel Kiper Reviewed-by: Ross Philipson --- Documentation/x86/boot.txt | 6 ++ arch/x86

Re: [PATCH 0/1] [RFC] Secure Launch boot protocol

2019-03-28 Thread Daniel Kiper
On Thu, Mar 28, 2019 at 11:15:53AM -0700, H. Peter Anvin wrote: > So, per our conversation today, lets create a new, readonly, data structure > pointed to by a single field in setup_header, in order to preserve what little > space we have left in that structure (a whopping 24 bytes...) > > The new

Re: [PATCH] doc: add boot protocol 2.13 description to Documentation/x86/boot.txt

2019-03-08 Thread Daniel Kiper
On Fri, Mar 08, 2019 at 12:43:10PM +0100, Juergen Gross wrote: > Documentation/x86/boot.txt is missing protocol 2.13 description. > > Signed-off-by: Juergen Gross Reviewed-by: Daniel Kiper Daniel

[tip:efi/core] x86/xen/efi: Initialize UEFI secure boot state during dom0 boot

2018-05-14 Thread tip-bot for Daniel Kiper
Commit-ID: a7012bdbdf406bbaa4e3de0cc3d8eb0faaacbf93 Gitweb: https://git.kernel.org/tip/a7012bdbdf406bbaa4e3de0cc3d8eb0faaacbf93 Author: Daniel Kiper <daniel.ki...@oracle.com> AuthorDate: Fri, 4 May 2018 07:59:47 +0200 Committer: Ingo Molnar <mi...@kernel.org> CommitDate: Mon,

[tip:efi/core] x86/xen/efi: Initialize UEFI secure boot state during dom0 boot

2018-05-14 Thread tip-bot for Daniel Kiper
Commit-ID: a7012bdbdf406bbaa4e3de0cc3d8eb0faaacbf93 Gitweb: https://git.kernel.org/tip/a7012bdbdf406bbaa4e3de0cc3d8eb0faaacbf93 Author: Daniel Kiper AuthorDate: Fri, 4 May 2018 07:59:47 +0200 Committer: Ingo Molnar CommitDate: Mon, 14 May 2018 08:57:46 +0200 x86/xen/efi: Initialize

Re: [PATCH v2] x86/xen/efi: Initialize UEFI secure boot state during dom0 boot

2018-04-16 Thread Daniel Kiper
On Mon, Apr 16, 2018 at 10:15:15AM +0200, Ard Biesheuvel wrote: > On 11 April 2018 at 10:56, Daniel Kiper <daniel.ki...@oracle.com> wrote: > > On Wed, Apr 04, 2018 at 12:38:24PM +0200, Daniel Kiper wrote: > >> On Tue, Apr 03, 2018 at 10:00:52AM -0700, James Bottomley wrote

Re: [PATCH v2] x86/xen/efi: Initialize UEFI secure boot state during dom0 boot

2018-04-16 Thread Daniel Kiper
On Mon, Apr 16, 2018 at 10:15:15AM +0200, Ard Biesheuvel wrote: > On 11 April 2018 at 10:56, Daniel Kiper wrote: > > On Wed, Apr 04, 2018 at 12:38:24PM +0200, Daniel Kiper wrote: > >> On Tue, Apr 03, 2018 at 10:00:52AM -0700, James Bottomley wrote: > >> > On Tue, 201

Re: [PATCH v2] x86/xen/efi: Initialize UEFI secure boot state during dom0 boot

2018-04-11 Thread Daniel Kiper
On Wed, Apr 04, 2018 at 12:38:24PM +0200, Daniel Kiper wrote: > On Tue, Apr 03, 2018 at 10:00:52AM -0700, James Bottomley wrote: > > On Tue, 2018-04-03 at 18:07 +0200, Daniel Kiper wrote: > > > On Tue, Apr 03, 2018 at 08:44:41AM -0700, James Bottomley wrote: > > [...] &

Re: [PATCH v2] x86/xen/efi: Initialize UEFI secure boot state during dom0 boot

2018-04-11 Thread Daniel Kiper
On Wed, Apr 04, 2018 at 12:38:24PM +0200, Daniel Kiper wrote: > On Tue, Apr 03, 2018 at 10:00:52AM -0700, James Bottomley wrote: > > On Tue, 2018-04-03 at 18:07 +0200, Daniel Kiper wrote: > > > On Tue, Apr 03, 2018 at 08:44:41AM -0700, James Bottomley wrote: > > [...] &

Re: [PATCH v2] x86/xen/efi: Initialize UEFI secure boot state during dom0 boot

2018-04-04 Thread Daniel Kiper
On Tue, Apr 03, 2018 at 10:00:52AM -0700, James Bottomley wrote: > On Tue, 2018-04-03 at 18:07 +0200, Daniel Kiper wrote: > > On Tue, Apr 03, 2018 at 08:44:41AM -0700, James Bottomley wrote: [...] > > > This looks like a bad idea: you're duplicating the secur

Re: [PATCH v2] x86/xen/efi: Initialize UEFI secure boot state during dom0 boot

2018-04-04 Thread Daniel Kiper
On Tue, Apr 03, 2018 at 10:00:52AM -0700, James Bottomley wrote: > On Tue, 2018-04-03 at 18:07 +0200, Daniel Kiper wrote: > > On Tue, Apr 03, 2018 at 08:44:41AM -0700, James Bottomley wrote: [...] > > > This looks like a bad idea: you're duplicating the secur

Re: [PATCH v2] x86/xen/efi: Initialize UEFI secure boot state during dom0 boot

2018-04-03 Thread Daniel Kiper
On Tue, Apr 03, 2018 at 08:44:41AM -0700, James Bottomley wrote: > On Tue, 2018-04-03 at 16:39 +0200, Daniel Kiper wrote: > > Initialize UEFI secure boot state during dom0 boot. Otherwise the > > kernel > > may not even know that it runs on secure boot enabled platfor

Re: [PATCH v2] x86/xen/efi: Initialize UEFI secure boot state during dom0 boot

2018-04-03 Thread Daniel Kiper
On Tue, Apr 03, 2018 at 08:44:41AM -0700, James Bottomley wrote: > On Tue, 2018-04-03 at 16:39 +0200, Daniel Kiper wrote: > > Initialize UEFI secure boot state during dom0 boot. Otherwise the > > kernel > > may not even know that it runs on secure boot enabled platfor

[PATCH v2] x86/xen/efi: Initialize UEFI secure boot state during dom0 boot

2018-04-03 Thread Daniel Kiper
Initialize UEFI secure boot state during dom0 boot. Otherwise the kernel may not even know that it runs on secure boot enabled platform. Signed-off-by: Daniel Kiper <daniel.ki...@oracle.com> --- arch/x86/xen/efi.c| 57 + drivers/firmwa

[PATCH v2] x86/xen/efi: Initialize UEFI secure boot state during dom0 boot

2018-04-03 Thread Daniel Kiper
Initialize UEFI secure boot state during dom0 boot. Otherwise the kernel may not even know that it runs on secure boot enabled platform. Signed-off-by: Daniel Kiper --- arch/x86/xen/efi.c| 57 + drivers/firmware/efi/libstub/secureboot.c

Re: [PATCH] x86: vmx: Allow direct access to MSR_IA32_SPEC_CTRL

2018-01-29 Thread Daniel Kiper
be automatic on > > vmexit, by having it *only* in the guest's MSR-store area to be saved > > on exit and restored on exit, but *not* in the host's MSR-store area? s/on exit and restored on exit/on exit and restored on entry/? Additionally, AIUI there is no "host's MSR-st

Re: [PATCH] x86: vmx: Allow direct access to MSR_IA32_SPEC_CTRL

2018-01-29 Thread Daniel Kiper
be automatic on > > vmexit, by having it *only* in the guest's MSR-store area to be saved > > on exit and restored on exit, but *not* in the host's MSR-store area? s/on exit and restored on exit/on exit and restored on entry/? Additionally, AIUI there is no "host's MSR-st

Re: [PATCH 0/4] x86/xen/efi: Initialize UEFI secure boot state during dom0 boot

2018-01-12 Thread Daniel Kiper
Hi Ard, On Thu, Jan 11, 2018 at 12:51:07PM +, Ard Biesheuvel wrote: > On 9 January 2018 at 14:22, Daniel Kiper <daniel.ki...@oracle.com> wrote: > > Hi, > > > > Initialize UEFI secure boot state during dom0 boot. Otherwise the kernel > > may not even know th

Re: [PATCH 0/4] x86/xen/efi: Initialize UEFI secure boot state during dom0 boot

2018-01-12 Thread Daniel Kiper
Hi Ard, On Thu, Jan 11, 2018 at 12:51:07PM +, Ard Biesheuvel wrote: > On 9 January 2018 at 14:22, Daniel Kiper wrote: > > Hi, > > > > Initialize UEFI secure boot state during dom0 boot. Otherwise the kernel > > may not even know that it runs on secure boot enab

[PATCH 1/4] efi/stub: Extract efi_get_secureboot() to separate file

2018-01-09 Thread Daniel Kiper
code. Subsequent patch will add efi_get_secureboot() call from Xen dom0 boot code. There is no functional change. Signed-off-by: Daniel Kiper <daniel.ki...@oracle.com> --- drivers/firmware/efi/libstub/secureboot-core.c | 77 drivers/firmware/efi/libstub/secure

[PATCH 1/4] efi/stub: Extract efi_get_secureboot() to separate file

2018-01-09 Thread Daniel Kiper
code. Subsequent patch will add efi_get_secureboot() call from Xen dom0 boot code. There is no functional change. Signed-off-by: Daniel Kiper --- drivers/firmware/efi/libstub/secureboot-core.c | 77 drivers/firmware/efi/libstub/secureboot.c | 66

[PATCH 2/4] x86/xen/efi: Initialize boot_params.secure_boot in xen_efi_init()

2018-01-09 Thread Daniel Kiper
Otherwise the kernel reports incorrect UEFI secure boot state in the Xen dom0. By the way fix CFLAGS_mmu_pv.o assignment alignment. Signed-off-by: Daniel Kiper <daniel.ki...@oracle.com> --- arch/x86/xen/Makefile |4 +++- arch/x86/xen/efi.c| 11 +++ 2 files chang

[PATCH 2/4] x86/xen/efi: Initialize boot_params.secure_boot in xen_efi_init()

2018-01-09 Thread Daniel Kiper
Otherwise the kernel reports incorrect UEFI secure boot state in the Xen dom0. By the way fix CFLAGS_mmu_pv.o assignment alignment. Signed-off-by: Daniel Kiper --- arch/x86/xen/Makefile |4 +++- arch/x86/xen/efi.c| 11 +++ 2 files changed, 14 insertions(+), 1 deletion

[PATCH 3/4] efi: Tweak efi_get_secureboot() and its data section assignment

2018-01-09 Thread Daniel Kiper
Otherwise they are not freed after the kernel proper init. Signed-off-by: Daniel Kiper <daniel.ki...@oracle.com> --- arch/x86/xen/efi.c |3 +++ drivers/firmware/efi/libstub/secureboot-core.c | 12 ++-- drivers/firmware/efi/libstub/secure

[PATCH 3/4] efi: Tweak efi_get_secureboot() and its data section assignment

2018-01-09 Thread Daniel Kiper
Otherwise they are not freed after the kernel proper init. Signed-off-by: Daniel Kiper --- arch/x86/xen/efi.c |3 +++ drivers/firmware/efi/libstub/secureboot-core.c | 12 ++-- drivers/firmware/efi/libstub/secureboot.c |3 +++ 3 files changed

[PATCH 0/4] x86/xen/efi: Initialize UEFI secure boot state during dom0 boot

2018-01-09 Thread Daniel Kiper
/efi/libstub/secureboot-core.c | 77 + drivers/firmware/efi/libstub/secureboot.c | 66 +-- 4 files changed, 99 insertions(+), 62 deletions(-) Daniel Kiper (4

[PATCH 4/4] efi: Rename efi_get_secureboot() to __efi_get_secureboot() and make it static

2018-01-09 Thread Daniel Kiper
This may help compiler to do some function call optimization. This is rather cosmetic. If you like this patch apply. If you do not you may ignore it. Signed-off-by: Daniel Kiper <daniel.ki...@oracle.com> --- arch/x86/xen/efi.c |2 +- drivers/firmware/efi/l

[PATCH 0/4] x86/xen/efi: Initialize UEFI secure boot state during dom0 boot

2018-01-09 Thread Daniel Kiper
/efi/libstub/secureboot-core.c | 77 + drivers/firmware/efi/libstub/secureboot.c | 66 +-- 4 files changed, 99 insertions(+), 62 deletions(-) Daniel Kiper (4

[PATCH 4/4] efi: Rename efi_get_secureboot() to __efi_get_secureboot() and make it static

2018-01-09 Thread Daniel Kiper
This may help compiler to do some function call optimization. This is rather cosmetic. If you like this patch apply. If you do not you may ignore it. Signed-off-by: Daniel Kiper --- arch/x86/xen/efi.c |2 +- drivers/firmware/efi/libstub/secureboot-core.c |2

Re: [PATCH 4.12 26/84] x86/xen/efi: Initialize only the EFI struct members used by Xen

2017-07-20 Thread Daniel Kiper
On Thu, Jul 20, 2017 at 11:16:39AM +0200, Greg Kroah-Hartman wrote: > On Thu, Jul 20, 2017 at 10:39:10AM +0200, Ingo Molnar wrote: > > > > * Daniel Kiper <daniel.ki...@oracle.com> wrote: > > > > > Hey Greg, > > > > > > On Wed, Jul

Re: [PATCH 4.12 26/84] x86/xen/efi: Initialize only the EFI struct members used by Xen

2017-07-20 Thread Daniel Kiper
On Thu, Jul 20, 2017 at 11:16:39AM +0200, Greg Kroah-Hartman wrote: > On Thu, Jul 20, 2017 at 10:39:10AM +0200, Ingo Molnar wrote: > > > > * Daniel Kiper wrote: > > > > > Hey Greg, > > > > > > On Wed, Jul 19, 2017 at 11:43:32AM +0200, Greg Kroah

Re: [PATCH 4.12 26/84] x86/xen/efi: Initialize only the EFI struct members used by Xen

2017-07-19 Thread Daniel Kiper
On Wed, Jul 19, 2017 at 01:19:58PM +0200, Greg Kroah-Hartman wrote: > On Wed, Jul 19, 2017 at 01:12:14PM +0200, Greg Kroah-Hartman wrote: > > On Wed, Jul 19, 2017 at 12:37:47PM +0200, Daniel Kiper wrote: > > > Hey Greg, > > > > > > On Wed, Jul 19, 2017 at 11:43:

Re: [PATCH 4.12 26/84] x86/xen/efi: Initialize only the EFI struct members used by Xen

2017-07-19 Thread Daniel Kiper
On Wed, Jul 19, 2017 at 01:19:58PM +0200, Greg Kroah-Hartman wrote: > On Wed, Jul 19, 2017 at 01:12:14PM +0200, Greg Kroah-Hartman wrote: > > On Wed, Jul 19, 2017 at 12:37:47PM +0200, Daniel Kiper wrote: > > > Hey Greg, > > > > > > On Wed, Jul 19, 2017 at 11:43:

Re: [PATCH 4.12 26/84] x86/xen/efi: Initialize only the EFI struct members used by Xen

2017-07-19 Thread Daniel Kiper
On Wed, Jul 19, 2017 at 01:12:14PM +0200, Greg Kroah-Hartman wrote: > On Wed, Jul 19, 2017 at 12:37:47PM +0200, Daniel Kiper wrote: > > Hey Greg, > > > > On Wed, Jul 19, 2017 at 11:43:32AM +0200, Greg Kroah-Hartman wrote: > > > 4.12-stable review patch. If anyone has

Re: [PATCH 4.12 26/84] x86/xen/efi: Initialize only the EFI struct members used by Xen

2017-07-19 Thread Daniel Kiper
On Wed, Jul 19, 2017 at 01:12:14PM +0200, Greg Kroah-Hartman wrote: > On Wed, Jul 19, 2017 at 12:37:47PM +0200, Daniel Kiper wrote: > > Hey Greg, > > > > On Wed, Jul 19, 2017 at 11:43:32AM +0200, Greg Kroah-Hartman wrote: > > > 4.12-stable review patch. If anyone has

Re: [PATCH 4.12 26/84] x86/xen/efi: Initialize only the EFI struct members used by Xen

2017-07-19 Thread Daniel Kiper
Hey Greg, On Wed, Jul 19, 2017 at 11:43:32AM +0200, Greg Kroah-Hartman wrote: > 4.12-stable review patch. If anyone has any objections, please let me know. Why did you skip this patch for 4.11? IMO it should be applied there too. Daniel

Re: [PATCH 4.12 26/84] x86/xen/efi: Initialize only the EFI struct members used by Xen

2017-07-19 Thread Daniel Kiper
Hey Greg, On Wed, Jul 19, 2017 at 11:43:32AM +0200, Greg Kroah-Hartman wrote: > 4.12-stable review patch. If anyone has any objections, please let me know. Why did you skip this patch for 4.11? IMO it should be applied there too. Daniel

[tip:efi/core] x86/xen/efi: Initialize only the EFI struct members used by Xen

2017-06-23 Thread tip-bot for Daniel Kiper
Commit-ID: 6c64447ec58b0bac612732303f7ab04562124587 Gitweb: http://git.kernel.org/tip/6c64447ec58b0bac612732303f7ab04562124587 Author: Daniel Kiper <daniel.ki...@oracle.com> AuthorDate: Thu, 22 Jun 2017 12:51:37 +0200 Committer: Ingo Molnar <mi...@kernel.org> CommitDate: Fri,

[tip:efi/core] x86/xen/efi: Initialize only the EFI struct members used by Xen

2017-06-23 Thread tip-bot for Daniel Kiper
Commit-ID: 6c64447ec58b0bac612732303f7ab04562124587 Gitweb: http://git.kernel.org/tip/6c64447ec58b0bac612732303f7ab04562124587 Author: Daniel Kiper AuthorDate: Thu, 22 Jun 2017 12:51:37 +0200 Committer: Ingo Molnar CommitDate: Fri, 23 Jun 2017 11:11:03 +0200 x86/xen/efi: Initialize

[tip:efi/core] efi: Process the MEMATTR table only if EFI_MEMMAP is enabled

2017-06-23 Thread tip-bot for Daniel Kiper
Commit-ID: 457ea3f7e97881f937136ce0ba1f29f82b9abdb0 Gitweb: http://git.kernel.org/tip/457ea3f7e97881f937136ce0ba1f29f82b9abdb0 Author: Daniel Kiper <daniel.ki...@oracle.com> AuthorDate: Thu, 22 Jun 2017 12:51:36 +0200 Committer: Ingo Molnar <mi...@kernel.org> CommitDate: Fri,

[tip:efi/core] efi: Process the MEMATTR table only if EFI_MEMMAP is enabled

2017-06-23 Thread tip-bot for Daniel Kiper
Commit-ID: 457ea3f7e97881f937136ce0ba1f29f82b9abdb0 Gitweb: http://git.kernel.org/tip/457ea3f7e97881f937136ce0ba1f29f82b9abdb0 Author: Daniel Kiper AuthorDate: Thu, 22 Jun 2017 12:51:36 +0200 Committer: Ingo Molnar CommitDate: Fri, 23 Jun 2017 11:11:02 +0200 efi: Process the MEMATTR

[PATCH v2 2/2] x86/xen/efi: Init only efi struct members used by Xen

2017-06-22 Thread Daniel Kiper
used by Xen to avoid such issues in the future. Signed-off-by: Daniel Kiper <daniel.ki...@oracle.com> Acked-by: Ard Biesheuvel <ard.biesheu...@linaro.org> -- Align assignments to increase readability. Suggested by Ingo Molnar. --- arch/x86/xen/

[PATCH v2 2/2] x86/xen/efi: Init only efi struct members used by Xen

2017-06-22 Thread Daniel Kiper
used by Xen to avoid such issues in the future. Signed-off-by: Daniel Kiper Acked-by: Ard Biesheuvel -- Align assignments to increase readability. Suggested by Ingo Molnar. --- arch/x86/xen/efi.c | 45 - 1 file changed, 12 insertions(+), 33 deletions

[PATCH v2 1/2] efi: Process MEMATTR table only if EFI_MEMMAP

2017-06-22 Thread Daniel Kiper
Otherwise e.g. Xen dom0 on x86_64 EFI platforms crashes. In theory we can check EFI_PARAVIRT too, however, EFI_MEMMAP looks more generic and covers more cases. Signed-off-by: Daniel Kiper <daniel.ki...@oracle.com> Reviewed-by: Ard Biesheuvel <ard.biesheu...@linaro.org> --- drivers/

[PATCH v2 1/2] efi: Process MEMATTR table only if EFI_MEMMAP

2017-06-22 Thread Daniel Kiper
Otherwise e.g. Xen dom0 on x86_64 EFI platforms crashes. In theory we can check EFI_PARAVIRT too, however, EFI_MEMMAP looks more generic and covers more cases. Signed-off-by: Daniel Kiper Reviewed-by: Ard Biesheuvel --- drivers/firmware/efi/efi.c |3 ++- 1 file changed, 2 insertions(+), 1

[PATCH v2 0/2] xen/efi: Fixes

2017-06-22 Thread Daniel Kiper
- drivers/firmware/efi/efi.c |3 ++- 2 files changed, 14 insertions(+), 34 deletions(-) Daniel Kiper (2): efi: Process MEMATTR table only if EFI_MEMMAP x86/xen/efi: Init only efi struct members used by Xen

[PATCH v2 0/2] xen/efi: Fixes

2017-06-22 Thread Daniel Kiper
- drivers/firmware/efi/efi.c |3 ++- 2 files changed, 14 insertions(+), 34 deletions(-) Daniel Kiper (2): efi: Process MEMATTR table only if EFI_MEMMAP x86/xen/efi: Init only efi struct members used by Xen

Re: [PATCH 2/2] x86/xen/efi: Init only efi struct members used by Xen

2017-06-21 Thread Daniel Kiper
On Wed, Jun 21, 2017 at 11:24:06AM +0200, Ingo Molnar wrote: > > * Daniel Kiper <daniel.ki...@oracle.com> wrote: > > > -static const struct efi efi_xen __initconst = { > > - .systab = NULL, /* Initialized later. */ > > - .runtime_version

Re: [PATCH 2/2] x86/xen/efi: Init only efi struct members used by Xen

2017-06-21 Thread Daniel Kiper
On Wed, Jun 21, 2017 at 11:24:06AM +0200, Ingo Molnar wrote: > > * Daniel Kiper wrote: > > > -static const struct efi efi_xen __initconst = { > > - .systab = NULL, /* Initialized later. */ > > - .runtime_version = 0,/* Initial

Re: [Xen-devel] [PATCH 2/2] x86/xen/efi: Init only efi struct members used by Xen

2017-06-21 Thread Daniel Kiper
On Wed, Jun 21, 2017 at 09:10:51AM +0100, Andrew Cooper wrote: > On 20/06/2017 21:14, Daniel Kiper wrote: > > Current approach, wholesale efi struct initialization from efi_xen, is not > > good. Usually if new member is defined then it is properly initialized in > > drive

Re: [Xen-devel] [PATCH 2/2] x86/xen/efi: Init only efi struct members used by Xen

2017-06-21 Thread Daniel Kiper
On Wed, Jun 21, 2017 at 09:10:51AM +0100, Andrew Cooper wrote: > On 20/06/2017 21:14, Daniel Kiper wrote: > > Current approach, wholesale efi struct initialization from efi_xen, is not > > good. Usually if new member is defined then it is properly initialized in > > drive

[PATCH 2/2] x86/xen/efi: Init only efi struct members used by Xen

2017-06-20 Thread Daniel Kiper
used by Xen to avoid such issues in the future. Signed-off-by: Daniel Kiper <daniel.ki...@oracle.com> --- arch/x86/xen/efi.c | 45 - 1 file changed, 12 insertions(+), 33 deletions(-) diff --git a/arch/x86/xen/efi.c b/arch/x86/xen/efi.c index 3

[PATCH 2/2] x86/xen/efi: Init only efi struct members used by Xen

2017-06-20 Thread Daniel Kiper
used by Xen to avoid such issues in the future. Signed-off-by: Daniel Kiper --- arch/x86/xen/efi.c | 45 - 1 file changed, 12 insertions(+), 33 deletions(-) diff --git a/arch/x86/xen/efi.c b/arch/x86/xen/efi.c index 30bb2e8..01b9faf 100644 --- a/arch

[PATCH 1/2] efi: Process MEMATTR table only if EFI_MEMMAP

2017-06-20 Thread Daniel Kiper
Otherwise e.g. Xen dom0 on x86_64 EFI platforms crashes. In theory we can check EFI_PARAVIRT too, however, EFI_MEMMAP looks more generic and covers more cases. Signed-off-by: Daniel Kiper <daniel.ki...@oracle.com> --- drivers/firmware/efi/efi.c |3 ++- 1 file changed, 2 insertions

[PATCH 1/2] efi: Process MEMATTR table only if EFI_MEMMAP

2017-06-20 Thread Daniel Kiper
Otherwise e.g. Xen dom0 on x86_64 EFI platforms crashes. In theory we can check EFI_PARAVIRT too, however, EFI_MEMMAP looks more generic and covers more cases. Signed-off-by: Daniel Kiper --- drivers/firmware/efi/efi.c |3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git

[PATCH 0/2] xen/efi: Fixes

2017-06-20 Thread Daniel Kiper
insertions(+), 34 deletions(-) Daniel Kiper (2): efi: Process MEMATTR table only if EFI_MEMMAP x86/xen/efi: Init only efi struct members used by Xen

[PATCH 0/2] xen/efi: Fixes

2017-06-20 Thread Daniel Kiper
insertions(+), 34 deletions(-) Daniel Kiper (2): efi: Process MEMATTR table only if EFI_MEMMAP x86/xen/efi: Init only efi struct members used by Xen

Re: [PATCH] arm64: xen: Implement EFI reset_system callback

2017-04-19 Thread Daniel Kiper
On Wed, Apr 19, 2017 at 08:37:38PM +0100, Matt Fleming wrote: > On Wed, 19 Apr, at 09:29:06PM, Daniel Kiper wrote: > > On Tue, Apr 18, 2017 at 02:46:50PM +0100, Matt Fleming wrote: > > > On Thu, 06 Apr, at 04:55:11PM, Mark Rutland wrote: > > > > > > >

Re: [PATCH] arm64: xen: Implement EFI reset_system callback

2017-04-19 Thread Daniel Kiper
On Wed, Apr 19, 2017 at 08:37:38PM +0100, Matt Fleming wrote: > On Wed, 19 Apr, at 09:29:06PM, Daniel Kiper wrote: > > On Tue, Apr 18, 2017 at 02:46:50PM +0100, Matt Fleming wrote: > > > On Thu, 06 Apr, at 04:55:11PM, Mark Rutland wrote: > > > > > > >

Re: [PATCH] arm64: xen: Implement EFI reset_system callback

2017-04-19 Thread Daniel Kiper
On Tue, Apr 18, 2017 at 02:46:50PM +0100, Matt Fleming wrote: > On Thu, 06 Apr, at 04:55:11PM, Mark Rutland wrote: > > > > Please, let's keep the Xen knowledge constrained to the Xen EFI wrapper, > > rather than spreading it further. > > > > IMO, given reset_system is a *mandatory* function, the

Re: [PATCH] arm64: xen: Implement EFI reset_system callback

2017-04-19 Thread Daniel Kiper
On Tue, Apr 18, 2017 at 02:46:50PM +0100, Matt Fleming wrote: > On Thu, 06 Apr, at 04:55:11PM, Mark Rutland wrote: > > > > Please, let's keep the Xen knowledge constrained to the Xen EFI wrapper, > > rather than spreading it further. > > > > IMO, given reset_system is a *mandatory* function, the

Re: [Xen-devel] [PATCH v2] xen, kdump: handle pv domain in paddr_vmcoreinfo_note()

2017-04-14 Thread Daniel Kiper
On Fri, Apr 14, 2017 at 06:53:36PM +0200, Petr Tesarik wrote: > On Tue, 11 Apr 2017 19:20:08 +0200 > Daniel Kiper <daniel.ki...@oracle.com> wrote: > > On Tue, Apr 11, 2017 at 04:59:16PM +0200, Petr Tesarik wrote: > >[...] > > > Tested-by: Petr Tesarik <pte

Re: [Xen-devel] [PATCH v2] xen, kdump: handle pv domain in paddr_vmcoreinfo_note()

2017-04-14 Thread Daniel Kiper
On Fri, Apr 14, 2017 at 06:53:36PM +0200, Petr Tesarik wrote: > On Tue, 11 Apr 2017 19:20:08 +0200 > Daniel Kiper wrote: > > On Tue, Apr 11, 2017 at 04:59:16PM +0200, Petr Tesarik wrote: > >[...] > > > Tested-by: Petr Tesarik > > > > > > I copied the

Re: [Xen-devel] [PATCH v2] xen, kdump: handle pv domain in paddr_vmcoreinfo_note()

2017-04-11 Thread Daniel Kiper
On Tue, Apr 11, 2017 at 04:59:16PM +0200, Petr Tesarik wrote: > On Tue, 11 Apr 2017 15:00:58 +0200 > Daniel Kiper <daniel.ki...@oracle.com> wrote: > > > On Tue, Apr 11, 2017 at 02:45:43PM +0200, Juergen Gross wrote: > > > On 03/04/17 14:42, Daniel Kiper wrote: > &g

  1   2   3   4   5   6   7   >