public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
* [PATCH] x86: alternative identifier for Phoenix BIOS
@ 2008-11-15 15:42 Philipp Kohlbecher
  2008-11-16  1:55 ` H. Peter Anvin
  0 siblings, 1 reply; 8+ messages in thread
From: Philipp Kohlbecher @ 2008-11-15 15:42 UTC (permalink / raw)
  To: Ingo Molnar; +Cc: linux-kernel

My laptop (a Samsung X20) contains a Phoenix BIOS and would benefit from 
patch 1e22436eba84edfec9c25e5a25d09062c4f91ca9 (x86: reserve low 64K on 
AMI and Phoenix BIOS boxen).

However, according to /sys/class/dmi/id/bios_vendor, the BIOS identifies
its vendor as "Phoenix Technologies LTD" (sans the comma).

This patch adds the approptiate identifier to the bad_bios_dmi_table in
arch/x86/kernel/setup.c.

The patch compiles cleanly and has been tested successfully on my machine.

Signed-off-by: Philipp Kohlbecher <xt28@gmx.de>

---

Please CC me, I am not on the list.

  arch/x86/kernel/setup.c |    7 +++++++
  1 files changed, 7 insertions(+), 0 deletions(-)

diff --git a/arch/x86/kernel/setup.c b/arch/x86/kernel/setup.c
index 0fa6790..b88fdbe 100644
--- a/arch/x86/kernel/setup.c
+++ b/arch/x86/kernel/setup.c
@@ -767,6 +767,13 @@ static struct dmi_system_id __initdata
bad_bios_dmi_table[] = {
              DMI_MATCH(DMI_BIOS_VENDOR, "Phoenix Technologies, LTD"),
          },
      },
+    {
+        .callback = dmi_low_memory_corruption,
+        .ident = "Phoenix BIOS",
+        .matches = {
+            DMI_MATCH(DMI_BIOS_VENDOR, "Phoenix Technologies LTD"),
+        },
+    },
  #endif
      {}
  };


^ permalink raw reply related	[flat|nested] 8+ messages in thread

* Re: [PATCH] x86: alternative identifier for Phoenix BIOS
  2008-11-15 15:42 [PATCH] x86: alternative identifier for Phoenix BIOS Philipp Kohlbecher
@ 2008-11-16  1:55 ` H. Peter Anvin
  2008-11-16  7:23   ` Ingo Molnar
                     ` (2 more replies)
  0 siblings, 3 replies; 8+ messages in thread
From: H. Peter Anvin @ 2008-11-16  1:55 UTC (permalink / raw)
  To: Philipp Kohlbecher; +Cc: Ingo Molnar, linux-kernel

Philipp Kohlbecher wrote:
> My laptop (a Samsung X20) contains a Phoenix BIOS and would benefit from
> patch 1e22436eba84edfec9c25e5a25d09062c4f91ca9 (x86: reserve low 64K on
> AMI and Phoenix BIOS boxen).
> 
> However, according to /sys/class/dmi/id/bios_vendor, the BIOS identifies
> its vendor as "Phoenix Technologies LTD" (sans the comma).

Given that AMI and Phoenix combined is something like 80% of the BIOS
market, if not more, it might simply be easier to make it unconditional,
 or make it a whitelist instead.

	-hpa

^ permalink raw reply	[flat|nested] 8+ messages in thread

* Re: [PATCH] x86: alternative identifier for Phoenix BIOS
  2008-11-16  1:55 ` H. Peter Anvin
@ 2008-11-16  7:23   ` Ingo Molnar
  2008-11-16 11:11     ` [PATCH v2] x86: more general " Philipp Kohlbecher
  2008-11-16 11:14   ` [PATCH] x86: alternative " Alan Cox
  2008-11-16 16:51   ` Pavel Machek
  2 siblings, 1 reply; 8+ messages in thread
From: Ingo Molnar @ 2008-11-16  7:23 UTC (permalink / raw)
  To: H. Peter Anvin; +Cc: Philipp Kohlbecher, Ingo Molnar, linux-kernel


* H. Peter Anvin <hpa@zytor.com> wrote:

> Philipp Kohlbecher wrote:
> > My laptop (a Samsung X20) contains a Phoenix BIOS and would 
> > benefit from patch 1e22436eba84edfec9c25e5a25d09062c4f91ca9 (x86: 
> > reserve low 64K on AMI and Phoenix BIOS boxen).
> > 
> > However, according to /sys/class/dmi/id/bios_vendor, the BIOS 
> > identifies its vendor as "Phoenix Technologies LTD" (sans the 
> > comma).

Note that we should do a simpler patch: just change the string to 
"Phoenix Technologies" and that will provide a proper match. (DMI 
matches work on substrings too)

Also, note that you can also force this behavior (and the checking) 
via CONFIG_X86_CHECK_BIOS_CORRUPTION=y - that will enable the 
reservation and a debug check regardless of DMI matches.

> Given that AMI and Phoenix combined is something like 80% of the 
> BIOS market, if not more, it might simply be easier to make it 
> unconditional, or make it a whitelist instead.

The (slim) hope would be for them to address the memory corruptions 
that have been reported. It can affect older Linux versions, etc. So 
we want to print the fact to the syslog, based on the DMI strings from 
the reports.

	Ingo

^ permalink raw reply	[flat|nested] 8+ messages in thread

* [PATCH v2] x86: more general identifier for Phoenix BIOS
  2008-11-16  7:23   ` Ingo Molnar
@ 2008-11-16 11:11     ` Philipp Kohlbecher
  2008-11-18 15:12       ` Ingo Molnar
  0 siblings, 1 reply; 8+ messages in thread
From: Philipp Kohlbecher @ 2008-11-16 11:11 UTC (permalink / raw)
  To: Ingo Molnar; +Cc: H. Peter Anvin, Ingo Molnar, linux-kernel

Phoenix BIOSes variously identify their vendor as "Phoenix Technologies, 
LTD" or "Phoenix Technologies LTD" (without the comma.)

This patch makes the identification string in the bad_bios_dmi_table 
more general (following a suggestion by Ingo Molnar), so that both 
versions are handled.

Again, the patched file compiles cleanly and the patch has been tested 
successfully on my machine.

Signed-off-by: Philipp Kohlbecher <xt28@gmx.de>

---

  arch/x86/kernel/setup.c |    2 +-
  1 files changed, 1 insertions(+), 1 deletions(-)

diff --git a/arch/x86/kernel/setup.c b/arch/x86/kernel/setup.c
index 0fa6790..9d5674f 100644
--- a/arch/x86/kernel/setup.c
+++ b/arch/x86/kernel/setup.c
@@ -764,7 +764,7 @@ static struct dmi_system_id __initdata 
bad_bios_dmi_table[] = {
  		.callback = dmi_low_memory_corruption,
  		.ident = "Phoenix BIOS",
  		.matches = {
-			DMI_MATCH(DMI_BIOS_VENDOR, "Phoenix Technologies, LTD"),
+			DMI_MATCH(DMI_BIOS_VENDOR, "Phoenix Technologies"),
  		},
  	},
  #endif

Ingo Molnar wrote:
> * H. Peter Anvin <hpa@zytor.com> wrote:
> 
>> Philipp Kohlbecher wrote:
>>> My laptop (a Samsung X20) contains a Phoenix BIOS and would 
>>> benefit from patch 1e22436eba84edfec9c25e5a25d09062c4f91ca9 (x86: 
>>> reserve low 64K on AMI and Phoenix BIOS boxen).
>>>
>>> However, according to /sys/class/dmi/id/bios_vendor, the BIOS 
>>> identifies its vendor as "Phoenix Technologies LTD" (sans the 
>>> comma).
> 
> Note that we should do a simpler patch: just change the string to 
> "Phoenix Technologies" and that will provide a proper match. (DMI 
> matches work on substrings too)
> 

Done. (I wasn't sure whether you were saying that *I* should write this 
simpler patch or that you would. Anyway, here it is.)

^ permalink raw reply related	[flat|nested] 8+ messages in thread

* Re: [PATCH] x86: alternative identifier for Phoenix BIOS
  2008-11-16  1:55 ` H. Peter Anvin
  2008-11-16  7:23   ` Ingo Molnar
