Re: [GIT PULL] hash addresses printed with %p

2017-12-01 Thread Ard Biesheuvel
On 1 December 2017 at 09:48, Greg Kroah-Hartman <gre...@linuxfoundation.org> wrote: > On Thu, Nov 30, 2017 at 05:18:42PM +0000, Ard Biesheuvel wrote: >> On 30 November 2017 at 17:10, Greg Kroah-Hartman >> <gre...@linuxfoundation.org> wrote: >> > On Thu, Nov 30,

Re: [PATCH] efi: move some sysfs files to be read-only by root

2017-12-05 Thread Ard Biesheuvel
() macro to > make this easier, and use it in other places at the same time. > > Reported-by: Linus Torvalds <torva...@linux-foundation.org> > Tested-by: Dave Young <dyo...@redhat.com> > Cc: Matt Fleming <m...@codeblueprint.co.uk> > Cc: Ard Biesheuvel <ard.bi

Re: arm64 crashkernel fails to boot on acpi-only machines due to ACPI regions being no longer mapped as NOMAP

2017-12-13 Thread Ard Biesheuvel
On 13 December 2017 at 10:26, AKASHI Takahiro wrote: > Bhupesh, Ard, > > On Wed, Dec 13, 2017 at 03:21:59AM +0530, Bhupesh Sharma wrote: >> Hi Ard, Akashi >> > (snip) > >> Looking deeper into the issue, since the arm64 kexec-tools uses the >>

Re: [PATCH V3 0/2] CPER ARM error information parsing

2017-12-18 Thread Ard Biesheuvel
s good to me. Although I haven't cross referenced every little detail with the spec: Reviewed-by: Ard Biesheuvel <ard.biesheu...@linaro.org> -- To unsubscribe from this list: send the line "unsubscribe linux-efi" in the body of a message to majord...@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html

Re: arm64 crashkernel fails to boot on acpi-only machines due to ACPI regions being no longer mapped as NOMAP

2017-12-19 Thread Ard Biesheuvel
On 19 December 2017 at 07:09, AKASHI Takahiro <takahiro.aka...@linaro.org> wrote: > On Mon, Dec 18, 2017 at 01:40:09PM +0800, Dave Young wrote: >> On 12/15/17 at 05:59pm, AKASHI Takahiro wrote: >> > On Wed, Dec 13, 2017 at 12:17:22PM +, Ard Biesheuvel wrote: >> &g

Re: arm64 crashkernel fails to boot on acpi-only machines due to ACPI regions being no longer mapped as NOMAP

2017-12-15 Thread Ard Biesheuvel
On 15 December 2017 at 09:59, AKASHI Takahiro <takahiro.aka...@linaro.org> wrote: > On Wed, Dec 13, 2017 at 12:17:22PM +0000, Ard Biesheuvel wrote: >> On 13 December 2017 at 12:16, AKASHI Takahiro >> <takahiro.aka...@linaro.org> wrote: >> > On Wed, Dec 13, 2017

Re: [PATCH] efi: make EFI a menuconfig to ease disabling it all

2017-12-15 Thread Ard Biesheuvel
On 15 December 2017 at 16:19, Matt Fleming wrote: > On Sat, 09 Dec, at 04:52:52PM, Vincent Legoll wrote: >> No need to get into the submenu to disable all related >> config entries. >> >> This makes it easier to disable all EFI config options >> without entering the

Re: arm64 crashkernel fails to boot on acpi-only machines due to ACPI regions being no longer mapped as NOMAP

2017-12-13 Thread Ard Biesheuvel
On 13 December 2017 at 12:16, AKASHI Takahiro <takahiro.aka...@linaro.org> wrote: > On Wed, Dec 13, 2017 at 10:49:27AM +0000, Ard Biesheuvel wrote: >> On 13 December 2017 at 10:26, AKASHI Takahiro >> <takahiro.aka...@linaro.org> wrote: >> > Bhupesh, Ard, >

Re: arm64 crashkernel fails to boot on acpi-only machines due to ACPI regions being no longer mapped as NOMAP

2017-11-14 Thread Ard Biesheuvel
On 13 November 2017 at 09:27, AKASHI Takahiro wrote: > Hi, > > On Fri, Nov 10, 2017 at 05:41:56PM +0530, Bhupesh Sharma wrote: >> Resent with Akashi's correct email address. >> >> On Fri, Nov 10, 2017 at 5:39 PM, Bhupesh Sharma wrote: >> > Hi Ard,

Re: efi/esrt: use memunmap rather kfree to free the remapping

2017-12-05 Thread Ard Biesheuvel
On 29 October 2017 at 14:51, Pan Bian wrote: > The remapping result of memremap should be freed with memunmap, not > kfree. > > Signed-off-by: Pan Bian > --- > drivers/firmware/efi/esrt.c | 2 +- > 1 file changed, 1 insertion(+), 1 deletion(-) > > diff

Re: [PATCH v2] efi: move some sysfs files to be read-only by root

2017-12-05 Thread Ard Biesheuvel
() macro to > make this easier, and use it in other places at the same time. > > Reported-by: Linus Torvalds <torva...@linux-foundation.org> > Tested-by: Dave Young <dyo...@redhat.com> > Cc: Matt Fleming <m...@codeblueprint.co.uk> > Cc: Ard Biesheuvel <ard.bi

Re: [GIT PULL] hash addresses printed with %p

2017-12-04 Thread Ard Biesheuvel
On 4 December 2017 at 09:34, Greg Kroah-Hartman wrote: > On Mon, Dec 04, 2017 at 05:29:28PM +0800, Dave Young wrote: >> On 12/04/17 at 08:36am, Greg Kroah-Hartman wrote: >> > On Mon, Dec 04, 2017 at 10:02:16AM +0800, Dave Young wrote: >> > > +#define

Re: [GIT PULL] hash addresses printed with %p

2017-12-04 Thread Ard Biesheuvel
On 4 December 2017 at 09:59, Greg Kroah-Hartman <gre...@linuxfoundation.org> wrote: > On Mon, Dec 04, 2017 at 09:48:37AM +0000, Ard Biesheuvel wrote: >> On 4 December 2017 at 09:34, Greg Kroah-Hartman >> <gre...@linuxfoundation.org> wrote: >> > On Mon, Dec 04,

Re: [PATCH V2 1/2] efi: move ARM CPER code to new file

2017-12-07 Thread Ard Biesheuvel
Hi Tyler, On 7 December 2017 at 19:25, Tyler Baicar wrote: > The ARM CPER code is currently mixed in with the other CPER code. Move it > to a new file to separate it from the rest of the CPER code. > > Signed-off-by: Tyler Baicar > --- >

Re: [PATCH V2 1/2] efi: move ARM CPER code to new file

2017-12-11 Thread Ard Biesheuvel
On 11 December 2017 at 21:06, Tyler Baicar <tbai...@codeaurora.org> wrote: > On 12/7/2017 3:07 PM, Tyler Baicar wrote: >> >> On 12/7/2017 2:38 PM, Ard Biesheuvel wrote: >>>> >>>> diff --git a/include/linux/cper.h b/include/linux/cper.h >>>&g

[PATCH 3/3] efi: add comment to avoid future expanding of sysfs systab

2017-12-06 Thread Ard Biesheuvel
Young <dyo...@redhat.com> Reviewed-by: Greg Kroah-Hartman <gre...@linuxfoundation.org> Cc: Matt Fleming <m...@codeblueprint.co.uk> Signed-off-by: Ard Biesheuvel <ard.biesheu...@linaro.org> --- drivers/firmware/efi/efi.c | 2 ++ 1 file changed, 2 insertions(+) diff --git

[PATCH 1/3] efi: move some sysfs files to be read-only by root

2017-12-06 Thread Ard Biesheuvel
other places at the same time. Reported-by: Linus Torvalds <torva...@linux-foundation.org> Tested-by: Dave Young <dyo...@redhat.com> Cc: Matt Fleming <m...@codeblueprint.co.uk> Cc: Ard Biesheuvel <ard.biesheu...@linaro.org> Cc: stable <sta...@vger.kernel.org> Si

[PATCH 2/3] efi/esrt: use memunmap rather kfree to free the remapping

2017-12-06 Thread Ard Biesheuvel
From: Pan Bian <bianpan2...@163.com> The remapping result of memremap should be freed with memunmap, not kfree. Signed-off-by: Pan Bian <bianpan2...@163.com> Cc: Matt Fleming <m...@codeblueprint.co.uk> Cc: <sta...@vger.kernel.org> Signed-off-by: Ard Biesheuvel &l

[GIT PULL 0/3] EFI fixes for v4.15

2017-12-06 Thread Ard Biesheuvel
The following changes since commit ae64f9bd1d3621b5e60d7363bc20afb46aede215: Linux 4.15-rc2 (2017-12-03 11:01:47 -0500) are available in the git repository at: git://git.kernel.org/pub/scm/linux/kernel/git/efi/efi.git efi-urgent for you to fetch changes up to

Re: [PATCH V2 1/2] efi: move ARM CPER code to new file

2017-12-11 Thread Ard Biesheuvel
On 11 December 2017 at 21:29, Tyler Baicar <tbai...@codeaurora.org> wrote: > On 12/11/2017 4:09 PM, Ard Biesheuvel wrote: >> >> On 11 December 2017 at 21:06, Tyler Baicar <tbai...@codeaurora.org> wrote: >>> >>> On 12/7/2017 3:07 PM, Tyler Baic

[GIT PULL 0/2] EFI fixes for v4.14

2017-10-25 Thread Ard Biesheuvel
crashing on UEFI runtime services invocations after resume from hibernation on ARM Ard Biesheuvel (1): efi/libstub: arm: don't randomize runtime regions when CONFIG_HIBERNATION=y Dan Carpenter (1): efi/efi_test

[PATCH 2/2] efi/libstub: arm: don't randomize runtime regions when CONFIG_HIBERNATION=y

2017-10-25 Thread Ard Biesheuvel
. Cc: James Morse <james.mo...@arm.com> Cc: Matt Fleming <m...@codeblueprint.co.uk> Signed-off-by: Ard Biesheuvel <ard.biesheu...@linaro.org> --- drivers/firmware/efi/libstub/arm-stub.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/drivers/firmware/efi/lib

[PATCH 1/2] efi/efi_test: Prevent an Oops in efi_runtime_query_capsulecaps()

2017-10-25 Thread Ard Biesheuvel
d efi_test driver for exporting UEFI runtime service interfaces") Signed-off-by: Dan Carpenter <dan.carpen...@oracle.com> Acked-by: Ivan Hu <ivan...@canonical.com> Cc: Ard Biesheuvel <ard.biesheu...@linaro.org> Signed-off-by: Matt Fleming <m...@codeblueprint.co.uk&

[GIT PULL 0/2] EFI updates for v4.15

2017-10-25 Thread Ard Biesheuvel
string fix Ard Biesheuvel (1): arm64: efi: ignore EFI_MEMORY_XP attribute if RP and/or WP are set Arvind Yadav (1): efi/capsule-loader: pr_err() strings should end with newlines arch/arm64/kernel/efi.c | 4

[PATCH 1/2] efi/capsule-loader: pr_err() strings should end with newlines

2017-10-25 Thread Ard Biesheuvel
From: Arvind Yadav <arvind.yadav...@gmail.com> pr_err() messages should terminated with a new-line to avoid other messages being concatenated onto the end. Signed-off-by: Arvind Yadav <arvind.yadav...@gmail.com> Cc: Ard Biesheuvel <ard.biesheu...@linaro.org> Cc: J

