linux-arm-kernel.lists.infradead.org archive mirror
 help / color / mirror / Atom feed
From: robherring2@gmail.com (Rob Herring)
To: linux-arm-kernel@lists.infradead.org
Subject: [PATCH v2] ARM: KVM: prevent NULL pointer dereferences with KVM VCPU ioctl
Date: Tue, 14 May 2013 11:53:34 -0500	[thread overview]
Message-ID: <51926C0E.2000504@gmail.com> (raw)
In-Reply-To: <5191E2BF.5040102@linaro.org>

On 05/14/2013 02:07 AM, Andre Przywara wrote:
> On 05/14/2013 12:42 AM, Christoffer Dall wrote:
>> On Mon, May 13, 2013 at 3:23 PM, Andre Przywara
>> <andre.przywara@linaro.org> wrote:
>>> ooks like a natural candidate, but unfortunately struct kvm_vcpu is
>>> opaque
>>> here, so dereferencing it does not work without further changes which
>>> I do
>>> not deem to be justified. I used kvm_coproc.h instead, which is loosely
>>> related (KVM_[SG]ET_ONE_REG) and just simply works. If you don't think
>>> that's appropriate, just drop me a note. Patch follows in a separate
>>> mail.
>>
>> eh, not crazy about the idea. x86 has
>> arch/x86/include/asm/kvm_guest.h, which may be the most appropriate,
>> or this could be generalized to other architectures as well and
>> included in include/linux/kvm_host.h.
>>
>> we can just stick it in arch/arm/kvm/arm.c for now and move later if
>> need be, no need to create a fuzz.
> 
> Ok, would you mind to commit v2 and add the "inline" on the way?

You don't really need the inline if it's not in a header. The compiler
will inline it anyway.

Rob

  reply	other threads:[~2013-05-14 16:53 UTC|newest]

Thread overview: 7+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2013-05-08 22:28 [PATCH v2] ARM: KVM: prevent NULL pointer dereferences with KVM VCPU ioctl Andre Przywara
2013-05-13  5:52 ` Christoffer Dall
2013-05-13 22:23   ` Andre Przywara
2013-05-13 22:42     ` Christoffer Dall
2013-05-14  7:07       ` Andre Przywara
2013-05-14 16:53         ` Rob Herring [this message]
2013-05-14 17:01         ` Christoffer Dall

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=51926C0E.2000504@gmail.com \
    --to=robherring2@gmail.com \
    --cc=linux-arm-kernel@lists.infradead.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;
as well as URLs for NNTP newsgroup(s).