public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
From: Yu Zhang <yu.c.zhang@linux.intel.com>
To: Paolo Bonzini <pbonzini@redhat.com>,
	Jim Mattson <jmattson@google.com>,
	David Hildenbrand <david@redhat.com>
Cc: "kvm list" <kvm@vger.kernel.org>,
	LKML <linux-kernel@vger.kernel.org>,
	"Radim Krčmář" <rkrcmar@redhat.com>,
	"Thomas Gleixner" <tglx@linutronix.de>,
	"Ingo Molnar" <mingo@redhat.com>,
	"H . Peter Anvin" <hpa@zytor.com>
Subject: Re: [PATCH] KVM: x86: Fix the NULL pointer parameter in check_cr_write()
Date: Wed, 20 Sep 2017 16:27:16 +0800	[thread overview]
Message-ID: <b44d8759-d2e9-88ea-7693-2c6e877f13d7@linux.intel.com> (raw)
In-Reply-To: <0f652327-03f4-5fba-0717-d1f29e45d6cf@redhat.com>



On 9/20/2017 4:13 PM, Paolo Bonzini wrote:
> On 20/09/2017 08:35, Yu Zhang wrote:
>> 2 reasons I did not choose to change kvm_cpuid(): 1> like Jim's
>> comments, kvm_cpuid() will eventually write the *eax - *edx no
>> matter a cpuid entry is found or not; 2> currently, return value of
>> kvm_cpuid() is either true when an entry is found or false otherwise.
>> We can change kvm_cpuid() to check the pointers of GPRs against NULL
>> and return false immediately. Then the false value would have 2
>> different meanings - entry not found, or invalid params.
>>
>> Paolo, any suggestion? :-)
> Radim, has already sent this version to Linus. :)

Got it. Thanks. :)

Yu
> Paolo
>

      reply	other threads:[~2017-09-20  8:50 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2017-09-18 10:45 [PATCH] KVM: x86: Fix the NULL pointer parameter in check_cr_write() Yu Zhang
2017-09-18 12:19 ` David Hildenbrand
2017-09-18 15:56   ` Jim Mattson
2017-09-20  6:35     ` Yu Zhang
2017-09-20  8:13       ` Paolo Bonzini
2017-09-20  8:27         ` Yu Zhang [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=b44d8759-d2e9-88ea-7693-2c6e877f13d7@linux.intel.com \
    --to=yu.c.zhang@linux.intel.com \
    --cc=david@redhat.com \
    --cc=hpa@zytor.com \
    --cc=jmattson@google.com \
    --cc=kvm@vger.kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=mingo@redhat.com \
    --cc=pbonzini@redhat.com \
    --cc=rkrcmar@redhat.com \
    --cc=tglx@linutronix.de \
    /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