From: Jean Delvare <jdelvare@suse.de>
To: Andy Shevchenko <andy.shevchenko@gmail.com>
Cc: LKML <linux-kernel@vger.kernel.org>,
Linus Torvalds <torvalds@linux-foundation.org>
Subject: Re: [PATCH] firmware: dmi: Fortify entry point length checks
Date: Wed, 7 Sep 2022 18:09:03 +0200 [thread overview]
Message-ID: <20220907180903.5a14d3c4@endymion.delvare> (raw)
In-Reply-To: <CAHp75Vf+PdP2AiLOHYnKUWn5KDgvy+1poBHjHZd0hnJKTsGHtg@mail.gmail.com>
On Wed, 7 Sep 2022 18:48:03 +0300, Andy Shevchenko wrote:
> On Wed, Sep 7, 2022 at 6:21 PM Jean Delvare <jdelvare@suse.de> wrote:
> > On Wed, 7 Sep 2022 17:52:10 +0300, Andy Shevchenko wrote:
> > > "NOTE: This value was incorrectly stated in version 2.1 of this specification as
> > > 1Eh. Because of this, there might be version 2.1 implementations that
> > > use either the 1Eh or the 1Fh value, but version 2.2 or later
> > > implementations must use the 1Fh value."
> >
> > Good point, so maybe we should accept 0x1E and treat is silently as
> > 0x1F (which is what we have been doing implicitly so far) for maximum
> > compatibility?
>
> At least the previous comparison covers this case, if I'm not mistaken.
Before my proposed change, yes. After my proposed change, no longer.
Let's not risk a regression, I'll change the check to:
if (memcmp(buf, "_SM_", 4) == 0 &&
buf[5] >= 30 && buf[5] <= 32 &&
dmi_checksum(buf, buf[5])) {
I'll also add a comment stating why we are allowing length 30.
Thanks for the valuable feedback,
--
Jean Delvare
SUSE L3 Support
next prev parent reply other threads:[~2022-09-07 16:09 UTC|newest]
Thread overview: 6+ messages / expand[flat|nested] mbox.gz Atom feed top
2022-09-07 8:30 Jean Delvare
2022-09-07 14:52 ` Andy Shevchenko
2022-09-07 15:21 ` Jean Delvare
2022-09-07 15:48 ` Andy Shevchenko
2022-09-07 16:09 ` Jean Delvare [this message]
2022-09-07 16:22 ` Andy Shevchenko
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=20220907180903.5a14d3c4@endymion.delvare \
--to=jdelvare@suse.de \
--cc=andy.shevchenko@gmail.com \
--cc=linux-kernel@vger.kernel.org \
--cc=torvalds@linux-foundation.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
all inboxes | Powered by JetHome®