Re: [PATCH 1/4] Check for serial key in dmi_name_in_vendors

Previous message: [thread] [date] [author]
Next message: [thread] [date] [author]
From: H. Peter Anvin
Date: Friday, October 31, 2008 - 3:50 pm

Alok Kataria wrote:

On reviewing this, I'm quite nervous about this patch.
dmi_name_in_vendors() is matched against short strings like "IBM" which
could end up in the serial number of another product by pure chance if
some vendor uses alpha serial numbers.

In fact, the *only* instance of dmi_name_in_vendors() in the upstream
kernel tree that "git grep" can find is:

drivers/misc/thinkpad_acpi.c:   if (dmi_name_in_vendors("IBM"))
drivers/misc/thinkpad_acpi.c:   else if (dmi_name_in_vendors("LENOVO"))

I think matching against the serial number would be just plain wrong here.

Since there is only one user, we could change that user, perhaps to take
a bitmask or pointer to one of several canned lists as an argument, or
we can introduce another entry point.

	-hpa
--
Previous message: [thread] [date] [author]
Next message: [thread] [date] [author]

Messages in current thread:
[PATCH 1/4] Check for serial key in dmi_name_in_vendors, Alok Kataria, (Fri Oct 24, 5:21 pm)
Re: [PATCH 1/4] Check for serial key in dmi_name_in_vendors, H. Peter Anvin, (Fri Oct 31, 3:50 pm)