[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <f8132fa7a90a4954831fc3ee30be4329@ausx13mpc120.AMER.DELL.COM>
Date: Tue, 17 Oct 2017 19:10:40 +0000
From: <Mario.Limonciello@...l.com>
To: <pali.rohar@...il.com>
CC: <dvhart@...radead.org>, <andy.shevchenko@...il.com>,
<linux-kernel@...r.kernel.org>,
<platform-driver-x86@...r.kernel.org>, <luto@...nel.org>,
<quasisec@...gle.com>, <rjw@...ysocki.net>, <mjg59@...gle.com>,
<hch@....de>, <greg@...ah.com>, <gnomes@...rguk.ukuu.org.uk>
Subject: RE: [PATCH v9 07/17] platform/x86: dell-smbios: only run if proper
oem string is detected
> -----Original Message-----
> From: Pali Rohár [mailto:pali.rohar@...il.com]
> Sent: Tuesday, October 17, 2017 2:04 PM
> To: Limonciello, Mario <Mario_Limonciello@...l.com>
> Cc: dvhart@...radead.org; Andy Shevchenko <andy.shevchenko@...il.com>;
> LKML <linux-kernel@...r.kernel.org>; platform-driver-x86@...r.kernel.org; Andy
> Lutomirski <luto@...nel.org>; quasisec@...gle.com; rjw@...ysocki.net;
> mjg59@...gle.com; hch@....de; Greg KH <greg@...ah.com>; Alan Cox
> <gnomes@...rguk.ukuu.org.uk>
> Subject: Re: [PATCH v9 07/17] platform/x86: dell-smbios: only run if proper oem
> string is detected
>
> On Tuesday 17 October 2017 13:21:51 Mario Limonciello wrote:
> > The proper way to indicate that a system is a 'supported' Dell System
> > is by the presence of this string in OEM strings.
> >
> > Allowing the driver to load on non-Dell systems will have undefined
> > results.
> >
> > Signed-off-by: Mario Limonciello <mario.limonciello@...l.com>
> > Reviewed-by: Edward O'Callaghan <quasisec@...gle.com>
> > ---
> > drivers/platform/x86/dell-smbios.c | 7 +++++++
> > 1 file changed, 7 insertions(+)
> >
> > diff --git a/drivers/platform/x86/dell-smbios.c b/drivers/platform/x86/dell-
> smbios.c
> > index e9b1ca07c872..7e779278d054 100644
> > --- a/drivers/platform/x86/dell-smbios.c
> > +++ b/drivers/platform/x86/dell-smbios.c
> > @@ -172,8 +172,15 @@ static void __init find_tokens(const struct dmi_header
> *dm, void *dummy)
> >
> > static int __init dell_smbios_init(void)
> > {
> > + const struct dmi_device *valid;
> > int ret;
> >
> > + valid = dmi_find_device(DMI_DEV_TYPE_OEM_STRING, "Dell System",
> NULL);
>
> Are you sure that all Dell machines have exactly this string? IIRC this
> smbios interface via SMM is supported by machines back to 2005... Also
> in other DMI tables in dell-latop there is e.g. "Dell Inc." or "Dell
> Computer Corporation".
>
I checked the spec and it's been there since systems 1999 onward.
> > + if (!valid) {
> > + pr_err("Unable to run on non-Dell system\n");
> > + return -ENODEV;
> > + }
> > +
> > dmi_walk(find_tokens, NULL);
> >
> > if (!da_tokens) {
>
> --
> Pali Rohár
> pali.rohar@...il.com
Powered by blists - more mailing lists