From: Jean Delvare <khali@linux-fr.org>
To: Andrew Morton <akpm@linux-foundation.org>
Cc: LKML <linux-kernel@vger.kernel.org>,
Andi Kleen <andi@firstfloor.org>,
Jesse Barnes <jbarnes@virtuousgeek.org>
Subject: Re: [PATCH] Make dmi_name_in_vendors more focused
Date: Thu, 10 Nov 2011 09:13:40 +0100 [thread overview]
Message-ID: <20111110091340.71e11192@endymion.delvare> (raw)
In-Reply-To: <20111109142557.70cb43cb.akpm@linux-foundation.org>
On Wed, 9 Nov 2011 14:25:57 -0800, Andrew Morton wrote:
> On Fri, 4 Nov 2011 10:26:47 +0100
> Jean Delvare <khali@linux-fr.org> wrote:
>
> > The current implementation of dmi_name_in_vendors() is an invitation
> > to lazy coding and false positives [1]. Searching for a string in 8
> > different DMI fields is something nobody should ever need to do. You
> > know what you're looking for, so you should know where to look. strstr
> > isn't fast, especially when it fails, so we should avoid calling it
> > when it just can't succeed.
> >
> > Looking at the current users of the function, it seems clear to me
> > that they are looking for a system or board vendor name, so let's
> > limit dmi_name_in_vendors to these two DMI fields. This much better
> > matches the function name, BTW.
> >
> > [1] We currently have code looking for short names in DMI data, such
> > as "IBM" or "ASUS". I let you guess what will happen the day other
> > vendors ship products named, for example, "SCHREIBMEISTER" or "PEGASUS".
> >
> > Signed-off-by: Jean Delvare <khali@linux-fr.org>
> > Cc: Andi Kleen <andi@firstfloor.org>
> > ---
> > This patch was already sent on 2011-05-15. I thought Andrew had picked
> > it up but apparently not, otherwise it should already be upstream by
> > now.
>
> I did merge it in May and have carried it in -mm (and hence in
> linux-next) since then. I have sent it to Jesse at least twice, with
> no effect.
>
> I'll send it to Linus for 3.3-rc1, OK?
If you want, sure. Note however that it might be less risky to send it
now, as I just audited the code. By 3.3-rc1, new callers might have
appeared and nobody may remember to audit again. Committing this kind
of change right after rc1 seems better than during the merge window, as
it lets us ensure that no new use case sneaked it.
--
Jean Delvare
next prev parent reply other threads:[~2011-11-10 8:13 UTC|newest]
Thread overview: 6+ messages / expand[flat|nested] mbox.gz Atom feed top
2011-11-04 9:26 [PATCH] Make dmi_name_in_vendors more focused Jean Delvare
2011-11-09 22:25 ` Andrew Morton
2011-11-10 3:35 ` Jesse Barnes
2011-11-10 8:07 ` Jean Delvare
2011-11-10 8:13 ` Jean Delvare [this message]
2011-11-10 8:28 ` Andrew Morton
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20111110091340.71e11192@endymion.delvare \
--to=khali@linux-fr.org \
--cc=akpm@linux-foundation.org \
--cc=andi@firstfloor.org \
--cc=jbarnes@virtuousgeek.org \
--cc=linux-kernel@vger.kernel.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox