xen-devel.lists.xenproject.org archive mirror
 help / color / mirror / Atom feed
From: Andrew Cooper <andrew.cooper3@citrix.com>
To: Jan Beulich <JBeulich@suse.com>
Cc: xen-devel <xen-devel@lists.xenproject.org>, Keir Fraser <keir@xen.org>
Subject: Re: [PATCH 1/3] x86/mmuext: tighten TLB flush address checks
Date: Wed, 20 Jan 2016 14:48:51 +0000	[thread overview]
Message-ID: <569F9E53.7030305@citrix.com> (raw)
In-Reply-To: <569FAABD02000078000C92BA@prv-mh.provo.novell.com>

On 20/01/16 14:41, Jan Beulich wrote:
>>>> On 20.01.16 at 15:23, <andrew.cooper3@citrix.com> wrote:
>> On 20/01/16 14:05, Jan Beulich wrote:
>>> Addresses passed by PV guests should be subjected to __addr_ok(),
>>> avoiding undue TLB flushes; .
>>>
>>> Signed-off-by: Jan Beulich <jbeulich@suse.com>
>>>
>>> --- a/xen/arch/x86/mm.c
>>> +++ b/xen/arch/x86/mm.c
>>> @@ -3268,8 +3268,9 @@ long do_mmuext_op(
>>>          case MMUEXT_INVLPG_LOCAL:
>>>              if ( unlikely(d != pg_owner) )
>>>                  rc = -EPERM;
>>> -            else if ( !paging_mode_enabled(d) ||
>>> -                      paging_invlpg(curr, op.arg1.linear_addr) != 0 )
>>> +            else if ( !paging_mode_enabled(d)
>>> +                      ? __addr_ok(op.arg1.linear_addr)
>>> +                      : paging_invlpg(curr, op.arg1.linear_addr) )
>> paging_mode_enabled() changes depending on whether the guest has
>> logdirty currently enabled.
>>
>> As you have also patched paging_invlpg() to DTRT with __addr_ok(), I
>> think this hunk can be dropped.
> How that? Without the change there's no address validation at
> all when !paging_mode_enabled(d).

Oh - there is an inversion in there.

Sorry for the noise.

Entire patch Reviewed-by: Andrew Cooper <andrew.cooper3@citrix.com>

  reply	other threads:[~2016-01-20 14:48 UTC|newest]

Thread overview: 12+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2016-01-20 14:00 [PATCH 0/3] x86: XSA-168 follow-up Jan Beulich
2016-01-20 14:05 ` [PATCH 1/3] x86/mmuext: tighten TLB flush address checks Jan Beulich
2016-01-20 14:23   ` Andrew Cooper
2016-01-20 14:41     ` Jan Beulich
2016-01-20 14:48       ` Andrew Cooper [this message]
2016-01-20 14:06 ` [PATCH 2/3] x86/PV: relax LDT address check Jan Beulich
2016-01-20 14:27   ` Andrew Cooper
2016-01-20 14:07 ` [PATCH 3/3] x86/paging: invlpg() hook returns boolean Jan Beulich
2016-01-20 14:30   ` Andrew Cooper
2016-01-20 14:43     ` Jan Beulich
2016-01-20 14:42   ` Tim Deegan
2016-01-20 15:03   ` George Dunlap

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=569F9E53.7030305@citrix.com \
    --to=andrew.cooper3@citrix.com \
    --cc=JBeulich@suse.com \
    --cc=keir@xen.org \
    --cc=xen-devel@lists.xenproject.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).