Re: [Xen-devel] [PATCH v4 1/8] public / x86: Introduce __HYPERCALL_dm_op...

2017-01-23 Thread Paul Durrant
> -Original Message- > From: Andrew Cooper [mailto:am...@hermes.cam.ac.uk] On Behalf Of > Andrew Cooper > Sent: 23 January 2017 09:15 > To: Paul Durrant ; xen-de...@lists.xenproject.org > Cc: Ian Jackson ; Jennifer Herbert > ; Daniel De Graaf ; > Wei Liu ; Jan Beulich > Subject: Re: [PATCH

Re: [Xen-devel] [PATCH v4 1/8] public / x86: Introduce __HYPERCALL_dm_op...

2017-01-23 Thread Andrew Cooper
On 20/01/2017 15:02, Paul Durrant wrote: > >>> +if ( !rc && >>> + !copy_buf_to_guest(bufs, nr_bufs, 0, &op, sizeof(op)) ) >> Do all ops need a copyback? If they do, this is fine. If not, it would >> be better to have a copyback boolean which subops set as necessary. > I can restrict c

Re: [Xen-devel] [PATCH v4 1/8] public / x86: Introduce __HYPERCALL_dm_op...

2017-01-20 Thread Paul Durrant
Daniel De Graaf > Subject: Re: [Xen-devel] [PATCH v4 1/8] public / x86: Introduce > __HYPERCALL_dm_op... > > >>> On 20.01.17 at 17:20, wrote: > >> From: Jan Beulich [mailto:jbeul...@suse.com] > >> Sent: 20 January 2017 16:18 > >> >>> On 1

Re: [Xen-devel] [PATCH v4 1/8] public / x86: Introduce __HYPERCALL_dm_op...

2017-01-20 Thread Jan Beulich
>>> On 20.01.17 at 17:20, wrote: >> From: Jan Beulich [mailto:jbeul...@suse.com] >> Sent: 20 January 2017 16:18 >> >>> On 17.01.17 at 18:29, wrote: >> > +#ifndef __XEN_PUBLIC_HVM_DM_OP_H__ >> > +#define __XEN_PUBLIC_HVM_DM_OP_H__ >> > + >> > +#if defined(__XEN__) || defined(__XEN_TOOLS__) >> > +

Re: [Xen-devel] [PATCH v4 1/8] public / x86: Introduce __HYPERCALL_dm_op...

2017-01-20 Thread Jan Beulich
>>> On 17.01.17 at 18:29, wrote: > +static bool copy_buf_from_guest(xen_dm_op_buf_t bufs[], > +unsigned int nr_bufs, void *dst, > +unsigned int idx, size_t dst_size) > +{ > +size_t size = min_t(size_t, dst_size, bufs[idx].size); >

Re: [Xen-devel] [PATCH v4 1/8] public / x86: Introduce __HYPERCALL_dm_op...

2017-01-20 Thread Paul Durrant
> -Original Message- > From: Jan Beulich [mailto:jbeul...@suse.com] > Sent: 20 January 2017 16:18 > To: Paul Durrant > Cc: Andrew Cooper ; Ian Jackson > ; Jennifer Herbert ; > Wei Liu ; xen-de...@lists.xenproject.org; Daniel De > Graaf > Subject: Re: [PATCH v4 1/8] public / x86: Introduce

Re: [Xen-devel] [PATCH v4 1/8] public / x86: Introduce __HYPERCALL_dm_op...

2017-01-20 Thread Wei Liu
On Fri, Jan 20, 2017 at 03:59:22PM +, Paul Durrant wrote: > > -Original Message- > [snip] > > > + > > > +va_start(args, nr_bufs); > > > +for (idx = 0; idx < nr_bufs; idx++) > > > > Coding style. > > Ah, yes. > > > > > > + > > > +int compat_dm_op(domid_t domid, > > > +

Re: [Xen-devel] [PATCH v4 1/8] public / x86: Introduce __HYPERCALL_dm_op...

2017-01-20 Thread Paul Durrant
> -Original Message- [snip] > > + > > +va_start(args, nr_bufs); > > +for (idx = 0; idx < nr_bufs; idx++) > > Coding style. Ah, yes. > > > + > > +int compat_dm_op(domid_t domid, > > + unsigned int nr_bufs, > > + COMPAT_HANDLE_PARAM(compat_dm_op_buf

Re: [Xen-devel] [PATCH v4 1/8] public / x86: Introduce __HYPERCALL_dm_op...

2017-01-20 Thread Wei Liu
On Tue, Jan 17, 2017 at 05:29:49PM +, Paul Durrant wrote: > ...as a set of hypercalls to be used by a device model. > > As stated in the new docs/designs/dm_op.markdown: > > "The aim of DMOP is to prevent a compromised device model from > compromising domains other then the one it is associat

Re: [Xen-devel] [PATCH v4 1/8] public / x86: Introduce __HYPERCALL_dm_op...

2017-01-20 Thread Paul Durrant
> -Original Message- > From: Andrew Cooper > Sent: 20 January 2017 14:35 > To: Paul Durrant ; xen-de...@lists.xenproject.org > Cc: Ian Jackson ; Jennifer Herbert > ; Daniel De Graaf ; > Wei Liu ; Jan Beulich > Subject: Re: [PATCH v4 1/8] public / x86: Introduce __HYPERCALL_dm_op... > > On

Re: [Xen-devel] [PATCH v4 1/8] public / x86: Introduce __HYPERCALL_dm_op...

2017-01-20 Thread Andrew Cooper
On 17/01/17 17:29, Paul Durrant wrote: > ...as a set of hypercalls to be used by a device model. > > As stated in the new docs/designs/dm_op.markdown: > > "The aim of DMOP is to prevent a compromised device model from > compromising domains other then the one it is associated with. (And is > theref

Re: [Xen-devel] [PATCH v4 1/8] public / x86: Introduce __HYPERCALL_dm_op...

2017-01-19 Thread Paul Durrant
> -Original Message- > From: Paul Durrant [mailto:paul.durr...@citrix.com] > Sent: 17 January 2017 17:30 > To: xen-de...@lists.xenproject.org > Cc: Paul Durrant ; Ian Jackson > ; Jennifer Herbert ; > Daniel De Graaf ; Wei Liu ; > Jan Beulich ; Andrew Cooper > > Subject: [PATCH v4 1/8] publ

Re: [Xen-devel] [PATCH v4 1/8] public / x86: Introduce __HYPERCALL_dm_op...

2017-01-18 Thread Daniel De Graaf
On 01/17/2017 12:29 PM, Paul Durrant wrote: ...as a set of hypercalls to be used by a device model. As stated in the new docs/designs/dm_op.markdown: "The aim of DMOP is to prevent a compromised device model from compromising domains other then the one it is associated with. (And is therefore l