From: Jesse Barnes <jbarnes@virtuousgeek.org>
To: Steven Rostedt <rostedt@goodmis.org>
Cc: LKML <linux-kernel@vger.kernel.org>,
Andrew Morton <akpm@linux-foundation.org>,
Chandru Siddalingappa <chandru@linux.vnet.ibm.com>
Subject: Re: [PATCH] PCI hotplug: ibmphp: Add check to prevent reading beyond mapped area
Date: Thu, 11 Nov 2010 09:09:12 -0800 [thread overview]
Message-ID: <20101111090912.7ae22625@jbarnes-desktop> (raw)
In-Reply-To: <1289276427.12418.86.camel@gandalf.stny.rr.com>
On Mon, 08 Nov 2010 23:20:27 -0500
Steven Rostedt <rostedt@goodmis.org> wrote:
> While testing various randconfigs with ktest.pl, I hit the following panic:
>
> BUG: unable to handle kernel paging request at f7e54b03
> IP: [<c0d63409>] ibmphp_access_ebda+0x101/0x19bb
>
> Adding printks, I found that the loop that reads the ebda blocks
> can move out of the mapped section.
>
> ibmphp_access_ebda: start=f7e44c00 size=5120 end=f7e46000
> ibmphp_access_ebda: io_mem=f7e44d80 offset=384
> ibmphp_access_ebda: io_mem=f7e54b03 offset=65283
>
> The start of the iomap was at f7e44c00 and had a size of 5120,
> making the end f7e46000. We start with an offset of 0x180 or
> 384, giving the first read at 0xf7e44d80. Reading that location
> yields 65283, which is much bigger than the 5120 that was allocated
> and makes the next read at f7e54b03 which is outside the mapped area.
>
> Perhaps this is a bug in the driver, or buggy hardware, but this patch
> is more about not crashing my box on start up and just giving a warning
> if it detects this error.
>
> This patch at least lets my box boot with just a warning.
>
> Cc: Jesse Barnes <jbarnes@virtuousgeek.org>
> Cc: Chandru Siddalingappa <chandru@linux.vnet.ibm.com>
> Signed-off-by: Steven Rostedt <rostedt@goodmis.org>
>
> ---
> drivers/pci/hotplug/ibmphp_ebda.c | 6 ++++++
> 1 file changed, 6 insertions(+)
Applied to my for-linus branch, thanks.
--
Jesse Barnes, Intel Open Source Technology Center
prev parent reply other threads:[~2010-11-11 17:09 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2010-11-09 4:20 Steven Rostedt
2010-11-11 17:09 ` Jesse Barnes [this message]
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=20101111090912.7ae22625@jbarnes-desktop \
--to=jbarnes@virtuousgeek.org \
--cc=akpm@linux-foundation.org \
--cc=chandru@linux.vnet.ibm.com \
--cc=linux-kernel@vger.kernel.org \
--cc=rostedt@goodmis.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®