@ 2008-11-16 11:14   ` Alan Cox
  2008-11-18 15:06     ` Ingo Molnar
  2008-11-16 16:51   ` Pavel Machek
  2 siblings, 1 reply; 8+ messages in thread
From: Alan Cox @ 2008-11-16 11:14 UTC (permalink / raw)
  To: H. Peter Anvin; +Cc: Philipp Kohlbecher, Ingo Molnar, linux-kernel

On Sat, 15 Nov 2008 17:55:20 -0800
"H. Peter Anvin" <hpa@zytor.com> wrote:

> Philipp Kohlbecher wrote:
> > My laptop (a Samsung X20) contains a Phoenix BIOS and would benefit from
> > patch 1e22436eba84edfec9c25e5a25d09062c4f91ca9 (x86: reserve low 64K on
> > AMI and Phoenix BIOS boxen).
> > 
> > However, according to /sys/class/dmi/id/bios_vendor, the BIOS identifies
> > its vendor as "Phoenix Technologies LTD" (sans the comma).
> 
> Given that AMI and Phoenix combined is something like 80% of the BIOS
> market, if not more, it might simply be easier to make it unconditional,
>  or make it a whitelist instead.

Far more useful would be to make people aware of the problem. If the BIOS
is scribbling in the low 64K of RAM not just BIOS areas, and doing so
outside of ACPI marked areas they need to fix the BIOS ASAP. If they leave
their BIOSes randomly scribbling in operating system memory areas then as
with previous (hardware related) cases of vendors knowingly shipping
corrupting equipment they'll be building up a huge class action legal
liability.

As such making sure the vendor knows in a way they cannot deny is a very
useful activity.

Alan

^ permalink raw reply	[flat|nested] 8+ messages in thread

* Re: [PATCH] x86: alternative identifier for Phoenix BIOS
  2008-11-16  1:55 ` H. Peter Anvin
  2008-11-16  7:23   ` Ingo Molnar
  2008-11-16 11:14   ` [PATCH] x86: alternative " Alan Cox
@ 2008-11-16 16:51   ` Pavel Machek
  2 siblings, 0 replies; 8+ messages in thread
From: Pavel Machek @ 2008-11-16 16:51 UTC (permalink / raw)
  To: H. Peter Anvin; +Cc: Philipp Kohlbecher, Ingo Molnar, linux-kernel

On Sat 2008-11-15 17:55:20, H. Peter Anvin wrote:
> Philipp Kohlbecher wrote:
> > My laptop (a Samsung X20) contains a Phoenix BIOS and would benefit from
> > patch 1e22436eba84edfec9c25e5a25d09062c4f91ca9 (x86: reserve low 64K on
> > AMI and Phoenix BIOS boxen).
> > 
> > However, according to /sys/class/dmi/id/bios_vendor, the BIOS identifies
> > its vendor as "Phoenix Technologies LTD" (sans the comma).
> 
> Given that AMI and Phoenix combined is something like 80% of the BIOS
> market, if not more, it might simply be easier to make it unconditional,
>  or make it a whitelist instead.

Whitelist is bad:

even if bios vendor is a good boy and tests their bios with linux,
they will not notice that they corrupt low 64K (not whitelisted), and
will not fix their bios.

-- 
(english) http://www.livejournal.com/~pavelmachek
(cesky, pictures) http://atrey.karlin.mff.cuni.cz/~pavel/picture/horses/blog.html

^ permalink raw reply	[flat|nested] 8+ messages in thread

* Re: [PATCH] x86: alternative identifier for Phoenix BIOS
  2008-11-16 11:14   ` [PATCH] x86: alternative " Alan Cox
