Re: [PATCH 3/6] x86/mem-paging: use guest handle for XENMEM_paging_op_prep

2020-04-20 Thread Julien Grall
On 20/04/2020 13:35, Jan Beulich wrote: On 20.04.2020 14:31, Jan Beulich wrote: On 20.04.2020 14:20, Julien Grall wrote: On 20/04/2020 13:12, Jan Beulich wrote: On 20.04.2020 14:08, Julien Grall wrote: Are the unions plain ones? I could see room for behavior like the one you describe with t

Re: [PATCH 3/6] x86/mem-paging: use guest handle for XENMEM_paging_op_prep

2020-04-20 Thread Jan Beulich
On 20.04.2020 14:31, Jan Beulich wrote: > On 20.04.2020 14:20, Julien Grall wrote: >> On 20/04/2020 13:12, Jan Beulich wrote: >>> On 20.04.2020 14:08, Julien Grall wrote: >>> Are the unions plain ones? I could see room for behavior like >>> the one you describe with transparent unions, albeit still

Re: [PATCH 3/6] x86/mem-paging: use guest handle for XENMEM_paging_op_prep

2020-04-20 Thread Jan Beulich
On 20.04.2020 14:20, Julien Grall wrote: > Hi, > > On 20/04/2020 13:12, Jan Beulich wrote: >> On 20.04.2020 14:08, Julien Grall wrote: >>> On 20/04/2020 08:26, Jan Beulich wrote: On 17.04.2020 19:13, Julien Grall wrote: > FWIW, the different matters on Arm. Although, it looks like the >>>

Re: [PATCH 3/6] x86/mem-paging: use guest handle for XENMEM_paging_op_prep

2020-04-20 Thread Julien Grall
Hi, On 20/04/2020 13:12, Jan Beulich wrote: On 20.04.2020 14:08, Julien Grall wrote: On 20/04/2020 08:26, Jan Beulich wrote: On 17.04.2020 19:13, Julien Grall wrote: FWIW, the different matters on Arm. Although, it looks like the compiler will not warn you if you are using the wrong handler :

Re: [PATCH 3/6] x86/mem-paging: use guest handle for XENMEM_paging_op_prep

2020-04-20 Thread Jan Beulich
On 20.04.2020 14:08, Julien Grall wrote: > On 20/04/2020 08:26, Jan Beulich wrote: >> On 17.04.2020 19:13, Julien Grall wrote: >>> FWIW, the different matters on Arm. Although, it looks like the >>> compiler will not warn you if you are using the wrong handler :(. >> >> I find this highly suspiciou

Re: [PATCH 3/6] x86/mem-paging: use guest handle for XENMEM_paging_op_prep

2020-04-20 Thread Julien Grall
Hi Jan, On 20/04/2020 08:26, Jan Beulich wrote: On 17.04.2020 19:13, Julien Grall wrote: On 17/04/2020 10:44, Jan Beulich wrote: On 17.04.2020 10:37, Julien Grall wrote: On 16/04/2020 16:46, Jan Beulich wrote: --- a/xen/arch/x86/mm/p2m.c +++ b/xen/arch/x86/mm/p2m.c @@ -1779,7 +1779,8 @@ void

Re: [PATCH 3/6] x86/mem-paging: use guest handle for XENMEM_paging_op_prep

2020-04-20 Thread Jan Beulich
On 17.04.2020 19:13, Julien Grall wrote: > On 17/04/2020 10:44, Jan Beulich wrote: >> On 17.04.2020 10:37, Julien Grall wrote: >>> On 16/04/2020 16:46, Jan Beulich wrote: --- a/xen/arch/x86/mm/p2m.c +++ b/xen/arch/x86/mm/p2m.c @@ -1779,7 +1779,8 @@ void p2m_mem_paging_populate(struct

Re: [PATCH 3/6] x86/mem-paging: use guest handle for XENMEM_paging_op_prep

2020-04-17 Thread Julien Grall
Hi Jan, On 17/04/2020 10:44, Jan Beulich wrote: On 17.04.2020 10:37, Julien Grall wrote: On 16/04/2020 16:46, Jan Beulich wrote: While it should have been this way from the beginning, not doing so will become an actual problem with PVH Dom0. I think the current code is also buggy on PV dom0

Re: [PATCH 3/6] x86/mem-paging: use guest handle for XENMEM_paging_op_prep

2020-04-17 Thread Jan Beulich
On 17.04.2020 10:37, Julien Grall wrote: > On 16/04/2020 16:46, Jan Beulich wrote: >> While it should have been this way from the beginning, not doing so will >> become an actual problem with PVH Dom0. > > I think the current code is also buggy on PV dom0 because the buffer > is not locked in memo

Re: [PATCH 3/6] x86/mem-paging: use guest handle for XENMEM_paging_op_prep

2020-04-17 Thread Julien Grall
Hi Jan, On 16/04/2020 16:46, Jan Beulich wrote: While it should have been this way from the beginning, not doing so will become an actual problem with PVH Dom0. I think the current code is also buggy on PV dom0 because the buffer is not locked in memory. So you have no promise the buffer will