[PATCH 2/2] arm64: efi: ignore EFI_MEMORY_XP attribute if RP and/or WP are set

2017-10-25 Thread Ard Biesheuvel
to execute) Reported-by: Stephen Boyd <sb...@codeaurora.org> Tested-by: Stephen Boyd <sb...@codeaurora.org> Cc: Matt Fleming <m...@codeblueprint.co.uk> Signed-off-by: Ard Biesheuvel <ard.biesheu...@linaro.org> --- arch/arm64/kernel/efi.c | 4 +++- 1 file changed, 3 insertions(+), 1

[PATCH 15/17] efi/x86: Ignore unrealistically large option roms

2018-05-04 Thread Ard Biesheuvel
.@redhat.com> [ardb: deduplicate 32/64 bit changes, use SZ_16M symbolic constant] Tested-by: Hans de Goede <hdego...@redhat.com> Signed-off-by: Ard Biesheuvel <ard.biesheu...@linaro.org> --- arch/x86/boot/compressed/eboot.c | 9 - 1 file changed, 8 insertions(+), 1 delet

[PATCH 16/17] efi/capsule-loader: Don't output reset log when reset flags are not set

2018-05-04 Thread Ard Biesheuvel
branch to avoid reset log output when the flags are not set. Cc: Joey Zheng <yu.zh...@hxt-semitech.com> Signed-off-by: Shunyong Yang <shunyong.y...@hxt-semitech.com> [ardb: use braces in multi-line 'if', clarify comment and commit log] Signed-off-by: Ard Biesheuvel <ard.biesheu...@lin

[PATCH 17/17] efi/libstub/arm64: handle randomized TEXT_OFFSET

2018-05-04 Thread Ard Biesheuvel
ndomization granularity") Cc: <sta...@vger.kernel.org> # v4.7+ Reported-by: Kim Phillips <kim.phill...@arm.com> Signed-off-by: Mark Rutland <mark.rutl...@arm.com> Tested-by: Kim Phillips <kim.phill...@arm.com> [ardb: clarify commit log] Signed-off-by: Ard Biesheuvel

[PATCH 05/17] efi: Decode IA32/X64 Processor Error Info Structure

2018-05-04 Thread Ard Biesheuvel
From: Yazen Ghannam <yazen.ghan...@amd.com> Print the fields in the IA32/X64 Processor Error Info Structure. Based on UEFI 2.7 Table 253. IA32/X64 Processor Error Information Structure. Signed-off-by: Yazen Ghannam <yazen.ghan...@amd.com> Signed-off-by: Ard Biesheuvel <ard.bieshe

Re: [PATCH 17/17] efi/libstub/arm64: handle randomized TEXT_OFFSET

2018-05-14 Thread Ard Biesheuvel
On 14 May 2018 at 09:00, Ingo Molnar <mi...@kernel.org> wrote: > > * Ard Biesheuvel <ard.biesheu...@linaro.org> wrote: > >> On 14 May 2018 at 08:47, Ingo Molnar <mi...@kernel.org> wrote: >> > >> > * Ard Biesheuvel <ard.biesheu...@linar

Re: [PATCH 12/17] efi: fix efi_pci_io_protocol32 prototype for mixed mode

2018-05-14 Thread Ard Biesheuvel
On 14 May 2018 at 08:57, Ingo Molnar <mi...@kernel.org> wrote: > > * Ard Biesheuvel <ard.biesheu...@linaro.org> wrote: > >> Mixed mode allows a kernel built for x86_64 to interact with 32-bit >> EFI firmware, but requires us to define all struct definitions care

Re: [PATCH] efi/x86: Clean up the eboot code a bit

2018-05-14 Thread Ard Biesheuvel
before return statements consistently. > > - Use curly braces in a balanced fashion. > > - Remove stray newlines. > > No change in functionality. > > Cc: Ard Biesheuvel <ard.biesheu...@linaro.org> > Cc: Linus Torvalds <torva...@linux-foundation.org> > Cc: Matt Flemin

Re: [PATCH 17/17] efi/libstub/arm64: handle randomized TEXT_OFFSET

2018-05-14 Thread Ard Biesheuvel
On 14 May 2018 at 08:47, Ingo Molnar <mi...@kernel.org> wrote: > > * Ard Biesheuvel <ard.biesheu...@linaro.org> wrote: > >> From: Mark Rutland <mark.rutl...@arm.com> >> >> When CONFIG_RANDOMIZE_TEXT_OFFSET is selected, TEXT_OFFSET is an >> arbi

Re: [PATCH v2] device property: Get rid of union aliasing

2018-05-14 Thread Ard Biesheuvel
onflicts to some degree with Annex J.1. > > While it's working in Linux with GCC, the use of union members to do > type punning is not clear area in the C standard and might lead to > unspecified behaviour. > > More information is available in this [1] blog post. > > [1]: https:

Re: Query regarding SetVirtualAddressMap()

2018-05-15 Thread Ard Biesheuvel
On 15 May 2018 at 09:07, Prakhya, Sai Praneeth wrote: > Hi All, > > > > I recently noticed in UEFI spec v2.7, section 2.3.4, Calling Conventions for > X64, that “All selectors set to be flat with virtual = physical address. If > the UEFI OS loader or OS used

Re: [PATCH v4 1/5] efi: Export boot-services code and data as debugfs-blobs

2018-04-27 Thread Ard Biesheuvel
On 27 April 2018 at 10:13, Hans de Goede <hdego...@redhat.com> wrote: > Hi, > > > On 26-04-18 23:35, Ard Biesheuvel wrote: >> >> On 26 April 2018 at 23:02, Hans de Goede <hdego...@redhat.com> wrote: >>> >>> Hi, >>> >>> >

