[PATCH] efi/reboot: Fall back to original power-off method if EFI_RESET_SHUTDOWN returns

2017-04-23 Thread Hans de Goede
ode remember the old pm_power_off handler and if EFI_RESET_SHUTDOWN returns it falls back to calling that. This seems preferable to dmi-quirking our way out of this, since there are likely quite a few devices suffering from this. Cc: Mark Salter <msal...@redhat.com> Signed-off-by: Hans de

Re: efi/reboot: Fall back to original power-off method if EFI_RESET_SHUTDOWN returns

2017-06-21 Thread Hans de Goede
HI, On 23-04-17 14:36, Hans de Goede wrote: Commit 44be28e9dd98 ("x86/reboot: Add EFI reboot quirk for ACPI Hardware Reduced flag") sets pm_power_off to efi_power_off() when the acpi_gbl_reduced_hardware flag is set. According to its commit message this is necessary because: "B

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

2018-04-27 Thread Hans de Goede
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, 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 be able to dump

[PATCH v2] efi: Ignore unrealistically large option roms

2018-04-27 Thread Hans de Goede
mit avoids the printing of these errors, by checking romsize before doing the alloc and if it is larger then 256M silently ignore the ROM fields instead of trying to alloc mem and fail. Signed-off-by: Hans de Goede <hdego...@redhat.com> --- Changes in v2: -Add the check to both _

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

2018-05-13 Thread Hans de Goede
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 de Goede <hdego...@redhat.com> wrote: Just like with PCI options ROMs, which we save in the setup_efi_pci* functions from arch/x86/boot/comp

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

2018-05-13 Thread Hans de Goede
Hi, On 05/03/2018 11:31 PM, Luis R. Rodriguez wrote: On Wed, May 02, 2018 at 04:49:53PM +0200, Hans de Goede wrote: Hi, On 05/01/2018 09:29 PM, Andy Lutomirski wrote: On Sun, Apr 29, 2018 at 2:36 AM Hans de Goede <hdego...@redhat.com> wrote: +The EFI embedded-fw code works by scanni

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

2018-05-13 Thread Hans de Goede
Hi, On 05/13/2018 12:43 PM, Ard Biesheuvel wrote: 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 de Goede

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

2018-05-13 Thread Hans de Goede
Hi, On 05/03/2018 11:35 PM, Andy Lutomirski wrote: On Thu, May 3, 2018 at 3:31 PM Luis R. Rodriguez <mcg...@kernel.org> wrote: On Wed, May 02, 2018 at 04:49:53PM +0200, Hans de Goede wrote: Hi, On 05/01/2018 09:29 PM, Andy Lutomirski wrote: On Sun, Apr 29, 2018 at 2:36 AM Hans de

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

2018-05-13 Thread Hans de Goede
Hi, On 05/08/2018 06:12 PM, Luis R. Rodriguez wrote: On Fri, May 04, 2018 at 07:54:28AM +0200, Ard Biesheuvel wrote: On 4 May 2018 at 01:29, Luis R. Rodriguez <mcg...@kernel.org> wrote: On Sun, Apr 29, 2018 at 11:35:55AM +0200, Hans de Goede wrote: [...] diff --git a/Documentation/

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

2018-06-19 Thread Hans de Goede
em applies to the efi_physical_addr_t variables which are written by the get_event_log EFI call. This commit initializes these to 0 to, to ensure the upper 32 bits are 0 in mixed mode. This fixes recent kernels sometimes hanging during early boot on mixed mode UEFI systems. Signed-off-by: Hans de Goede --- driver

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

2018-06-26 Thread Hans de Goede
he only use of the attributes field, we can remove 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 C

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

2018-06-20 Thread Hans de Goede
Hi, On 20-06-18 09:49, Ard Biesheuvel wrote: 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-b

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

2018-06-21 Thread Hans de Goede
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 for mixed mode") fixes a problem with the tpm code on mixed mode (64 bit kernel on 32 bit UEFI), where 64-b

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

2018-06-21 Thread Hans de Goede
these to 0 to, to ensure the upper 32 bits are 0 in mixed mode. This fixes recent kernels sometimes hanging during early boot on mixed mode UEFI systems. Signed-off-by: Hans de Goede --- Changes in v2: -Change commit message to reflect that efi_physical_addr_t is 64 bit everywhere and some firmwares on

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

2018-05-01 Thread Hans de Goede
Hi, On 01-05-18 16:36, Mimi Zohar wrote: [Cc'ing linux-security] On Sun, 2018-04-29 at 11:35 +0200, Hans de Goede wrote: [...] diff --git a/drivers/base/firmware_loader/fallback_efi.c b/drivers/base/firmware_loader/fallback_efi.c new file mode 100644 index ..82ba82f48a79 --- /dev

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

2018-05-02 Thread Hans de Goede
Hi, On 05/01/2018 09:29 PM, Andy Lutomirski wrote: On Sun, Apr 29, 2018 at 2:36 AM Hans de Goede <hdego...@redhat.com> wrote: +The EFI embedded-fw code works by scanning all EFI_BOOT_SERVICES_CODE memory +segments for an eight byte sequence matching prefix, if the prefix is

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

2018-04-26 Thread Hans de Goede
-by: Greg Kroah-Hartman <gre...@linuxfoundation.org> Signed-off-by: Hans de Goede <hdego...@redhat.com> --- Changes in v4: -Add new EFI_BOOT_SERVICES flag and use it to determine if the boot-services memory segments are available (and thus if it makes sense to register the debugfs bits for th

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

2018-04-26 Thread Hans de Goede
gested-by: Peter Jones <pjo...@redhat.com> Signed-off-by: Hans de Goede <hdego...@redhat.com> --- Changes in v4: -Drop note in docs about EFI_FIRMWARE_VOLUME_PROTOCOL, it is not part of UEFI proper, so the EFI maintainers don't want us referring people to it -Use new EFI_BOOT_SERVICES

[PATCH v4 4/5] platform/x86: touchscreen_dmi: Add EFI embedded firmware info support

2018-04-26 Thread Hans de Goede
the necessary info for the new EFI embedded-firmware code to extract these firmwares, making the touchscreen work OOTB without the user needing to manually add the firmware. Acked-by: Andy Shevchenko <andy.shevche...@gmail.com> Signed-off-by: Hans de Goede <hdego...@redhat.com> --- drivers/

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

2018-04-26 Thread Hans de Goede
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 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

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

2018-05-01 Thread Hans de Goede
a device with a 32 bit UEFI and on a device with a 64 bit UEFI, using a 64 bit kernel on both cases. The second device also used to show the "failed to alloc mem for rom" errors and I can confirm this series fixes this: Tested-by: Hans de Goede <hdego...@redhat.com> Regards, Hans

[PATCH v3] efi: Ignore unrealistically large option roms

2018-04-28 Thread Hans de Goede
mit avoids the printing of these errors, by checking romsize before doing the alloc and if it is larger then the EFI spec limit of 16 MiB silently ignore the ROM fields instead of trying to alloc mem and fail. Reviewed-by: Ard Biesheuvel <ard.biesheu...@linaro.org> Signed-off-by: Hans

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

2018-04-28 Thread Hans de Goede
Hi, On 28-04-18 08:40, Ard Biesheuvel wrote: Hi Hans, 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 option ROM as this may be necessary for the device driver for the PCI device to have access too. On some s

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

2018-04-29 Thread Hans de Goede
-by: Greg Kroah-Hartman <gre...@linuxfoundation.org> Acked-by: Ard Biesheuvel <ard.biesheu...@linaro.org> Signed-off-by: Hans de Goede <hdego...@redhat.com> --- Changes in v5: -Rename the EFI_BOOT_SERVICES flag to EFI_PRESERVE_BS_REGIONS Changes in v4: -Add new EFI_BOOT_SER

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

2018-04-29 Thread Hans de Goede
Hi, On 29-04-18 09:43, Ingo Molnar wrote: * Hans de Goede <hdego...@redhat.com> wrote: diff --git a/arch/x86/boot/compressed/eboot.c b/arch/x86/boot/compressed/eboot.c index 47d3efff6805..8650ab268ee7 100644 --- a/arch/x86/boot/compressed/eboot.c +++ b/arch/x86/boot/compressed/e

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

2018-04-29 Thread Hans de Goede
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, On 29-04-18 09:43, Ingo Molnar wrote: * Hans de Goede <hdego...@redhat.com> wrote: diff --git a/arch/x86/boot/compressed/eboot.c b/arch/x86/boot/compre

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

2018-04-29 Thread Hans de Goede
gested-by: Peter Jones <pjo...@redhat.com> Acked-by: Ard Biesheuvel <ard.biesheu...@linaro.org> Signed-off-by: Hans de Goede <hdego...@redhat.com> --- Changes in v5: -Rename the EFI_BOOT_SERVICES flag to EFI_PRESERVE_BS_REGIONS Changes in v4: -Drop note in docs about EFI_

[PATCH v5 5/5] platform/x86: touchscreen_dmi: Add info for the Chuwi Vi8 Plus tablet

2018-04-29 Thread Hans de Goede
g> Signed-off-by: Hans de Goede <hdego...@redhat.com> --- drivers/platform/x86/touchscreen_dmi.c | 25 + 1 file changed, 25 insertions(+) diff --git a/drivers/platform/x86/touchscreen_dmi.c b/drivers/platform/x86/touchscreen_dmi.c index 6488cd50ba79..5

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

2018-04-29 Thread Hans de Goede
Hi All, Here is v5 of my patch-set to add support for EFI embedded fw to the kernel. Changes since v4: -Rename the EFI_BOOT_SERVICES flag to EFI_PRESERVE_BS_REGIONS So I think this patch-set is getting close to ready for merging, which brings us to the question of how to merge this, I think

[PATCH v5 3/5] platform/x86: Rename silead_dmi to touchscreen_dmi

2018-04-29 Thread Hans de Goede
Shevchenko <andy.shevche...@gmail.com> Acked-by: Ard Biesheuvel <ard.biesheu...@linaro.org> Signed-off-by: Hans de Goede <hdego...@redhat.com> --- MAINTAINERS | 2 +- drivers/platform/x86/Kconfig | 16 ++--- drivers/pla

[PATCH v5 4/5] platform/x86: touchscreen_dmi: Add EFI embedded firmware info support

2018-04-29 Thread Hans de Goede
the necessary info for the new EFI embedded-firmware code to extract these firmwares, making the touchscreen work OOTB without the user needing to manually add the firmware. Acked-by: Andy Shevchenko <andy.shevche...@gmail.com> Acked-by: Ard Biesheuvel <ard.biesheu...@linaro.org> Signed-off

Re: [PATCH 0/6] efi/x86 mixed mode cleanups

2018-07-12 Thread Hans de Goede
on configurations that don't need them (32-bit only and 64-bit only) I've given a kernel with these patches a quick spin running in mixed mode on a Bay Trail based tablet: Tested-by: Hans de Goede Regards, Hans -- To unsubscribe from this list: send the line "unsubscribe linux-efi" i

Re: Regression from efi: call get_event_log before ExitBootServices

2018-03-13 Thread Hans de Goede
Hi, On 12-03-18 20:55, Thiebaud Weksteen wrote: On Mon, Mar 12, 2018 at 7:33 PM Jeremy Cline wrote: On 03/12/2018 02:29 PM, Thiebaud Weksteen wrote: On Mon, Mar 12, 2018 at 6:30 PM Ard Biesheuvel < ard.biesheu...@linaro.org> wrote: On 12 March 2018 at 17:01, Jeremy

Re: Regression from efi: call get_event_log before ExitBootServices

2018-03-13 Thread Hans de Goede
Hi, On 12-03-18 22:02, Ard Biesheuvel wrote: On 12 March 2018 at 19:55, Thiebaud Weksteen wrote: On Mon, Mar 12, 2018 at 7:33 PM Jeremy Cline wrote: On 03/12/2018 02:29 PM, Thiebaud Weksteen wrote: On Mon, Mar 12, 2018 at 6:30 PM Ard Biesheuvel <

Re: Regression from efi: call get_event_log before ExitBootServices

2018-03-08 Thread Hans de Goede
Hi, On 07-03-18 12:34, Javier Martinez Canillas wrote: On 03/07/2018 12:10 PM, Hans de Goede wrote: Both according to the BIOS and to the /sys/class/tpm/tpm0/device/description file it is a TPM 2.0. I see, so you can choose enabling the TPM 1.2 or TPM 2.0 device? At least that's

Re: Regression from efi: call get_event_log before ExitBootServices

2018-03-09 Thread Hans de Goede
Hi, On 08-03-18 18:26, Jeremy Cline wrote: On 03/08/2018 11:50 AM, Hans de Goede wrote: Hi, On 07-03-18 12:34, Javier Martinez Canillas wrote: Are you also able to read the TPM event logs? $ hexdump /sys/kernel/security/tpm0/binary_bios_measurements Yes for me that outputs a lot

Re: Regression from efi: call get_event_log before ExitBootServices

2018-03-07 Thread Hans de Goede
Hi, On 07-03-18 09:41, Thiebaud Weksteen wrote: Hi, Thanks for testing and sending this report! This patch relies heavily on the functions exposed by the firmware. My first guess would be that some of these may not be implemented correctly by the manufacturer. Could you share more information

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

2018-04-07 Thread Hans de Goede
Hi, On 06-04-18 16:08, Luis R. Rodriguez wrote: On Thu, Apr 05, 2018 at 07:43:49AM +0200, Lukas Wunner wrote: On Wed, Apr 04, 2018 at 01:18:36PM -0400, Peter Jones wrote: On Tue, Apr 03, 2018 at 08:07:11PM +0200, Lukas Wunner wrote: * Add the EFI Firmware Volume Protocol to

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

2018-04-08 Thread Hans de Goede
-by: Hans de Goede <hdego...@redhat.com> --- Changes in v2: -Do not call pr_err on debugfs call failures --- arch/x86/platform/efi/quirks.c | 4 +++ drivers/firmware/efi/efi.c | 53 ++ 2 files changed, 57 insertions(+) diff --git a/arch/x86/platform/efi/quir

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

2018-04-08 Thread Hans de Goede
gested-by: Peter Jones <pjo...@redhat.com> Signed-off-by: Hans de Goede <hdego...@redhat.com> --- Changes in v2: -Rebased on driver-core/driver-core-next -Add documentation describing the EFI embedded firmware mechanism to: Documentation/driver-api/firmware/request_firmw

[PATCH v2 3/5] platform/x86: Rename silead_dmi to touchscreen_dmi

2018-04-08 Thread Hans de Goede
-by: Hans de Goede <hdego...@redhat.com> --- MAINTAINERS | 2 +- drivers/platform/x86/Kconfig | 16 ++--- drivers/platform/x86/Makefile | 2 +- .../x86/{silead_dmi.c => touchscreen_dmi.c} | 66 +-- 4 files ch

[PATCH v2 5/5] platform/x86: touchscreen_dmi: Add info for the Chuwi Vi8 Plus tablet

2018-04-08 Thread Hans de Goede
Add touchscreen info for the Chuwi Vi8 Plus tablet. This tablet uses a Chipone ICN8505 touchscreen controller, with the firmware used by the touchscreen embedded in the EFI firmware. Signed-off-by: Hans de Goede <hdego...@redhat.com> --- drivers/platform/x86/touchscreen_dmi.

[PATCH v2 4/5] platform/x86: touchscreen_dmi: Add EFI embedded firmware info support

2018-04-08 Thread Hans de Goede
the necessary info for the new EFI embedded-firmware code to extract these firmwares, making the touchscreen work OOTB without the user needing to manually add the firmware. Signed-off-by: Hans de Goede <hdego...@redhat.com> --- drivers/firmware/efi/embedded-firmware.c | 3 +++ drivers/platfo

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

2018-04-08 Thread Hans de Goede
Hi All, Sorry for sending a v3 so soon after v2, I got the property name wrong in the documentation added in v2 and of course noticed that minutes after sending v2. This version fixes this. Here is the v2 coverletter again: Here is v2 of my patch-set to add support for EFI embedded fw to the

[PATCH v3 3/5] platform/x86: Rename silead_dmi to touchscreen_dmi

2018-04-08 Thread Hans de Goede
-by: Hans de Goede <hdego...@redhat.com> --- MAINTAINERS | 2 +- drivers/platform/x86/Kconfig | 16 ++--- drivers/platform/x86/Makefile | 2 +- .../x86/{silead_dmi.c => touchscreen_dmi.c} | 66 +-- 4 files ch

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

2018-04-08 Thread Hans de Goede
gested-by: Peter Jones <pjo...@redhat.com> Signed-off-by: Hans de Goede <hdego...@redhat.com> --- Changes in v2: -Rebased on driver-core/driver-core-next -Add documentation describing the EFI embedded firmware mechanism to: Documentation/driver-api/firmware/request_firmw

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

2018-04-08 Thread Hans de Goede
-by: Hans de Goede <hdego...@redhat.com> --- Changes in v2: -Do not call pr_err on debugfs call failures --- arch/x86/platform/efi/quirks.c | 4 +++ drivers/firmware/efi/efi.c | 53 ++ 2 files changed, 57 insertions(+) diff --git a/arch/x86/platform/efi/quir

[PATCH v3 4/5] platform/x86: touchscreen_dmi: Add EFI embedded firmware info support

2018-04-08 Thread Hans de Goede
the necessary info for the new EFI embedded-firmware code to extract these firmwares, making the touchscreen work OOTB without the user needing to manually add the firmware. Signed-off-by: Hans de Goede <hdego...@redhat.com> --- drivers/firmware/efi/embedded-firmware.c | 3 +++ drivers/platfo

[PATCH v3 5/5] platform/x86: touchscreen_dmi: Add info for the Chuwi Vi8 Plus tablet

2018-04-08 Thread Hans de Goede
Add touchscreen info for the Chuwi Vi8 Plus tablet. This tablet uses a Chipone ICN8505 touchscreen controller, with the firmware used by the touchscreen embedded in the EFI firmware. Signed-off-by: Hans de Goede <hdego...@redhat.com> --- drivers/platform/x86/touchscreen_dmi.

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

2018-04-08 Thread Hans de Goede
Hi All, Here is v2 of my patch-set to add support for EFI embedded fw to the kernel. The 3 most prominent changes are: 1) Add documentation describing the EFI embedded firmware mechanism to: Documentation/driver-api/firmware/request_firmware.rst 2) Instead of having a single dmi_system_id

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

