Re: [Xen-devel] [PATCH V3 1/3] xen/mem_access: Support for memory-content hiding

2015-07-07 Thread Jan Beulich
>>> On 07.07.15 at 18:20, wrote: > On 07/07/2015 06:40 PM, Jan Beulich wrote: > On 07.07.15 at 17:32, wrote: >>> On 07/07/2015 04:27 PM, Jan Beulich wrote: >>> On 06.07.15 at 17:51, wrote: > @@ -1552,9 +1556,15 @@ bool_t p2m_mem_access_check(paddr_t gpa, unsigned > long gla, >>>

Re: [Xen-devel] [PATCH V3 1/3] xen/mem_access: Support for memory-content hiding

2015-07-07 Thread Razvan Cojocaru
On 07/07/2015 06:40 PM, Jan Beulich wrote: On 07.07.15 at 17:32, wrote: >> On 07/07/2015 04:27 PM, Jan Beulich wrote: >> On 06.07.15 at 17:51, wrote: @@ -1552,9 +1556,15 @@ bool_t p2m_mem_access_check(paddr_t gpa, unsigned long gla, if ( v->arch.vm_event.emula

Re: [Xen-devel] [PATCH V3 1/3] xen/mem_access: Support for memory-content hiding

2015-07-07 Thread Jan Beulich
>>> On 07.07.15 at 17:32, wrote: > On 07/07/2015 04:27 PM, Jan Beulich wrote: > On 06.07.15 at 17:51, wrote: >>> @@ -1552,9 +1556,15 @@ bool_t p2m_mem_access_check(paddr_t gpa, unsigned >>> long gla, >>> >>> if ( v->arch.vm_event.emulate_flags ) >>> { >>> -hvm_mem_access_

Re: [Xen-devel] [PATCH V3 1/3] xen/mem_access: Support for memory-content hiding

2015-07-07 Thread Razvan Cojocaru
On 07/07/2015 04:27 PM, Jan Beulich wrote: On 06.07.15 at 17:51, wrote: >> --- a/xen/arch/x86/domain.c >> +++ b/xen/arch/x86/domain.c >> @@ -269,6 +269,7 @@ struct vcpu *alloc_vcpu_struct(void) >> >> void free_vcpu_struct(struct vcpu *v) >> { >> +xfree(v->arch.vm_event.emul_read_data)

Re: [Xen-devel] [PATCH V3 1/3] xen/mem_access: Support for memory-content hiding

2015-07-07 Thread Lengyel, Tamas
On Tue, Jul 7, 2015 at 9:21 AM, Razvan Cojocaru wrote: > On 07/07/2015 04:15 PM, Lengyel, Tamas wrote: > > > > > > On Tue, Jul 7, 2015 at 9:09 AM, Razvan Cojocaru > > mailto:rcojoc...@bitdefender.com>> wrote: > > > > So VM_EVENT_FLAG_FOREIGN (1 << 1), and then MEM_ACCESS_EMULATE (1 << > 6). >

Re: [Xen-devel] [PATCH V3 1/3] xen/mem_access: Support for memory-content hiding

2015-07-07 Thread Jan Beulich
>>> On 06.07.15 at 17:51, wrote: > --- a/xen/arch/x86/domain.c > +++ b/xen/arch/x86/domain.c > @@ -269,6 +269,7 @@ struct vcpu *alloc_vcpu_struct(void) > > void free_vcpu_struct(struct vcpu *v) > { > +xfree(v->arch.vm_event.emul_read_data); > free_xenheap_page(v); > } Please note th

Re: [Xen-devel] [PATCH V3 1/3] xen/mem_access: Support for memory-content hiding

2015-07-07 Thread Razvan Cojocaru
On 07/07/2015 04:15 PM, Lengyel, Tamas wrote: > > > On Tue, Jul 7, 2015 at 9:09 AM, Razvan Cojocaru > mailto:rcojoc...@bitdefender.com>> wrote: > > So VM_EVENT_FLAG_FOREIGN (1 << 1), and then MEM_ACCESS_EMULATE (1 << 6). > Now you're adding VM_EVENT_FLAG_TOGGLE_SINGLESTEP (1 << 2), and i

Re: [Xen-devel] [PATCH V3 1/3] xen/mem_access: Support for memory-content hiding

2015-07-07 Thread Lengyel, Tamas
On Tue, Jul 7, 2015 at 9:09 AM, Razvan Cojocaru wrote: > On 07/07/2015 03:04 PM, Lengyel, Tamas wrote: > > > > > > On Tue, Jul 7, 2015 at 4:10 AM, Razvan Cojocaru > > mailto:rcojoc...@bitdefender.com>> wrote: > > > > On 07/06/2015 09:30 PM, Lengyel, Tamas wrote: > > > If you'd prefer

Re: [Xen-devel] [PATCH V3 1/3] xen/mem_access: Support for memory-content hiding

2015-07-07 Thread Razvan Cojocaru
On 07/07/2015 03:04 PM, Lengyel, Tamas wrote: > > > On Tue, Jul 7, 2015 at 4:10 AM, Razvan Cojocaru > mailto:rcojoc...@bitdefender.com>> wrote: > > On 07/06/2015 09:30 PM, Lengyel, Tamas wrote: > > If you'd prefer that I do some ground work for the future > (i.e. rename > >

Re: [Xen-devel] [PATCH V3 1/3] xen/mem_access: Support for memory-content hiding

2015-07-07 Thread Razvan Cojocaru
On 07/07/2015 03:04 PM, Lengyel, Tamas wrote: > > > On Tue, Jul 7, 2015 at 4:10 AM, Razvan Cojocaru > mailto:rcojoc...@bitdefender.com>> wrote: > > On 07/06/2015 09:30 PM, Lengyel, Tamas wrote: > > If you'd prefer that I do some ground work for the future > (i.e. rename > >

Re: [Xen-devel] [PATCH V3 1/3] xen/mem_access: Support for memory-content hiding

2015-07-07 Thread Lengyel, Tamas
On Tue, Jul 7, 2015 at 4:10 AM, Razvan Cojocaru wrote: > On 07/06/2015 09:30 PM, Lengyel, Tamas wrote: > > If you'd prefer that I do some ground work for the future (i.e. > rename > > MEM_ACCESS constants, etc.), please let me know. > > > > > > Yeap, that sounds reasonable to me. > > Any

Re: [Xen-devel] [PATCH V3 1/3] xen/mem_access: Support for memory-content hiding

2015-07-07 Thread George Dunlap
On 07/06/2015 04:51 PM, Razvan Cojocaru wrote: > This patch adds support for memory-content hiding, by modifying the > value returned by emulated instructions that read certain memory > addresses that contain sensitive data. The patch only applies to > cases where MEM_ACCESS_EMULATE or MEM_ACCESS_E

Re: [Xen-devel] [PATCH V3 1/3] xen/mem_access: Support for memory-content hiding

2015-07-07 Thread Razvan Cojocaru
On 07/06/2015 09:30 PM, Lengyel, Tamas wrote: > If you'd prefer that I do some ground work for the future (i.e. rename > MEM_ACCESS constants, etc.), please let me know. > > > Yeap, that sounds reasonable to me. Any objections to this renaming? 151 #define MEM_ACCESS_EMULATE_NOWRITE

Re: [Xen-devel] [PATCH V3 1/3] xen/mem_access: Support for memory-content hiding

2015-07-06 Thread Lengyel, Tamas
> > If you'd prefer that I do some ground work for the future (i.e. rename > MEM_ACCESS constants, etc.), please let me know. Yeap, that sounds reasonable to me. Thanks, Tamas ___ Xen-devel mailing list Xen-devel@lists.xen.org http://lists.xen.org/xen-

Re: [Xen-devel] [PATCH V3 1/3] xen/mem_access: Support for memory-content hiding

2015-07-06 Thread Razvan Cojocaru
On 07/06/2015 07:50 PM, Lengyel, Tamas wrote: > Handy feature, thanks for doing it! You're very welcome, I'm quite happy you find it useful. > @@ -1466,6 +1466,10 @@ void p2m_mem_access_emulate_check(struct vcpu *v, > } > > v->arch.vm_event.emulate_flags = violation

Re: [Xen-devel] [PATCH V3 1/3] xen/mem_access: Support for memory-content hiding

2015-07-06 Thread Lengyel, Tamas
Handy feature, thanks for doing it! @@ -1466,6 +1466,10 @@ void p2m_mem_access_emulate_check(struct vcpu *v, > } > > v->arch.vm_event.emulate_flags = violation ? rsp->flags : 0; > + > +if ( rsp->flags & MEM_ACCESS_SET_EMUL_READ_DATA && > So one of the use-cases for this

[Xen-devel] [PATCH V3 1/3] xen/mem_access: Support for memory-content hiding

2015-07-06 Thread Razvan Cojocaru
This patch adds support for memory-content hiding, by modifying the value returned by emulated instructions that read certain memory addresses that contain sensitive data. The patch only applies to cases where MEM_ACCESS_EMULATE or MEM_ACCESS_EMULATE_NOWRITE have been set to a vm_event response. S