Re: [PATCH v2] efi: Ignore unrealistically large option roms

2018-04-28 Thread Ard Biesheuvel
lds instead of trying to alloc mem and fail. > The UEFI spec limits the size of option ROMs to 16 MiB, so I'd prefer we use that as the upper bound instead. With that changed, Reviewed-by: Ard Biesheuvel <ard.biesheu...@linaro.org> or I can take it via the EFI tree if desired. -- Ard.

Re: [PATCH v5 2/5] efi: Add embedded peripheral firmware support

2018-05-13 Thread Ard Biesheuvel
On 13 May 2018 at 13:03, Hans de Goede <hdego...@redhat.com> wrote: > Hi, > > > On 05/04/2018 06:56 AM, Ard Biesheuvel wrote: >> >> Hi Hans, >> >> One comment below, which I missed in review before. >> >> On 29 April 2018 at 11:35, Hans d

Re: Query regarding SetVirtualAddressMap()

2018-05-18 Thread Ard Biesheuvel
On 18 May 2018 at 02:50, Prakhya, Sai Praneeth wrote: > + Ricardo > >> > > I recently noticed in UEFI spec v2.7, section 2.3.4, Calling >> > > Conventions for X64, that “All selectors set to be flat with virtual >> > > = physical address. If the UEFI OS loader or

Re: [PATCH V4 0/3] Use efi_rts_wq to invoke EFI Runtime Services

2018-05-25 Thread Ard Biesheuvel
ned-off-by: Sai Praneeth Prakhya <sai.praneeth.prak...@intel.com> > Suggested-by: Andy Lutomirski <l...@kernel.org> > Cc: Lee Chun-Yi <j...@suse.com> > Cc: Borislav Petkov <b...@alien8.de> > Cc: Tony Luck <tony.l...@intel.com> > Cc: Will Deacon <will.d

Re: [PATCH V4 0/3] Use efi_rts_wq to invoke EFI Runtime Services

2018-05-26 Thread Ard Biesheuvel
On 26 May 2018 at 01:08, Prakhya, Sai Praneeth wrote: >> > Changes from V3 to V4: >> > -- >> > 1. As suggested by Peter, use completions instead of flush_work() as the >> > former is cheaper >> > 2. Call efi_delete_dummy_variable() from

[GIT PULL 0/1] EFI fix for v4.17

2018-05-18 Thread Ard Biesheuvel
The following changes since commit 6d08b06e67cd117f6992c46611dfb4ce267cd71e: Linux 4.17-rc2 (2018-04-22 19:20:09 -0700) are available in the Git repository at: git://git.kernel.org/pub/scm/linux/kernel/git/efi/efi.git efi-urgent for you to fetch changes up to

[PATCH 1/1] efi/libstub/arm64: handle randomized TEXT_OFFSET

2018-05-18 Thread Ard Biesheuvel
ndomization granularity") Reported-by: Kim Phillips <kim.phill...@arm.com> Signed-off-by: Mark Rutland <mark.rutl...@arm.com> Tested-by: Kim Phillips <kim.phill...@arm.com> [ardb: clarify comment and commit log, drop unneeded parens] Signed-off-by: Ard Biesheuvel <ard.biesheu...@

Re: [PATCH 0/2] efi: add support for cacheable efifb mappings

