All of lore.kernel.org
 help / color / mirror / Atom feed
From: "Roger Pau Monné" <roger.pau@citrix.com>
To: Jan Beulich <JBeulich@suse.com>, Tim Deegan <tim@xen.org>
Cc: AndrewCooper <andrew.cooper3@citrix.com>,
	ian.jackson@eu.citrix.com,
	xen-devel <xen-devel@lists.xenproject.org>
Subject: Re: [xen-unstable test] 56456: regressions - FAIL
Date: Tue, 19 May 2015 17:07:00 +0200	[thread overview]
Message-ID: <555B5194.8030908@citrix.com> (raw)
In-Reply-To: <555B2CBA020000780007B8FE@mail.emea.novell.com>

El 19/05/15 a les 12.29, Jan Beulich ha escrit:
>>>> On 19.05.15 at 12:20, <tim@xen.org> wrote:
>> At 12:19 +0100 on 18 May (1431951570), Jan Beulich wrote:
>>>>>> On 18.05.15 at 12:50, <roger.pau@citrix.com> wrote:
>>>> El 18/05/15 a les 12.17, Tim Deegan ha escrit:
>>>>>  - have map_dirty_bitmap() DTRT, with something like access_ok() +
>>>>>    a linear-pagetable lookup to find the frame.
>>>>
>>>> That was my first intention, but AFAICT we have no function in tree to
>>>> resolve a PV guest VA into a GFN/MFN. The closest thing I could find was
>>>> using guest_walk_tables + guest_walk_to_gfn in order to obtain the gfn.
>>>> Should I send a patch to introduce a pv_gva_to_gfn function based on that?
>>>
>>> Isn't that what we have the linear page table and guest_map_l1e()
>>> for?
>>
>> Yes, or in this case guest_get_eff_l1e().  We'd want to make sure we
>> get_page() the underlying page as well to guard against it being freed
>> and reused while we have a mapping.
>>
>> That won't check user/supervisor or write permissions in the upper
>> levels of the tree.  OTOH, __copy_to_user() doesn't either, so maybe
>> we don't care.
> 
> Hmm, permissions are being checked by __copy_to_user() afaict
> (due to us using the actual page tables), so that being bypassed
> here would seem wrong then.

The only way I see to check for permissions of all levels is to use
guest_walk_tables instead of guest_get_eff_l1e, but that's going to make
this quite slow (as compared to the previous implementation).

Roger.

  reply	other threads:[~2015-05-19 15:08 UTC|newest]

Thread overview: 15+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2015-05-16  8:51 [xen-unstable test] 56456: regressions - FAIL osstest service user
2015-05-16 11:45 ` Roger Pau Monné
2015-05-18  8:34   ` Jan Beulich
2015-05-18 10:17     ` Tim Deegan
2015-05-18 10:36       ` Jan Beulich
2015-05-18 10:50       ` Roger Pau Monné
2015-05-18 11:00         ` Tim Deegan
2015-05-18 11:19         ` Jan Beulich
2015-05-19 10:20           ` Tim Deegan
2015-05-19 10:29             ` Jan Beulich
2015-05-19 15:07               ` Roger Pau Monné [this message]
2015-05-20  8:58                 ` Roger Pau Monné
2015-05-20  9:12                   ` Jan Beulich
2015-05-20  9:43                     ` Tim Deegan
2015-05-20  9:55                       ` Roger Pau Monné

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=555B5194.8030908@citrix.com \
    --to=roger.pau@citrix.com \
    --cc=JBeulich@suse.com \
    --cc=andrew.cooper3@citrix.com \
    --cc=ian.jackson@eu.citrix.com \
    --cc=tim@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 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.