@ 2008-11-18 15:06     ` Ingo Molnar
  0 siblings, 0 replies; 8+ messages in thread
From: Ingo Molnar @ 2008-11-18 15:06 UTC (permalink / raw)
  To: Alan Cox; +Cc: H. Peter Anvin, Philipp Kohlbecher, Ingo Molnar, linux-kernel


* Alan Cox <alan@lxorguk.ukuu.org.uk> wrote:

> On Sat, 15 Nov 2008 17:55:20 -0800
> "H. Peter Anvin" <hpa@zytor.com> wrote:
> 
> > Philipp Kohlbecher wrote:
> > > My laptop (a Samsung X20) contains a Phoenix BIOS and would benefit from
> > > patch 1e22436eba84edfec9c25e5a25d09062c4f91ca9 (x86: reserve low 64K on
> > > AMI and Phoenix BIOS boxen).
> > > 
> > > However, according to /sys/class/dmi/id/bios_vendor, the BIOS identifies
> > > its vendor as "Phoenix Technologies LTD" (sans the comma).
> > 
> > Given that AMI and Phoenix combined is something like 80% of the BIOS
> > market, if not more, it might simply be easier to make it unconditional,
> >  or make it a whitelist instead.
> 
> Far more useful would be to make people aware of the problem. If the 
> BIOS is scribbling in the low 64K of RAM not just BIOS areas, and 
> doing so outside of ACPI marked areas they need to fix the BIOS 
> ASAP. If they leave their BIOSes randomly scribbling in operating 
> system memory areas then as with previous (hardware related) cases 
> of vendors knowingly shipping corrupting equipment they'll be 
> building up a huge class action legal liability.
> 
> As such making sure the vendor knows in a way they cannot deny is a 
> very useful activity.

CONFIG_X86_CHECK_BIOS_CORRUPTION=y will do that, it prints:

  Corrupted low memory at 0x1000 (4096 phys) = 0x1234
  Memory corruption detected in low memory
  < stack trace >

if enough distros turn it on (at least in their debug kernels) it 
creates the right kind of user pressure.

This debug feature to catch BIOS-generated low-memory corruption is 
already upstream.

	Ingo

^ permalink raw reply	[flat|nested] 8+ messages in thread

* Re: [PATCH v2] x86: more general identifier for Phoenix BIOS
  2008-11-16 11:11     ` [PATCH v2] x86: more general " Philipp Kohlbecher
@ 2008-11-18 15:12       ` Ingo Molnar
  0 siblings, 0 replies; 8+ messages in thread
From: Ingo Molnar @ 2008-11-18 15:12 UTC (permalink / raw)
  To: Philipp Kohlbecher; +Cc: H. Peter Anvin, Ingo Molnar, linux-kernel


* Philipp Kohlbecher <xt28@gmx.de> wrote:

> Phoenix BIOSes variously identify their vendor as "Phoenix Technologies,  
> LTD" or "Phoenix Technologies LTD" (without the comma.)
>
> This patch makes the identification string in the bad_bios_dmi_table  
> more general (following a suggestion by Ingo Molnar), so that both  
> versions are handled.
>
> Again, the patched file compiles cleanly and the patch has been tested  
> successfully on my machine.
>
> Signed-off-by: Philipp Kohlbecher <xt28@gmx.de>

applied to tip/x86/urgent, thanks Philipp!

I also tagged it for -stable backporting.

>> Note that we should do a simpler patch: just change the string to 
>> "Phoenix Technologies" and that will provide a proper match. (DMI 
>> matches work on substrings too)
>
> Done. (I wasn't sure whether you were saying that *I* should write 
> this simpler patch or that you would. Anyway, here it is.)

yeah, developers/users writing patches is always the preferred 
solution! It's the vector that spreads Linux development to new areas 
and new people.

	Ingo

^ permalink raw reply	[flat|nested] 8+ messages in thread

end of thread, other threads:[~2008-11-18 15:12 UTC | newest]

Thread overview: 8+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2008-11-15 15:42 [PATCH] x86: alternative identifier for Phoenix BIOS Philipp Kohlbecher
2008-11-16  1:55 ` H. Peter Anvin
2008-11-16  7:23   ` Ingo Molnar
2008-11-16 11:11     ` [PATCH v2] x86: more general " Philipp Kohlbecher
2008-11-18 15:12       ` Ingo Molnar
2008-11-16 11:14   ` [PATCH] x86: alternative " Alan Cox
2008-11-18 15:06     ` Ingo Molnar
2008-11-16 16:51   ` Pavel Machek

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox