* Re: [PATCH] x86/efi-bgrt: remove the check of the version field [not found] ` <20160809052546.31462-1-icenowy-ymACFijhrKM@public.gmane.org> @ 2016-08-10 12:52 ` Ingo Molnar [not found] ` <120791470839405@web16h.yandex.ru> 0 siblings, 1 reply; 8+ messages in thread From: Ingo Molnar @ 2016-08-10 12:52 UTC (permalink / raw) To: Icenowy Zheng Cc: Matt Fleming, Thomas Gleixner, Ingo Molnar, H . Peter Anvin, x86-DgEjT+Ai2ygdnm+yROfE0A, linux-efi-u79uwXL29TY76Z2rM5mHXA, linux-kernel-u79uwXL29TY76Z2rM5mHXA * Icenowy Zheng <icenowy-ymACFijhrKM@public.gmane.org> wrote: > Some broken firmwares have a wrongly filled version field in BGRT table. > (See http://wiki.osdev.org/Broken_UEFI_implementations ) > > As we know, these firmwares can also provide correct BGRT image, although > the table is wrong. > > After removing the check of the version field, the kernel can now extract > the image correctly, and the information is also correct. > > Tested on a Thinkpad E531 (68854UC). What's the practical effects of the bug - what problems does a missing /sys/firmware/acpi/bgrt/ cause? I.e. how does the user notice? Thanks, Ingo ^ permalink raw reply [flat|nested] 8+ messages in thread
[parent not found: <120791470839405@web16h.yandex.ru>]
[parent not found: <120791470839405-TUpq1W2QCG9xpj1cXAZ9Bg@public.gmane.org>]
* Re: [PATCH] x86/efi-bgrt: remove the check of the version field [not found] ` <120791470839405-TUpq1W2QCG9xpj1cXAZ9Bg@public.gmane.org> @ 2016-08-11 8:48 ` Ingo Molnar 0 siblings, 0 replies; 8+ messages in thread From: Ingo Molnar @ 2016-08-11 8:48 UTC (permalink / raw) To: Icenowy Zheng Cc: Matt Fleming, Thomas Gleixner, Ingo Molnar, H . Peter Anvin, x86-DgEjT+Ai2ygdnm+yROfE0A@public.gmane.org, linux-efi-u79uwXL29TY76Z2rM5mHXA@public.gmane.org, linux-kernel-u79uwXL29TY76Z2rM5mHXA@public.gmane.org * Icenowy Zheng <icenowy-ymACFijhrKM@public.gmane.org> wrote: > > > 10.08.2016, 20:52, "Ingo Molnar" <mingo-DgEjT+Ai2ygdnm+yROfE0A@public.gmane.org>: > > * Icenowy Zheng <icenowy-ymACFijhrKM@public.gmane.org> wrote: > > > >> Some broken firmwares have a wrongly filled version field in BGRT table. > >> (See http://wiki.osdev.org/Broken_UEFI_implementations ) > >> > >> As we know, these firmwares can also provide correct BGRT image, although > >> the table is wrong. > >> > >> After removing the check of the version field, the kernel can now extract > >> the image correctly, and the information is also correct. > >> > >> Tested on a Thinkpad E531 (68854UC). > > > > What's the practical effects of the bug - what problems does a missing > > /sys/firmware/acpi/bgrt/ cause? > > Currently nothing uses this featues. However, one of my friend is trying to > develop a splash screen which uses ACPI BGRT, like the splash screen > of Windows 8 and above. > Without the directory, there won't be any way to retrieve the vendor splash > logo. Ok - please add this information to the changelog. Acked-by: Ingo Molnar <mingo-DgEjT+Ai2ygdnm+yROfE0A@public.gmane.org> Thanks, Ingo ^ permalink raw reply [flat|nested] 8+ messages in thread
* Re: [PATCH] x86/efi-bgrt: remove the check of the version field [not found] <20160809052546.31462-1-icenowy@aosc.xyz> [not found] ` <20160809052546.31462-1-icenowy-ymACFijhrKM@public.gmane.org> @ 2016-08-15 12:56 ` Matt Fleming 2016-08-15 16:09 ` Josh Triplett [not found] ` <20160815125643.GG30909-mF/unelCI9GS6iBeEJttW/XRex20P6io@public.gmane.org> 1 sibling, 2 replies; 8+ messages in thread From: Matt Fleming @ 2016-08-15 12:56 UTC (permalink / raw) To: Icenowy Zheng Cc: Thomas Gleixner, Ingo Molnar, H . Peter Anvin, x86, linux-efi, linux-kernel, Josh Triplett, Dave Young, Josh Boyer, Andy Lutomirski On Tue, 09 Aug, at 01:25:46PM, Icenowy Zheng wrote: > Some broken firmwares have a wrongly filled version field in BGRT table. > (See http://wiki.osdev.org/Broken_UEFI_implementations ) > > As we know, these firmwares can also provide correct BGRT image, although > the table is wrong. > > After removing the check of the version field, the kernel can now extract > the image correctly, and the information is also correct. > > Tested on a Thinkpad E531 (68854UC). > > Signed-off-by: Icenowy Zheng <icenowy@aosc.xyz> > --- > arch/x86/platform/efi/efi-bgrt.c | 5 ----- > 1 file changed, 5 deletions(-) > > diff --git a/arch/x86/platform/efi/efi-bgrt.c b/arch/x86/platform/efi/efi-bgrt.c > index 6a2f569..f492ea0 100644 > --- a/arch/x86/platform/efi/efi-bgrt.c > +++ b/arch/x86/platform/efi/efi-bgrt.c > @@ -47,11 +47,6 @@ void __init efi_bgrt_init(void) > bgrt_tab->header.length, sizeof(*bgrt_tab)); > return; > } > - if (bgrt_tab->version != 1) { > - pr_notice("Ignoring BGRT: invalid version %u (expected 1)\n", > - bgrt_tab->version); > - return; > - } > if (bgrt_tab->status & 0xfe) { > pr_notice("Ignoring BGRT: reserved status bits are non-zero %u\n", > bgrt_tab->status); This would be less scary if we checked for known broken and known good version values instead of removing the check altogether, i.e. 0 and 1. The whole point of the version field is that it tells us about the layout of the BGRT table, so it's not exactly a useless check. ^ permalink raw reply [flat|nested] 8+ messages in thread
* Re: [PATCH] x86/efi-bgrt: remove the check of the version field 2016-08-15 12:56 ` Matt Fleming @ 2016-08-15 16:09 ` Josh Triplett [not found] ` <20160815125643.GG30909-mF/unelCI9GS6iBeEJttW/XRex20P6io@public.gmane.org> 1 sibling, 0 replies; 8+ messages in thread From: Josh Triplett @ 2016-08-15 16:09 UTC (permalink / raw) To: Matt Fleming Cc: Icenowy Zheng, Thomas Gleixner, Ingo Molnar, H . Peter Anvin, x86, linux-efi, linux-kernel, Dave Young, Josh Boyer, Andy Lutomirski On Mon, Aug 15, 2016 at 01:56:43PM +0100, Matt Fleming wrote: > On Tue, 09 Aug, at 01:25:46PM, Icenowy Zheng wrote: > > Some broken firmwares have a wrongly filled version field in BGRT table. > > (See http://wiki.osdev.org/Broken_UEFI_implementations ) > > > > As we know, these firmwares can also provide correct BGRT image, although > > the table is wrong. > > > > After removing the check of the version field, the kernel can now extract > > the image correctly, and the information is also correct. > > > > Tested on a Thinkpad E531 (68854UC). > > > > Signed-off-by: Icenowy Zheng <icenowy@aosc.xyz> > > --- > > arch/x86/platform/efi/efi-bgrt.c | 5 ----- > > 1 file changed, 5 deletions(-) > > > > diff --git a/arch/x86/platform/efi/efi-bgrt.c b/arch/x86/platform/efi/efi-bgrt.c > > index 6a2f569..f492ea0 100644 > > --- a/arch/x86/platform/efi/efi-bgrt.c > > +++ b/arch/x86/platform/efi/efi-bgrt.c > > @@ -47,11 +47,6 @@ void __init efi_bgrt_init(void) > > bgrt_tab->header.length, sizeof(*bgrt_tab)); > > return; > > } > > - if (bgrt_tab->version != 1) { > > - pr_notice("Ignoring BGRT: invalid version %u (expected 1)\n", > > - bgrt_tab->version); > > - return; > > - } > > if (bgrt_tab->status & 0xfe) { > > pr_notice("Ignoring BGRT: reserved status bits are non-zero %u\n", > > bgrt_tab->status); > > This would be less scary if we checked for known broken and known good > version values instead of removing the check altogether, i.e. 0 and 1. > > The whole point of the version field is that it tells us about the > layout of the BGRT table, so it's not exactly a useless check. Agreed. It seems likely that BIOSes would have incorrectly left the version at 0. It seems less likely that they'd set it to some other random value. So, I'd suggest changing the check to pr_debug and continue for 0, continue for 1, and pr_notice and abort for anything else. ^ permalink raw reply [flat|nested] 8+ messages in thread
[parent not found: <20160815125643.GG30909-mF/unelCI9GS6iBeEJttW/XRex20P6io@public.gmane.org>]
* Re: [PATCH] x86/efi-bgrt: remove the check of the version field [not found] ` <20160815125643.GG30909-mF/unelCI9GS6iBeEJttW/XRex20P6io@public.gmane.org> @ 2016-08-17 5:44 ` Dave Young 2016-08-18 20:41 ` Matt Fleming 0 siblings, 1 reply; 8+ messages in thread From: Dave Young @ 2016-08-17 5:44 UTC (permalink / raw) To: Matt Fleming Cc: Icenowy Zheng, Thomas Gleixner, Ingo Molnar, H . Peter Anvin, x86-DgEjT+Ai2ygdnm+yROfE0A, linux-efi-u79uwXL29TY76Z2rM5mHXA, linux-kernel-u79uwXL29TY76Z2rM5mHXA, Josh Triplett, Josh Boyer, Andy Lutomirski On 08/15/16 at 01:56pm, Matt Fleming wrote: > On Tue, 09 Aug, at 01:25:46PM, Icenowy Zheng wrote: > > Some broken firmwares have a wrongly filled version field in BGRT table. > > (See http://wiki.osdev.org/Broken_UEFI_implementations ) > > > > As we know, these firmwares can also provide correct BGRT image, although > > the table is wrong. > > > > After removing the check of the version field, the kernel can now extract > > the image correctly, and the information is also correct. > > > > Tested on a Thinkpad E531 (68854UC). > > > > Signed-off-by: Icenowy Zheng <icenowy-ymACFijhrKM@public.gmane.org> > > --- > > arch/x86/platform/efi/efi-bgrt.c | 5 ----- > > 1 file changed, 5 deletions(-) > > > > diff --git a/arch/x86/platform/efi/efi-bgrt.c b/arch/x86/platform/efi/efi-bgrt.c > > index 6a2f569..f492ea0 100644 > > --- a/arch/x86/platform/efi/efi-bgrt.c > > +++ b/arch/x86/platform/efi/efi-bgrt.c > > @@ -47,11 +47,6 @@ void __init efi_bgrt_init(void) > > bgrt_tab->header.length, sizeof(*bgrt_tab)); > > return; > > } > > - if (bgrt_tab->version != 1) { > > - pr_notice("Ignoring BGRT: invalid version %u (expected 1)\n", > > - bgrt_tab->version); > > - return; > > - } > > if (bgrt_tab->status & 0xfe) { > > pr_notice("Ignoring BGRT: reserved status bits are non-zero %u\n", > > bgrt_tab->status); > > This would be less scary if we checked for known broken and known good > version values instead of removing the check altogether, i.e. 0 and 1. Could we add some quirk for these broken hardware instead of changing the normal code? > > The whole point of the version field is that it tells us about the > layout of the BGRT table, so it's not exactly a useless check. Agreed. Thanks Dave ^ permalink raw reply [flat|nested] 8+ messages in thread
* Re: [PATCH] x86/efi-bgrt: remove the check of the version field 2016-08-17 5:44 ` Dave Young @ 2016-08-18 20:41 ` Matt Fleming [not found] ` <20160818204130.GQ30909-mF/unelCI9GS6iBeEJttW/XRex20P6io@public.gmane.org> 0 siblings, 1 reply; 8+ messages in thread From: Matt Fleming @ 2016-08-18 20:41 UTC (permalink / raw) To: Dave Young Cc: Icenowy Zheng, Thomas Gleixner, Ingo Molnar, H . Peter Anvin, x86, linux-efi, linux-kernel, Josh Triplett, Josh Boyer, Andy Lutomirski On Wed, 17 Aug, at 01:44:13PM, Dave Young wrote: > > Could we add some quirk for these broken hardware instead of changing > the normal code? I'd prefer not to do that if possible. Due to the way that the BIOS ecosystem works, this kind of broken firmware spreads across the industry, appearing in newer versions of products from the same vendor and even products from different vendors. Continuously updating a quirks table as additional broken platforms are discovered simply does not scale. ^ permalink raw reply [flat|nested] 8+ messages in thread
[parent not found: <20160818204130.GQ30909-mF/unelCI9GS6iBeEJttW/XRex20P6io@public.gmane.org>]
* Re: [PATCH] x86/efi-bgrt: remove the check of the version field [not found] ` <20160818204130.GQ30909-mF/unelCI9GS6iBeEJttW/XRex20P6io@public.gmane.org> @ 2016-08-22 7:28 ` Dave Young [not found] ` <388401471855799@web30j.yandex.ru> 0 siblings, 1 reply; 8+ messages in thread From: Dave Young @ 2016-08-22 7:28 UTC (permalink / raw) To: Matt Fleming Cc: Icenowy Zheng, Thomas Gleixner, Ingo Molnar, H . Peter Anvin, x86-DgEjT+Ai2ygdnm+yROfE0A, linux-efi-u79uwXL29TY76Z2rM5mHXA, linux-kernel-u79uwXL29TY76Z2rM5mHXA, Josh Triplett, Josh Boyer, Andy Lutomirski On 08/18/16 at 09:41pm, Matt Fleming wrote: > On Wed, 17 Aug, at 01:44:13PM, Dave Young wrote: > > > > Could we add some quirk for these broken hardware instead of changing > > the normal code? > > I'd prefer not to do that if possible. Due to the way that the BIOS > ecosystem works, this kind of broken firmware spreads across the > industry, appearing in newer versions of products from the same vendor > and even products from different vendors. > > Continuously updating a quirks table as additional broken platforms > are discovered simply does not scale. Ok, I assumed that they are limited like one point in the web url http://wiki.osdev.org/Broken_UEFI_implementations But I arm probably wrong like you said. Please ignore the comment then. Thanks Dave ^ permalink raw reply [flat|nested] 8+ messages in thread
[parent not found: <388401471855799@web30j.yandex.ru>]
[parent not found: <388401471855799-X2xH9E7M2qxxpj1cXAZ9Bg@public.gmane.org>]
* Re: [PATCH] x86/efi-bgrt: remove the check of the version field [not found] ` <388401471855799-X2xH9E7M2qxxpj1cXAZ9Bg@public.gmane.org> @ 2016-08-24 7:30 ` Dave Young 0 siblings, 0 replies; 8+ messages in thread From: Dave Young @ 2016-08-24 7:30 UTC (permalink / raw) To: Icenowy Zheng Cc: Matt Fleming, Thomas Gleixner, Ingo Molnar, H . Peter Anvin, x86-DgEjT+Ai2ygdnm+yROfE0A@public.gmane.org, linux-efi-u79uwXL29TY76Z2rM5mHXA@public.gmane.org, linux-kernel-u79uwXL29TY76Z2rM5mHXA@public.gmane.org, Josh Triplett, Josh Boyer, Andy Lutomirski On 08/22/16 at 04:49pm, Icenowy Zheng wrote: > > > 22.08.2016, 15:28, "Dave Young" <dyoung-H+wXaHxf7aLQT0dZR+AlfA@public.gmane.org>: > > On 08/18/16 at 09:41pm, Matt Fleming wrote: > >> On Wed, 17 Aug, at 01:44:13PM, Dave Young wrote: > >> > > >> > Could we add some quirk for these broken hardware instead of changing > >> > the normal code? > >> > >> I'd prefer not to do that if possible. Due to the way that the BIOS > >> ecosystem works, this kind of broken firmware spreads across the > >> industry, appearing in newer versions of products from the same vendor > >> and even products from different vendors. > >> > >> Continuously updating a quirks table as additional broken platforms > >> are discovered simply does not scale. > > > > Ok, I assumed that they are limited like one point in the web url > > http://wiki.osdev.org/Broken_UEFI_implementations > > At least I think all Thinkpads suffer from this. Icenowy, sorry for late reply, I missed it. I'm not sure other version, but my T440s does work well. > > > > > But I arm probably wrong like you said. Please ignore the comment then. > > Thanks Dave ^ permalink raw reply [flat|nested] 8+ messages in thread
end of thread, other threads:[~2016-08-24 7:30 UTC | newest]
Thread overview: 8+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
[not found] <20160809052546.31462-1-icenowy@aosc.xyz>
[not found] ` <20160809052546.31462-1-icenowy-ymACFijhrKM@public.gmane.org>
2016-08-10 12:52 ` [PATCH] x86/efi-bgrt: remove the check of the version field Ingo Molnar
[not found] ` <120791470839405@web16h.yandex.ru>
[not found] ` <120791470839405-TUpq1W2QCG9xpj1cXAZ9Bg@public.gmane.org>
2016-08-11 8:48 ` Ingo Molnar
2016-08-15 12:56 ` Matt Fleming
2016-08-15 16:09 ` Josh Triplett
[not found] ` <20160815125643.GG30909-mF/unelCI9GS6iBeEJttW/XRex20P6io@public.gmane.org>
2016-08-17 5:44 ` Dave Young
2016-08-18 20:41 ` Matt Fleming
[not found] ` <20160818204130.GQ30909-mF/unelCI9GS6iBeEJttW/XRex20P6io@public.gmane.org>
2016-08-22 7:28 ` Dave Young
[not found] ` <388401471855799@web30j.yandex.ru>
[not found] ` <388401471855799-X2xH9E7M2qxxpj1cXAZ9Bg@public.gmane.org>
2016-08-24 7:30 ` Dave Young
This is a public inbox, see mirroring instructions for how to clone and mirror all data and code used for this inbox; as well as URLs for NNTP newsgroup(s).