All of lore.kernel.org
 help / color / mirror / Atom feed
From: Avi Kivity <avi@redhat.com>
To: "Yang, Wei Y" <wei.y.yang@intel.com>
Cc: "kvm@vger.kernel.org" <kvm@vger.kernel.org>
Subject: Re: [Patch v4 4/4] Add instruction fetch checking when walking guest page table
Date: Sun, 29 May 2011 16:58:35 +0300	[thread overview]
Message-ID: <4DE2510B.2090106@redhat.com> (raw)
In-Reply-To: <5D8008F58939784290FAB48F5497519844E9278013@shsmsx502.ccr.corp.intel.com>

On 05/29/2011 02:42 PM, Yang, Wei Y wrote:
> This patch adds instruction fetch checking when walking guest page table.
>
>
>
> +			/* check if the kernel is fetching from user page */
> +			if (unlikely((pte_access&  PT_USER_MASK)&&
> +				     kvm_read_cr4_bits(vcpu, X86_CR4_SMEP)))
> +				if (fetch_fault&&  !user_fault)
> +					eperm = true;
> +

pte_access is a union of ACC_*_MASK values, so this should be 
ACC_USER_MASK (though the values are the same).

The difference is that bit 0 is execute permission, while in ptes bit 63 
is the no-execute permission.

-- 
error compiling committee.c: too many arguments to function


      reply	other threads:[~2011-05-29 13:58 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2011-05-29 11:42 [Patch v4 4/4] Add instruction fetch checking when walking guest page table Yang, Wei Y
2011-05-29 13:58 ` Avi Kivity [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=4DE2510B.2090106@redhat.com \
    --to=avi@redhat.com \
    --cc=kvm@vger.kernel.org \
    --cc=wei.y.yang@intel.com \
    /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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.