Re: [PATCH v4 4/9] cxl/mem: Add basic IOCTL interface

2021-02-17 Thread Jonathan Cameron
On Tue, 16 Feb 2021 10:34:32 -0800 Ben Widawsky wrote: ... > > > diff --git a/drivers/cxl/mem.c b/drivers/cxl/mem.c > > > index 237b956f0be0..4ca4f5afd9d2 100644 > > > --- a/drivers/cxl/mem.c > > > +++ b/drivers/cxl/mem.c > > > @@ -686,7 +686,11 @@ static int cxl_validate_cmd_from_user(struct cx

Re: [PATCH v4 4/9] cxl/mem: Add basic IOCTL interface

2021-02-16 Thread Ben Widawsky
On 21-02-16 18:28:49, Jonathan Cameron wrote: > On Tue, 16 Feb 2021 09:53:14 -0800 > Ben Widawsky wrote: > > > On 21-02-16 15:22:23, Jonathan Cameron wrote: > > > On Mon, 15 Feb 2021 17:45:33 -0800 > > > Ben Widawsky wrote: > > > > > > > Add a straightforward IOCTL that provides a mechanism f

Re: [PATCH v4 4/9] cxl/mem: Add basic IOCTL interface

2021-02-16 Thread Jonathan Cameron
On Tue, 16 Feb 2021 09:53:14 -0800 Ben Widawsky wrote: > On 21-02-16 15:22:23, Jonathan Cameron wrote: > > On Mon, 15 Feb 2021 17:45:33 -0800 > > Ben Widawsky wrote: > > > > > Add a straightforward IOCTL that provides a mechanism for userspace to > > > query the supported memory device comman

Re: [PATCH v4 4/9] cxl/mem: Add basic IOCTL interface

2021-02-16 Thread Ben Widawsky
On 21-02-16 18:12:05, Al Viro wrote: > On Mon, Feb 15, 2021 at 05:45:33PM -0800, Ben Widawsky wrote: > > + if (cmd->info.size_in) { > > + mbox_cmd.payload_in = kvzalloc(cmd->info.size_in, GFP_KERNEL); > > + if (!mbox_cmd.payload_in) { > > + rc = -ENOMEM; > >

Re: [PATCH v4 4/9] cxl/mem: Add basic IOCTL interface

2021-02-16 Thread Al Viro
On Mon, Feb 15, 2021 at 05:45:33PM -0800, Ben Widawsky wrote: > + if (cmd->info.size_in) { > + mbox_cmd.payload_in = kvzalloc(cmd->info.size_in, GFP_KERNEL); > + if (!mbox_cmd.payload_in) { > + rc = -ENOMEM; > + goto out; > +

Re: [PATCH v4 4/9] cxl/mem: Add basic IOCTL interface

2021-02-16 Thread Ben Widawsky
On 21-02-16 15:22:23, Jonathan Cameron wrote: > On Mon, 15 Feb 2021 17:45:33 -0800 > Ben Widawsky wrote: > > > Add a straightforward IOCTL that provides a mechanism for userspace to > > query the supported memory device commands. CXL commands as they appear > > to userspace are described as part

Re: [PATCH v4 4/9] cxl/mem: Add basic IOCTL interface

2021-02-16 Thread Jonathan Cameron
On Mon, 15 Feb 2021 17:45:33 -0800 Ben Widawsky wrote: > Add a straightforward IOCTL that provides a mechanism for userspace to > query the supported memory device commands. CXL commands as they appear > to userspace are described as part of the UAPI kerneldoc. The command > list returned via thi

[PATCH v4 4/9] cxl/mem: Add basic IOCTL interface

2021-02-15 Thread Ben Widawsky
Add a straightforward IOCTL that provides a mechanism for userspace to query the supported memory device commands. CXL commands as they appear to userspace are described as part of the UAPI kerneldoc. The command list returned via this IOCTL will contain the full set of commands that the driver sup