2018-04-05 Thread Hans de Goede
Hi, On 03-04-18 21:53, Peter Jones wrote: On Sat, Mar 31, 2018 at 02:19:44PM +0200, Hans de Goede wrote: diff --git a/drivers/firmware/efi/efi.c b/drivers/firmware/efi/efi.c index fddc5f706fd2..1a5ea950f58f 100644 --- a/drivers/firmware/efi/efi.c +++ b/drivers/firmware/efi/efi.c @@ -455,6

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

2018-04-05 Thread Hans de Goede
, 2018 at 10:33:25AM +0200, Hans de Goede wrote: This is not part of the standard. There has been a long(ish) standing issue with us not being able to get re-distribute permission for the firmware for some touchscreen controllers found on cheap x86 devices. Which means that we cannot put

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

2018-04-04 Thread Hans de Goede
HI, On 04-04-18 19:18, Peter Jones wrote: On Tue, Apr 03, 2018 at 06:58:48PM +, Luis R. Rodriguez wrote: On Tue, Apr 03, 2018 at 08:07:11PM +0200, Lukas Wunner wrote: On Tue, Apr 03, 2018 at 10:33:25AM +0200, Hans de Goede wrote: I asked Peter Jones for suggestions how to extract

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

2018-04-17 Thread Hans de Goede
Hi, On 17-04-18 02:17, Luis R. Rodriguez wrote: On Sun, Apr 08, 2018 at 07:40:11PM +0200, Hans de Goede wrote: static void firmware_free_data(const struct firmware *fw) { @@ -576,6 +600,15 @@ _request_firmware(const struct firmware **firmware_p, const char *name, goto out

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

2018-04-17 Thread Hans de Goede
Hi, On 17-04-18 02:17, Luis R. Rodriguez wrote: On Sun, Apr 08, 2018 at 07:40:11PM +0200, Hans de Goede wrote: static void firmware_free_data(const struct firmware *fw) { @@ -576,6 +600,15 @@ _request_firmware(const struct firmware **firmware_p, const char *name, goto out

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

2018-04-24 Thread Hans de Goede
Hi, On 24-04-18 18:07, Mimi Zohar wrote: On Tue, 2018-04-24 at 17:09 +0200, Hans de Goede wrote: Hi, On 23-04-18 23:11, Luis R. Rodriguez wrote: Hans, please see use of READING_FIRMWARE_PREALLOC_BUFFER, we'll need a new ID and security for this type of request so IMA can reject

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

2018-04-24 Thread Hans de Goede
Hi, On 23-04-18 23:11, Luis R. Rodriguez wrote: Hans, please see use of READING_FIRMWARE_PREALLOC_BUFFER, we'll need a new ID and security for this type of request so IMA can reject it if the policy is configured for it. Hmm, interesting, actually it seems like the whole existence of

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

2018-04-24 Thread Hans de Goede
Hi, On 16-04-18 10:28, Ard Biesheuvel wrote: On 8 April 2018 at 19:40, Hans de Goede <hdego...@redhat.com> wrote: Just like with PCI options ROMs, which we save in the setup_efi_pci* functions from arch/x86/boot/compressed/eboot.c, the EFI code / ROM itself sometimes may contain data

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

2018-04-24 Thread Hans de Goede
Hi, On 16-04-18 10:23, Ard Biesheuvel wrote: Hallo Hans, On 8 April 2018 at 19:40, Hans de Goede <hdego...@redhat.com> 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

[PATCH] efi: Ignore unrealistically large option roms

2018-03-30 Thread Hans de Goede
mit avoids the printing of these errors, by checking romsize before doing the alloc and if it is larger then 256M silently ignore the ROM fields instead of trying to alloc mem and fail. Signed-off-by: Hans de Goede <hdego...@redhat.com> --- arch/x86/boot/compressed/eboot.c | 8 +++- 1

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

2018-04-03 Thread Hans de Goede
Hi Luis, Thank you for the review. On 03-04-18 01:23, Luis R. Rodriguez wrote: On Sat, Mar 31, 2018 at 02:19:44PM +0200, Hans de Goede wrote: Just like with PCI options ROMs, which we save in the setup_efi_pci* functions from arch/x86/boot/compressed/eboot.c, the EFI code / ROM itself

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

2018-03-31 Thread Hans de Goede
-by: Hans de Goede <hdego...@redhat.com> --- arch/x86/platform/efi/quirks.c | 4 +++ drivers/firmware/efi/efi.c | 57 ++ 2 files changed, 61 insertions(+) diff --git a/arch/x86/platform/efi/quirks.c b/arch/x86/platform/efi/quirks.c index 5b513ccffde4..0f968c

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

2018-03-31 Thread Hans de Goede
this commit also modifies efi_mem_desc_lookup() to not skip EFI_BOOT_SERVICES_CODE memory-segments, so that efi_mem_reserve() works on such segments. Reported-by: Dave Olsthoorn <d...@bewaar.me> Suggested-by: Peter Jones <pjo...@redhat.com> Signed-off-by: Hans de Goede <hdego...@redhat.co

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

2018-03-31 Thread Hans de Goede
Hi, On 03/31/2018 04:10 PM, Greg Kroah-Hartman wrote: On Sat, Mar 31, 2018 at 02:19:43PM +0200, 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

[PATCH v4 3/5] platform/x86: Rename silead_dmi to touchscreen_dmi

2018-04-26 Thread Hans de Goede
Shevchenko <andy.shevche...@gmail.com> Signed-off-by: Hans de Goede <hdego...@redhat.com> --- MAINTAINERS | 2 +- drivers/platform/x86/Kconfig | 16 ++--- drivers/platform/x86/Makefile | 2 +- .../x86/{

[PATCH v4 5/5] platform/x86: touchscreen_dmi: Add info for the Chuwi Vi8 Plus tablet

2018-04-26 Thread Hans de Goede
Add touchscreen info for the Chuwi Vi8 Plus tablet. This tablet uses a Chipone ICN8505 touchscreen controller, with the firmware used by the touchscreen embedded in the EFI firmware. Acked-by: Andy Shevchenko <andy.shevche...@gmail.com> Signed-off-by: Hans de Goede <hdego...@r

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

2018-04-26 Thread Hans de Goede
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 don't want us referring people to it -Use new EFI_BOOT_SERVICES flag -Put the new

Re: [PATCH] x86/efi: Fix incorrect invocation of PciIo->Attributes()

2018-06-24 Thread Hans de Goede
Hi Ard, On 23-06-18 23:19, Ard Biesheuvel wrote: Commit 2c3625cb9fa2 efi/x86: Fold __setup_efi_pci32() and __setup_efi_pci64() into one function merged the two versions of __setup_efi_pciXX(), without taking into account that the 32-bit version used a rather dodgy trick to pass an

Re: [PATCH] efi/x86: Call efi_parse_options() from efi_main()

2018-09-12 Thread Hans de Goede
Hi, On 12-09-18 17:06, Ard Biesheuvel wrote: On 12 September 2018 at 15:18, Hans de Goede wrote: Before this commit we were only calling efi_parse_options() from make_boot_params(), but make_boot_params() only gets called if the kernel gets booted directly as an EFI executable. So when booted

[PATCH v2] efi/x86: Call efi_parse_options() from efi_main()

2018-09-12 Thread Hans de Goede
e options are always processed. This fixes quiet not working. This also fixes the libstub code ignoring nokaslr and efi=nochunk. Reported-by: Peter Robinson Signed-off-by: Hans de Goede --- Changes in v2: -Fix a compiler warning on 32 bit builds about casting a non pointer sized integer to a pointe

[PATCH] efi/x86: Call efi_parse_options() from efi_main()

2018-09-12 Thread Hans de Goede
e options are always processed. This fixes quiet not working. This also fixes the libstub code ignoring nokaslr and efi=nochunk. Reported-by: Peter Robinson Signed-off-by: Hans de Goede --- arch/x86/boot/compressed/eboot.c | 10 ++ 1 file changed, 10 insertions(+) diff --git a/arch/x86/boot/