From: Ben Hutchings <ben@decadent.org.uk>
To: Jean Delvare <jdelvare@suse.de>
Cc: linux-kernel <linux-kernel@vger.kernel.org>,
Andrew Morton <akpm@linux-foundation.org>
Subject: Re: Suspect loop in dmi_scan_machine()
Date: Mon, 8 Jul 2013 17:33:57 +0100 [thread overview]
Message-ID: <20130708163357.GA4752@decadent.org.uk> (raw)
In-Reply-To: <1373298554.4298.228.camel@chaos.site>
On Mon, Jul 08, 2013 at 05:49:14PM +0200, Jean Delvare wrote:
> Hi Ben,
>
> I am looking at this commit of yours:
>
> https://git.kernel.org/cgit/linux/kernel/git/torvalds/linux.git/commit/drivers/firmware/dmi_scan.c?id=79bae42d51a5d498500c890c19ef76df41d2bf59
>
> and am a little worried about the for loop in dmi_scan_machine()
> (non-EFI case):
[...]
I don't see any of the bugs you describe. Let me explain what
I probably should have put in a comment:
We want to find a DMI header at [0xf0000, 0xffff0] and possibly an
SMBIOS header 16 bytes before that. buf contains a copy of the 32
bytes centred at p. On the first iteration p - 16 is out of range, so
the first 16 bytes of the buffer are filled with zeroes.
Does that address your concerns? If not then please explain precisely
how this loop can go wrong.
Ben.
--
Ben Hutchings
We get into the habit of living before acquiring the habit of thinking.
- Albert Camus
next prev parent reply other threads:[~2013-07-08 16:34 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2013-07-08 15:49 Suspect loop in dmi_scan_machine() Jean Delvare
2013-07-08 16:33 ` Ben Hutchings [this message]
2013-07-09 8:35 ` Jean Delvare
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=20130708163357.GA4752@decadent.org.uk \
--to=ben@decadent.org.uk \
--cc=akpm@linux-foundation.org \
--cc=jdelvare@suse.de \
--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