Tim Deegan
2010-May-25 14:49 UTC
[Xen-devel] [PATCH] HVM guests are allowed to use the entire virtual address space for
whatever they want, without any Xen hole. __addr_ok() is therefore always true for such guests. Signed-off-by: Tim Deegan <Tim.Deegan@citrix.com> _______________________________________________ Xen-devel mailing list Xen-devel@lists.xensource.com http://lists.xensource.com/xen-devel
Keir Fraser
2010-May-25 15:04 UTC
Re: [Xen-devel] [PATCH] HVM guests are allowed to use the entire virtual address space for
I think this is already handled correctly by guest_access.h, which is what really matters. Nowadays copy_{to,from}_user (but not __copy_{to,from}_user) are mainly for private usage only by the guest-access macros, and just a few other arch-dependent PV_specific bits of code. Of course the __ versions are still generally useful as ''copy but catch any fault'' functions. -- Keir On 25/05/2010 15:49, "Tim Deegan" <Tim.Deegan@citrix.com> wrote:> whatever they want, without any Xen hole. __addr_ok() is therefore > always true for such guests. > > Signed-off-by: Tim Deegan <Tim.Deegan@citrix.com> > >_______________________________________________ Xen-devel mailing list Xen-devel@lists.xensource.com http://lists.xensource.com/xen-devel
Keir Fraser
2010-May-25 15:11 UTC
Re: [Xen-devel] [PATCH] HVM guests are allowed to use the entire virtual address space for
Put another way, I''d rather ASSERT(!is_hvm_vcpu(current)) than further reinforce the current confusion around these macros by supporting an obsolete usage. -- Keir On 25/05/2010 16:04, "Keir Fraser" <keir.fraser@eu.citrix.com> wrote:> I think this is already handled correctly by guest_access.h, which is what > really matters. Nowadays copy_{to,from}_user (but not __copy_{to,from}_user) > are mainly for private usage only by the guest-access macros, and just a few > other arch-dependent PV_specific bits of code. Of course the __ versions are > still generally useful as ''copy but catch any fault'' functions. > > -- Keir > > On 25/05/2010 15:49, "Tim Deegan" <Tim.Deegan@citrix.com> wrote: > >> whatever they want, without any Xen hole. __addr_ok() is therefore >> always true for such guests. >> >> Signed-off-by: Tim Deegan <Tim.Deegan@citrix.com> >> >> > > > > _______________________________________________ > Xen-devel mailing list > Xen-devel@lists.xensource.com > http://lists.xensource.com/xen-devel_______________________________________________ Xen-devel mailing list Xen-devel@lists.xensource.com http://lists.xensource.com/xen-devel
Tim Deegan
2010-May-25 15:14 UTC
Re: [Xen-devel] [PATCH] HVM guests are allowed to use the entire virtual address space for
At 16:04 +0100 on 25 May (1274803495), Keir Fraser wrote:> I think this is already handled correctly by guest_access.h, which is what > really matters. Nowadays copy_{to,from}_user (but not __copy_{to,from}_user) > are mainly for private usage only by the guest-access macros, and just a few > other arch-dependent PV_specific bits of code. Of course the __ versions are > still generally useful as ''copy but catch any fault'' functions.OK, can I suggest the attached change instead? It brings the compat guest-handle macros in line with the normal ones. Signed-off-by: Tim Deegan <Tim.Deegan@citrix.com> There are a few more callers of access_ok() around but at first glance they seem all to be PV-only. Cheers, Tim. -- Tim Deegan <Tim.Deegan@citrix.com> Principal Software Engineer, XenServer Engineering Citrix Systems UK Ltd. (Company #02937203, SL9 0BG) _______________________________________________ Xen-devel mailing list Xen-devel@lists.xensource.com http://lists.xensource.com/xen-devel
Keir Fraser
2010-May-25 16:24 UTC
Re: [Xen-devel] [PATCH] HVM guests are allowed to use the entire virtual address space for
On 25/05/2010 16:14, "Tim Deegan" <Tim.Deegan@eu.citrix.com> wrote:> At 16:04 +0100 on 25 May (1274803495), Keir Fraser wrote: >> I think this is already handled correctly by guest_access.h, which is what >> really matters. Nowadays copy_{to,from}_user (but not __copy_{to,from}_user) >> are mainly for private usage only by the guest-access macros, and just a few >> other arch-dependent PV_specific bits of code. Of course the __ versions are >> still generally useful as ''copy but catch any fault'' functions. > > OK, can I suggest the attached change instead? It brings the > compat guest-handle macros in line with the normal ones.Yeah, that''s a good bug fix. Thanks, K. _______________________________________________ Xen-devel mailing list Xen-devel@lists.xensource.com http://lists.xensource.com/xen-devel
Paolo Bonzini
2010-Jul-26 09:52 UTC
[Xen-devel] Re: [PATCH] HVM guests are allowed to use the entire virtual address space for
On 05/25/2010 04:49 PM, Tim Deegan wrote:> whatever they want, without any Xen hole. __addr_ok() is therefore > always true for such guests. > > Signed-off-by: Tim Deegan <Tim.Deegan@citrix.com>Sorry for picking up yet another old patch after two months. :) Do you have a testcase for this or the other patch in the thread? Paolo _______________________________________________ Xen-devel mailing list Xen-devel@lists.xensource.com http://lists.xensource.com/xen-devel
Tim Deegan
2010-Jul-26 10:00 UTC
[Xen-devel] Re: [PATCH] HVM guests are allowed to use the entire virtual address space for
At 10:52 +0100 on 26 Jul (1280141550), Paolo Bonzini wrote:> On 05/25/2010 04:49 PM, Tim Deegan wrote: > > whatever they want, without any Xen hole. __addr_ok() is therefore > > always true for such guests. > > > > Signed-off-by: Tim Deegan <Tim.Deegan@citrix.com> > > Sorry for picking up yet another old patch after two months. :) > > Do you have a testcase for this or the other patch in the thread?I''m afraid not - this was a very old patch that had been gathering dust at the bottom of the XenServer code base. Calling e.g. GNTTABOP_setup_table from inside a HVM guest with the frame_list argument somewhere in the Xen virtual address space should trigger it, though. Cheers, Tim. -- Tim Deegan <Tim.Deegan@citrix.com> Principal Software Engineer, XenServer Engineering Citrix Systems UK Ltd. (Company #02937203, SL9 0BG) _______________________________________________ Xen-devel mailing list Xen-devel@lists.xensource.com http://lists.xensource.com/xen-devel
Keir Fraser
2010-Jul-26 10:57 UTC
Re: [Xen-devel] Re: [PATCH] HVM guests are allowed to use the entire virtual address space for
On 26/07/2010 11:00, "Tim Deegan" <Tim.Deegan@citrix.com> wrote:> At 10:52 +0100 on 26 Jul (1280141550), Paolo Bonzini wrote: >> On 05/25/2010 04:49 PM, Tim Deegan wrote: >>> whatever they want, without any Xen hole. __addr_ok() is therefore >>> always true for such guests. >>> >>> Signed-off-by: Tim Deegan <Tim.Deegan@citrix.com> >> >> Sorry for picking up yet another old patch after two months. :) >> >> Do you have a testcase for this or the other patch in the thread? > > I''m afraid not - this was a very old patch that had been gathering dust > at the bottom of the XenServer code base. Calling > e.g. GNTTABOP_setup_table from inside a HVM guest with the frame_list > argument somewhere in the Xen virtual address space should trigger it, > though.The patch never got applied (to xen-unstable) by the way. We agreed on xen-unstable:21456, which was a more targeted bug fix. -- Keir> Cheers, > > Tim._______________________________________________ Xen-devel mailing list Xen-devel@lists.xensource.com http://lists.xensource.com/xen-devel