Re: [Xen-devel] [PATCH V6 1/4] x86/mm: Add array_index_nospec to guest provided index values

2020-01-07 Thread Jan Beulich
On 07.01.2020 15:31, Alexandru Stefan ISAILA wrote: > > > On 07.01.2020 15:55, Jan Beulich wrote: >> On 07.01.2020 14:25, Alexandru Stefan ISAILA wrote: >>> On 27.12.2019 10:01, Jan Beulich wrote: On 23.12.2019 15:04, Alexandru Stefan ISAILA wrote: > --- a/xen/arch/x86/mm/mem_access.c

Re: [Xen-devel] [PATCH V6 1/4] x86/mm: Add array_index_nospec to guest provided index values

2020-01-07 Thread Alexandru Stefan ISAILA
On 07.01.2020 15:55, Jan Beulich wrote: > On 07.01.2020 14:25, Alexandru Stefan ISAILA wrote: >> On 27.12.2019 10:01, Jan Beulich wrote: >>> On 23.12.2019 15:04, Alexandru Stefan ISAILA wrote: --- a/xen/arch/x86/mm/mem_access.c +++ b/xen/arch/x86/mm/mem_access.c @@ -366,11 +366,12

Re: [Xen-devel] [PATCH V6 1/4] x86/mm: Add array_index_nospec to guest provided index values

2020-01-07 Thread Jan Beulich
On 07.01.2020 14:25, Alexandru Stefan ISAILA wrote: > On 27.12.2019 10:01, Jan Beulich wrote: >> On 23.12.2019 15:04, Alexandru Stefan ISAILA wrote: >>> --- a/xen/arch/x86/mm/mem_access.c >>> +++ b/xen/arch/x86/mm/mem_access.c >>> @@ -366,11 +366,12 @@ long p2m_set_mem_access(struct domain *d,

Re: [Xen-devel] [PATCH V6 1/4] x86/mm: Add array_index_nospec to guest provided index values

2020-01-07 Thread Alexandru Stefan ISAILA
On 27.12.2019 10:01, Jan Beulich wrote: > (re-sending, as I still don't see the mail having appeared on the list) > > On 23.12.2019 15:04, Alexandru Stefan ISAILA wrote: >> Changes since V5: >> - Add black lines > > Luckily no color comes through in plain text mails ;-) > >> ---

Re: [Xen-devel] [PATCH V6 1/4] x86/mm: Add array_index_nospec to guest provided index values

2019-12-27 Thread Jan Beulich
On 27.12.2019 11:52, George Dunlap wrote: > On 12/27/19 7:59 AM, Jan Beulich wrote: >> On 23.12.2019 19:08, George Dunlap wrote: >>> What about the attached series of patches (compile-tested only)? >> >> This ... >> >>> +#define nospec_clip(index, size) \ >>> +({

Re: [Xen-devel] [PATCH V6 1/4] x86/mm: Add array_index_nospec to guest provided index values

2019-12-27 Thread George Dunlap
On 12/27/19 7:59 AM, Jan Beulich wrote: > On 23.12.2019 19:08, George Dunlap wrote: >> What about the attached series of patches (compile-tested only)? > > This ... > >> +#define nospec_clip(index, size) \ >> +({ \ >> +bool

Re: [Xen-devel] [PATCH V6 1/4] x86/mm: Add array_index_nospec to guest provided index values

2019-12-27 Thread Jan Beulich
(re-sending, as I still don't see the mail having appeared on the list) On 23.12.2019 15:04, Alexandru Stefan ISAILA wrote: > Changes since V5: > - Add black lines Luckily no color comes through in plain text mails ;-) > --- a/xen/arch/x86/mm/mem_access.c > +++

Re: [Xen-devel] [PATCH V6 1/4] x86/mm: Add array_index_nospec to guest provided index values

2019-12-27 Thread Jan Beulich
On 23.12.2019 19:08, George Dunlap wrote: > What about the attached series of patches (compile-tested only)? This ... >+#define nospec_clip(index, size) \ >+({ \ >+bool clipped = (index >= size); \ >+index =

Re: [Xen-devel] [PATCH V6 1/4] x86/mm: Add array_index_nospec to guest provided index values

2019-12-26 Thread Jan Beulich
On 23.12.2019 19:08, George Dunlap wrote: > On 12/23/19 2:04 PM, Alexandru Stefan ISAILA wrote: >> This patch aims to sanitize indexes, potentially guest provided >> values, for altp2m_eptp[] and altp2m_p2m[] arrays. >> >> Requested-by: Jan Beulich >> Signed-off-by: Alexandru Isaila >> --- >>

Re: [Xen-devel] [PATCH V6 1/4] x86/mm: Add array_index_nospec to guest provided index values

2019-12-23 Thread George Dunlap
On 12/23/19 2:04 PM, Alexandru Stefan ISAILA wrote: > This patch aims to sanitize indexes, potentially guest provided > values, for altp2m_eptp[] and altp2m_p2m[] arrays. > > Requested-by: Jan Beulich > Signed-off-by: Alexandru Isaila > --- > CC: Razvan Cojocaru > CC: Tamas K Lengyel > CC:

Re: [Xen-devel] [PATCH V6 1/4] x86/mm: Add array_index_nospec to guest provided index values

2019-12-23 Thread Tamas K Lengyel
On Mon, Dec 23, 2019 at 7:04 AM Alexandru Stefan ISAILA wrote: > > This patch aims to sanitize indexes, potentially guest provided > values, for altp2m_eptp[] and altp2m_p2m[] arrays. > > Requested-by: Jan Beulich > Signed-off-by: Alexandru Isaila For the mem_access bits: Acked-by: Tamas K

[Xen-devel] [PATCH V6 1/4] x86/mm: Add array_index_nospec to guest provided index values

2019-12-23 Thread Alexandru Stefan ISAILA
This patch aims to sanitize indexes, potentially guest provided values, for altp2m_eptp[] and altp2m_p2m[] arrays. Requested-by: Jan Beulich Signed-off-by: Alexandru Isaila --- CC: Razvan Cojocaru CC: Tamas K Lengyel CC: Petre Pircalabu CC: George Dunlap CC: Jan Beulich CC: Andrew Cooper