2018-06-18 Thread Ard Biesheuvel
On 15 June 2018 at 18:39, Ard Biesheuvel wrote: > On 15 June 2018 at 18:38, Laszlo Ersek wrote: >> On 06/15/18 12:48, Ard Biesheuvel wrote: >>> KVM guests on ARM have special requirements when it comes to mapping >>> framebuffers: given that the host [emul

[PATCH 0/2] efi: add support for cacheable efifb mappings

2018-06-15 Thread Ard Biesheuvel
to best test this. I tried Gerd's ramfb patches against QEMU with a recent ArmVirtQemu build but I am having trouble getting my console to use the EFI framebuffer. Ard Biesheuvel (2): efi: drop type and attribute checks in efi_mem_desc_lookup() fbdev/efifb: honour UEFI memory map attributes

[PATCH 1/2] efi: drop type and attribute checks in efi_mem_desc_lookup()

2018-06-15 Thread Ard Biesheuvel
the first place. While we're at it, drop the __init annotation so that drivers can use it as well. Cc: Peter Jones Signed-off-by: Ard Biesheuvel --- arch/x86/platform/efi/quirks.c | 3 ++- drivers/firmware/efi/efi.c | 8 +--- drivers/firmware/efi/esrt.c| 5 - 3 files changed,

[PATCH 2/2] fbdev/efifb: honour UEFI memory map attributes when mapping the fb

2018-06-15 Thread Ard Biesheuvel
Jones Signed-off-by: Ard Biesheuvel --- drivers/video/fbdev/efifb.c | 52 1 file changed, 42 insertions(+), 10 deletions(-) diff --git a/drivers/video/fbdev/efifb.c b/drivers/video/fbdev/efifb.c index 46a4484e3da7..d5e0a74e6124 100644 --- a/drivers/video/fbdev/efifb.c +++ b

Re: [PATCH 0/2] efi: add support for cacheable efifb mappings

2018-06-15 Thread Ard Biesheuvel
On 15 June 2018 at 14:37, Laszlo Ersek wrote: > On 06/15/18 12:48, Ard Biesheuvel wrote: >> KVM guests on ARM have special requirements when it comes to mapping >> framebuffers: given that the host [emulating the framebuffer] uses >> cacheable accesses to read from t

Re: [PATCH 0/2] efi: add support for cacheable efifb mappings

2018-06-15 Thread Ard Biesheuvel
On 15 June 2018 at 18:38, Laszlo Ersek wrote: > On 06/15/18 12:48, Ard Biesheuvel wrote: >> KVM guests on ARM have special requirements when it comes to mapping >> framebuffers: given that the host [emulating the framebuffer] uses >> cacheable accesses to read from t

[PATCH] efi/arm: preserve early mapping of UEFI memory map longer for BGRT

2018-06-18 Thread Ard Biesheuvel
in arm_enable_runtime_services(), which executes as an early initcall, but still leaves a window where the UEFI memory map is not mapped. So move the call to efi_memmap_unmap() from efi_init() to arm_enable_runtime_services(). Signed-off-by: Ard Biesheuvel --- drivers/firmware/efi/arm-init.c| 1 - drivers

Re: [PATCH V4 0/3] Use efi_rts_wq to invoke EFI Runtime Services

2018-05-27 Thread Ard Biesheuvel
On 27 May 2018 at 07:32, Prakhya, Sai Praneeth wrote: >> > Assume some user requested to execute some non-blocking variant of >> > efi_rts and the kernel hasn't called efi_call_virt() yet, but was >> > scheduled out. IOW, even though user requests for non-blocking

Re: [PATCH v2 2/2] fbdev/efifb: honour UEFI memory map attributes when mapping the fb

2018-06-25 Thread Ard Biesheuvel
On 25 June 2018 at 18:49, Bartlomiej Zolnierkiewicz wrote: > On Monday, June 25, 2018 11:58:11 AM Ard Biesheuvel wrote: >> ,On 22 June 2018 at 09:52, Ard Biesheuvel wrote: >> > If the framebuffer address provided by the Graphics Output Protocol >> > (GOP) is cov

Re: [PATCH v2 2/2] fbdev/efifb: honour UEFI memory map attributes when mapping the fb

2018-06-25 Thread Ard Biesheuvel
,On 22 June 2018 at 09:52, Ard Biesheuvel wrote: > If the framebuffer address provided by the Graphics Output Protocol > (GOP) is covered by the UEFI memory map, it will tell us which memory > attributes are permitted when mapping this region. In some cases, > (KVM guest on ARM

[PATCH] efi/libstub/arm: add opt-in Kconfig option for the DTB loader

2018-06-25 Thread Ard Biesheuvel
options to be implemented in parallel. So let's make it an opt-in feature that is disabled by default, but can be re-enabled at will. Note that we already disable the dtb= command line option when we detect that we are running with UEFI Secure Boot enabled. Signed-off-by: Ard Biesheuvel

[RFC PATCH] x86/efi: remove pointless call to PciIo->Attributes()

2018-06-24 Thread Ard Biesheuvel
ve the call to PciIo->Attributes() entirely, which is especially nice because its prototype involves uint64_t type by-value arguments which the EFI mixed mode has trouble dealing with. Cc: Wilfried Klaebe Cc: Ingo Molnar Cc: Thomas Gleixner Cc: Lukas Wunner Cc: Hans de Goede Signed-off-by: Ard B

Re: [PATCH] efi/libstub/tpm: Initialize efi_physical_addr_t vars to zero for mixed mode

2018-06-20 Thread Ard Biesheuvel
On 19 June 2018 at 21:50, Hans de Goede wrote: > Commit 79832f0b5f71 ("efi/libstub/tpm: Initialize pointer variables to zero > for mixed mode") fixes a problem with the tpm code on mixed mode (64 bit > kernel on 32 bit UEFI), where 64-bit pointer variables are not fully > initialized by the

Re: [PATCH v2] efi/libstub/tpm: Initialize efi_physical_addr_t vars to zero for mixed mode

2018-06-21 Thread Ard Biesheuvel
On 21 June 2018 at 09:42, Hans de Goede wrote: > Commit 79832f0b5f71 ("efi/libstub/tpm: Initialize pointer variables to zero > for mixed mode") fixes a problem with the tpm code on mixed mode (64 bit > kernel on 32 bit UEFI), where 64-bit pointer variables are not fully > initialized by the

Re: [PATCH v2] efi/libstub/tpm: Initialize efi_physical_addr_t vars to zero for mixed mode

2018-06-21 Thread Ard Biesheuvel
On 21 June 2018 at 10:03, Hans de Goede wrote: > Hi, > > On 21-06-18 09:57, Ard Biesheuvel wrote: >> >> On 21 June 2018 at 09:42, Hans de Goede wrote: >>> >>> Commit 79832f0b5f71 ("efi/libstub/tpm: Initialize pointer variables to >>> zero &

Re: [RFC PATCH] x86/efi: remove pointless call to PciIo->Attributes()

2018-06-26 Thread Ard Biesheuvel
On 26 June 2018 at 14:23, Hans de Goede wrote: > Hi, > > > On 24-06-18 19:29, Ard Biesheuvel wrote: >> >> When it was first introduced, the EFI stub code that copies the >> contents of PCI option ROMs originally only intended to do so if >> the EFI_PCI

Re: [PATCH] efi/capsule-loader: Don't output reset log when header flags is not set

2018-05-02 Thread Ard Biesheuvel
On 2 May 2018 at 03:29, Yang, Shunyong <shunyong.y...@hxt-semitech.com> wrote: > Hi, Ard, > > On Tue, 2018-05-01 at 11:54 +0200, Ard Biesheuvel wrote: >> On 25 April 2018 at 05:10, Shunyong Yang <shunyong.yang@hxt-semitech. >> com> wrote: >> > >> >

Re: [PATCH v4 1/5] efi: Export boot-services code and data as debugfs-blobs

2018-04-26 Thread Ard Biesheuvel
On 26 April 2018 at 23:02, Hans de Goede <hdego...@redhat.com> wrote: > Hi, > > > On 26-04-18 18:51, Ard Biesheuvel wrote: >> >> On 26 April 2018 at 14:06, Hans de Goede <hdego...@redhat.com> wrote: >>> >>> Sometimes it is useful to b

Re: [PATCH v4 0/5] efi/firmware/platform-x86: Add EFI embedded fw support

2018-04-26 Thread Ard Biesheuvel
On 26 April 2018 at 14:06, Hans de Goede wrote: > Hi All, > > Here is v4 of my patch-set to add support for EFI embedded fw to the kernel. > > Changes since v3: > -Drop note in docs about EFI_FIRMWARE_VOLUME_PROTOCOL, it is not part of > UEFI proper, so the EFI maintainers

Re: [PATCH v4 1/5] efi: Export boot-services code and data as debugfs-blobs

2018-04-26 Thread Ard Biesheuvel
On 26 April 2018 at 14:06, Hans de Goede wrote: > Sometimes it is useful to be able to dump the efi boot-services code and > data. This commit adds these as debugfs-blobs to /sys/kernel/debug/efi, > but only if efi=debug is passed on the kernel-commandline as this requires >

Re: [PATCH 2/2] drivers: firmware: efi: install new fdt in configuration table

2018-04-26 Thread Ard Biesheuvel
018 4:20 PM >>> To: Grant Likely <grant.lik...@arm.com> >>> Cc: Udit Kumar <udit.ku...@nxp.com>; Ard Biesheuvel >>> <ard.biesheu...@linaro.org>; Pankaj Bansal <pankaj.ban...@nxp.com>; >>> mark.rutl...@arm.com; linux-efi@vger.kernel.org; Va

Re: [PATCH] efi/capsule-loader: Don't output reset log when header flags is not set

2018-05-01 Thread Ard Biesheuvel
On 25 April 2018 at 05:10, Shunyong Yang wrote: > It means firmware attempts to immediately process or launch the capsule > when flags in capsule header is not set. Moreover, reset is not needed > in this case. Current code will output log to indicate reset. > >

Re: [PATCH v4 0/4] Ignore unrealistically large option roms in EFI stub code

2018-05-01 Thread Ard Biesheuvel
On 1 May 2018 at 11:48, Hans de Goede <hdego...@redhat.com> wrote: > Hi, > > On 29-04-18 13:06, Ard Biesheuvel wrote: >> >> This is a continuation of Hans's work [0] to ignore bogus romimage/romsize >> values in the EFI PCI I/O protocol instances exposed by

Re: [PATCH v2] efi: Ignore unrealistically large option roms

2018-05-01 Thread Ard Biesheuvel
On 1 May 2018 at 15:52, David Laight <david.lai...@aculab.com> wrote: > From: Ard Biesheuvel >> Sent: 28 April 2018 07:41 >> On 27 April 2018 at 23:35, Hans de Goede <hdego...@redhat.com> wrote: >> > setup_efi_pci() tries to save a copy of each PCI opti

Re: [PATCH v3] efi: Ignore unrealistically large option roms

2018-04-29 Thread Ard Biesheuvel
On 29 April 2018 at 11:08, Hans de Goede <hdego...@redhat.com> wrote: > Hi, > > > On 29-04-18 11:07, Ard Biesheuvel wrote: >> >> On 29 April 2018 at 10:40, Hans de Goede <hdego...@redhat.com> wrote: >>> >>> Hi, >>> >>> >&

[PATCH v4 2/4] efi: align efi_pci_io_protocol typedefs to type naming convention

2018-04-29 Thread Ard Biesheuvel
In order to use the helper macros that perform type mangling with the EFI PCI I/O protocol struct typedefs, align their Linux typenames with the convention we use for definitionns that originate in the UEFI spec, and add the trailing _t to each. Signed-off-by: Ard Biesheuvel <ard.bies

[PATCH v4 4/4] efi/x86: Ignore unrealistically large option roms

2018-04-29 Thread Ard Biesheuvel
.@redhat.com> [ardb: deduplicate 32/64 bit changes, use SZ_16M symbolic constant] Signed-off-by: Ard Biesheuvel <ard.biesheu...@linaro.org> --- arch/x86/boot/compressed/eboot.c | 9 - 1 file changed, 8 insertions(+), 1 deletion(-) diff --git a/arch/x86/boot/compressed/eboot.c b/arch

[PATCH v4 3/4] efi/x86: fold __setup_efi_pci32 and __setup_efi_pci64 into one

2018-04-29 Thread Ard Biesheuvel
As suggested by Lukas, use his efi_call_proto() and efi_table_attr() macros to merge __setup_efi_pci32() and __setup_efi_pci64() into a single function, removing the need to duplicate changes made in subsequent patches across both. Cc: Lukas Wunner <lu...@wunner.de> Signed-off-by: Ard Bies

[PATCH v4 0/4] Ignore unrealistically large option roms in EFI stub code

2018-04-29 Thread Ard Biesheuvel
to __setup_efi_pci64, some CHT devices which need this still use a 32 bit UEFI [0] https://marc.info/?l=linux-efi=152494632116321 Ard Biesheuvel (3): efi: fix efi_pci_io_protocol32 prototype for mixed mode efi: align efi_pci_io_protocol typedefs to type naming convention efi/x86: fold

[PATCH v4 1/4] efi: fix efi_pci_io_protocol32 prototype for mixed mode

2018-04-29 Thread Ard Biesheuvel
on such kernels, potentially resulting in bogus memory references and subsequent crashes. Cc: <sta...@vger.kernel.org> Signed-off-by: Ard Biesheuvel <ard.biesheu...@linaro.org> --- arch/x86/boot/compressed/eboot.c | 6 -- include/linux/efi.h | 8 2 files changed, 8 inse

Re: [PATCH v3] efi: Ignore unrealistically large option roms

2018-04-29 Thread Ard Biesheuvel
On 29 April 2018 at 10:40, Hans de Goede wrote: > Hi, > > > On 29-04-18 09:43, Ingo Molnar wrote: >> >> >> * Hans de Goede wrote: >> >>> diff --git a/arch/x86/boot/compressed/eboot.c >>> b/arch/x86/boot/compressed/eboot.c >>> index

Re: [PATCH v3] efi: Ignore unrealistically large option roms

2018-04-29 Thread Ard Biesheuvel
On 29 April 2018 at 12:00, Ard Biesheuvel <ard.biesheu...@linaro.org> wrote: > On 29 April 2018 at 11:08, Hans de Goede <hdego...@redhat.com> wrote: >> Hi, >> >> >> On 29-04-18 11:07, Ard Biesheuvel wrote: >>> >>> On 29 April 2018 at 10:40

Re: [PATCH v2] efi/capsule-loader: Don't output reset log when reset flags are not set

2018-05-03 Thread Ard Biesheuvel
On 3 May 2018 at 07:45, Shunyong Yang wrote: > It means firmware attempts to immediately process or launch the capsule > when reset flags in capsule header are not set. Moreover, reset is not > needed in this case. The current code will output log to indicate

Re: [PATCH] efi: Fix the size not consistent issue when unmapping memory map

2018-05-03 Thread Ard Biesheuvel
; patch changes the logic in the unmapping function. Using the end > address of map to calcuate original size. > Why do we still need this patch? I.e., in which circumstances will efi_memory_map_data::size assume a value that is rounded up or otherwise incorrect? > Thank Randy Wright

Re: [PATCH v5 2/5] efi: Add embedded peripheral firmware support

2018-05-03 Thread Ard Biesheuvel
t is too large for > early_memremap(), so the check must be done after mm_init(). This relies > on EFI_BOOT_SERVICES_CODE not being free-ed until efi_free_boot_services() > is called, which means that this will only work on x86 for now. > > Reported-by: Dave Olsthoorn <d...@bewaar.me> &

[PATCH 02/17] efi/cper: Remove the INDENT_SP silliness

2018-05-04 Thread Ard Biesheuvel
From: Borislav Petkov <b...@suse.de> A separate define just to print a space character is silly and completely unneeded. Remove it. Signed-off-by: Borislav Petkov <b...@suse.de> Signed-off-by: Ard Biesheuvel <ard.biesheu...@linaro.org> --- drivers/firmware/efi/cper-arm.c |

[PATCH 03/17] efi: Fix IA32/X64 Processor Error Record definition

2018-05-04 Thread Ard Biesheuvel
amd.com> Signed-off-by: Ard Biesheuvel <ard.biesheu...@linaro.org> --- include/linux/cper.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/include/linux/cper.h b/include/linux/cper.h index d14ef4e77c8a..4b5f8459b403 100644 --- a/include/linux/cper.h +++ b/include/linux/cper.

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

2018-05-04 Thread Ard Biesheuvel
ontext to that mix just so we can reuse a single routine just isn't worth it. Signed-off-by: Daniel Kiper <daniel.ki...@oracle.com> [ardb: explain rationale for code duplication] Signed-off-by: Ard Biesheuvel <ard.biesheu...@linaro.org> --- arch/x86/xen/efi.c

[GIT PULL 00/17] EFI updates for v4.18

2018-05-04 Thread Ard Biesheuvel
randomization is a debug feature that the distros don't enable) Ard Biesheuvel (3): efi: fix efi_pci_io_protocol32 prototype for mixed mode efi: align efi_pci_io_protocol typedefs to type naming convention efi/x86

Re: [PATCH v5 2/5] efi: Add embedded peripheral firmware support

2018-05-03 Thread Ard Biesheuvel
On 4 May 2018 at 01:29, Luis R. Rodriguez wrote: > On Sun, Apr 29, 2018 at 11:35:55AM +0200, Hans de Goede wrote: [...] >> diff --git a/Documentation/driver-api/firmware/request_firmware.rst >> b/Documentation/driver-api/firmware/request_firmware.rst >> index

[PATCH 07/17] efi: Decode IA32/X64 Cache, TLB, and Bus Check structures

2018-05-04 Thread Ard Biesheuvel
patch. Based on UEFI 2.7, Table 254. IA32/X64 Cache Check Structure Table 255. IA32/X64 TLB Check Structure Table 256. IA32/X64 Bus Check Structure Signed-off-by: Yazen Ghannam <yazen.ghan...@amd.com> Signed-off-by: Ard Biesheuvel <ard.biesheu...@linaro.org> --- drivers/firmware/e

[PATCH 10/17] efi: Decode IA32/X64 Context Info structure

2018-05-04 Thread Ard Biesheuvel
n N.2.4.2.2 IA32/X64 Processor Context Information Structure. Signed-off-by: Yazen Ghannam <yazen.ghan...@amd.com> Signed-off-by: Ard Biesheuvel <ard.biesheu...@linaro.org> --- drivers/firmware/efi/cper-x86.c | 48 + 1 file changed, 48 insertions(+) diff

[PATCH 06/17] efi: Decode UEFI-defined IA32/X64 Error Structure GUIDs

2018-05-04 Thread Ard Biesheuvel
Error Information Structure. Signed-off-by: Yazen Ghannam <yazen.ghan...@amd.com> Signed-off-by: Ard Biesheuvel <ard.biesheu...@linaro.org> --- drivers/firmware/efi/cper-x86.c | 47 +++-- 1 file changed, 45 insertions(+), 2 deletions(-) diff --git a/drivers

[PATCH 08/17] efi: Decode additional IA32/X64 Bus Check fields

2018-05-04 Thread Ard Biesheuvel
annam <yazen.ghan...@amd.com> Signed-off-by: Ard Biesheuvel <ard.biesheu...@linaro.org> --- drivers/firmware/efi/cper-x86.c | 44 + 1 file changed, 44 insertions(+) diff --git a/drivers/firmware/efi/cper-x86.c b/drivers/firmware/efi/cper-x86.c index

[PATCH 09/17] efi: Decode IA32/X64 MS Check structure

2018-05-04 Thread Ard Biesheuvel
Table 257. IA32/X64 MS Check Field Description. Signed-off-by: Yazen Ghannam <yazen.ghan...@amd.com> Signed-off-by: Ard Biesheuvel <ard.biesheu...@linaro.org> --- drivers/firmware/efi/cper-x86.c | 55 - 1 file changed, 54 insertions(+), 1 deletion(-) d

[PATCH 04/17] efi: Decode IA32/X64 Processor Error Section

2018-05-04 Thread Ard Biesheuvel
the Processor Error Record. The "Processor Error Info" and "Processor Context" fields will be decoded in following patches. Based on UEFI 2.7 Table 252. Processor Error Record. Signed-off-by: Yazen Ghannam <yazen.ghan...@amd.com> Signed-off-by: Ard Biesheuvel <ard.b

[PATCH 14/17] efi/x86: fold __setup_efi_pci32 and __setup_efi_pci64 into one

2018-05-04 Thread Ard Biesheuvel
Goede <hdego...@redhat.com> Signed-off-by: Ard Biesheuvel <ard.biesheu...@linaro.org> --- arch/x86/boot/compressed/eboot.c | 107 --- 1 file changed, 25 insertions(+), 82 deletions(-) diff --git a/arch/x86/boot/compressed/eboot.c b/arch/x86/boot/compre

[PATCH 11/17] efi/libstub/tpm: Make function efi_retrieve_tpm2_eventlog_1_2() static

2018-05-04 Thread Ard Biesheuvel
kko Sakkinen <jarkko.sakki...@linux.intel.com> Signed-off-by: Ard Biesheuvel <ard.biesheu...@linaro.org> --- drivers/firmware/efi/libstub/tpm.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/firmware/efi/libstub/tpm.c b/drivers/firmware/efi/libstub/tpm.c index 9d

[PATCH 13/17] efi: align efi_pci_io_protocol typedefs to type naming convention

2018-05-04 Thread Ard Biesheuvel
com> Signed-off-by: Ard Biesheuvel <ard.biesheu...@linaro.org> --- arch/x86/boot/compressed/eboot.c | 8 include/linux/efi.h | 6 +++--- 2 files changed, 7 insertions(+), 7 deletions(-) diff --git a/arch/x86/boot/compressed/eboot.c b/arch/x86/boot/compressed/eboot.c index

[PATCH 12/17] efi: fix efi_pci_io_protocol32 prototype for mixed mode

2018-05-04 Thread Ard Biesheuvel
on such kernels, potentially resulting in bogus memory references and subsequent crashes. Cc: <sta...@vger.kernel.org> Tested-by: Hans de Goede <hdego...@redhat.com> Signed-off-by: Ard Biesheuvel <ard.biesheu...@linaro.org> --- arch/x86/boot/compressed/eboot.c | 6 -- i

Re: [RFT PATCH] efi: capsule-loader: reinstate virtual capsule mapping

2017-12-29 Thread Ard Biesheuvel
On 29 December 2017 at 03:09, Bryan O'Donoghue wrote: > >> So we need to fix this without breaking Quark. Fortunately, Quark does >> not appear to care about the virtual mapping, and so we can simply >> do a partial revert of commit 2a457fb31df6 ("efi/capsule-loader:

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

2018-01-11 Thread Ard Biesheuvel
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 enabled platform. > Hi Daniel, I must say, I am not too thrilled with the approach you have

[PATCH] MAINTAINERS: Add Ard Biesheuvel to EFI test driver and efivarfs

2018-01-03 Thread Ard Biesheuvel
Signed-off-by: Ard Biesheuvel <ard.biesheu...@linaro.org> --- MAINTAINERS | 2 ++ 1 file changed, 2 insertions(+) diff --git a/MAINTAINERS b/MAINTAINERS index ae9132f77be6..95c3fa1f520f 100644 --- a/MAINTAINERS +++ b/MAINTAINERS @@ -5149,12 +5149,14 @@ F: sound/usb/misc/ua101.c EF

[PATCH] efi: arm64: Check whether x18 is preserved by runtime services calls

2018-01-18 Thread Ard Biesheuvel
all been replaced by that time. This has been fixed on the EDK2 side in commit 6d73863b5464 ("BaseTools/tools_def AARCH64: mark register x18 as reserved")., dated July 13, 2017. Signed-off-by: Ard Biesheuvel <ard.biesheu...@linaro.org> --- arch/arm64/include/asm/efi.h

[PATCH] efi: arm: stop printing addresses of virtual mappings

2018-01-19 Thread Ard Biesheuvel
Signed-off-by: Ard Biesheuvel <ard.biesheu...@linaro.org> --- drivers/firmware/efi/arm-runtime.c | 5 + 1 file changed, 1 insertion(+), 4 deletions(-) diff --git a/drivers/firmware/efi/arm-runtime.c b/drivers/firmware/efi/arm-runtime.c index 1cc41c3d6315..5d4c8b661548 100644 --- a/dr

Re: [PATCH 2/4] efi/arm64: map the stack and entry wrapper into the UEFI page tables

2018-01-26 Thread Ard Biesheuvel
On 26 January 2018 at 16:57, Will Deacon <will.dea...@arm.com> wrote: > Hi Ard, > > On Thu, Jan 25, 2018 at 10:31:29AM +, Ard Biesheuvel wrote: >> As a preparatory step towards unmapping the kernel entirely while >> executing UEFI runtime services, move the sta

<    3   4   5   6   7   8   9   10   11   12   >