public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
From: Ingo Molnar <mingo@kernel.org>
To: Vitaly Kuznetsov <vkuznets@redhat.com>
Cc: x86@kernel.org, linux-kernel@vger.kernel.org,
	Thomas Gleixner <tglx@linutronix.de>,
	Ingo Molnar <mingo@redhat.com>, "H. Peter Anvin" <hpa@zytor.com>,
	Cathy Avery <cavery@redhat.com>,
	"K. Y. Srinivasan" <kys@microsoft.com>,
	Bjorn Helgaas <helgaas@kernel.org>
Subject: Re: [PATCH v3] x86: don't assume all fb devices are PCI devices
Date: Tue, 15 Mar 2016 11:09:46 +0100	[thread overview]
Message-ID: <20160315100946.GA20587@gmail.com> (raw)
In-Reply-To: <1458030033-10122-1-git-send-email-vkuznets@redhat.com>


* Vitaly Kuznetsov <vkuznets@redhat.com> wrote:

> When booting Hyper-V Generation 2 guests KASAN reports the following
> out-of-bounds access:
> 
> BUG: KASAN: slab-out-of-bounds in fb_is_primary_device+0x58/0x70 at addr
>   ffff880079cf0eb0
> Read of size 8 by task swapper/0/1
> ...
>  [<ffffffff81581308>] dump_stack+0x63/0x8b
>  [<ffffffff812e1f99>] print_trailer+0xf9/0x150
>  [<ffffffff812e7344>] object_err+0x34/0x40
>  [<ffffffff812e9630>] kasan_report_error+0x230/0x550
>  [<ffffffff812e9ee8>] kasan_report+0x58/0x60
>  [<ffffffff812e4500>] ? ___slab_alloc+0x80/0x490
>  [<ffffffff81878a28>] ? fb_is_primary_device+0x58/0x70
>  [<ffffffff812e87cd>] __asan_load8+0x5d/0x70
>  [<ffffffff81878a28>] fb_is_primary_device+0x58/0x70
>  [<ffffffff8162357a>] register_framebuffer+0xda/0x5b0
>  [<ffffffff816234a0>] ? remove_conflicting_framebuffers+0x50/0x50
> ...
> 
> The issue is caused by the to_pci_dev() call with no check that the given
> info->device is in fact a pci device and some fb devices (Hyper-V FB, EFI
> FB,...) are not. While on it, cleanup the function.
> 
> Signed-off-by: Vitaly Kuznetsov <vkuznets@redhat.com>
> ---
> Changes since v2: cleanup fb_is_primary_device() [Bjorn Helgaas, Ingo Molnar].

Applied, thanks!

I also added Bjorn's Acked-by to the commit, as the only change from the last 
version are the cleanups.

Thanks,

	Ingo

  reply	other threads:[~2016-03-15 10:09 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2016-03-15  8:20 [PATCH v3] x86: don't assume all fb devices are PCI devices Vitaly Kuznetsov
2016-03-15 10:09 ` Ingo Molnar [this message]
2016-03-15 10:39 ` [tip:x86/urgent] x86/video: Don't assume all FB " tip-bot for Vitaly Kuznetsov

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=20160315100946.GA20587@gmail.com \
    --to=mingo@kernel.org \
    --cc=cavery@redhat.com \
    --cc=helgaas@kernel.org \
    --cc=hpa@zytor.com \
    --cc=kys@microsoft.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=mingo@redhat.com \
    --cc=tglx@linutronix.de \
    --cc=vkuznets@redhat.com \
    --cc=x86@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