Re: [lustre-devel] [PATCH] staging: lustre: Fix a spatch warning due to an assignment from kernel to user space

2016-12-07 Thread James Simmons
> > On 12/07/2016 04:33 PM, Dan Carpenter wrote: > > >Lustre is kind of a mess with regards to keeping user and kernel > > >pointers separate. It's not going to be easy to fix. > > Fair enough. > > I am trying to make a contribution to drivers/staging using sparse. > > With that in mind, do you s

Re: [lustre-devel] [PATCH] staging: lustre: Fix a spatch warning due to an assignment from kernel to user space

2016-12-07 Thread Dan Carpenter
On Wed, Dec 07, 2016 at 04:42:30PM +0100, Quentin Lambert wrote: > > > On 12/07/2016 04:33 PM, Dan Carpenter wrote: > >Lustre is kind of a mess with regards to keeping user and kernel > >pointers separate. It's not going to be easy to fix. > Fair enough. > I am trying to make a contribution to d

Re: [lustre-devel] [PATCH] staging: lustre: Fix a spatch warning due to an assignment from kernel to user space

2016-12-07 Thread Oleg Drokin
On Dec 7, 2016, at 10:20 AM, Quentin Lambert wrote: > Hi all, > > I am looking at the drivers/staging/lustre/lustre/llite/dir.c: > > 1469 /* Call mdc_iocontrol */ > 1470 rc = obd_iocontrol(LL_IOC_FID2MDTIDX, exp, sizeof(fid), > &fid, > 1471

Re: [lustre-devel] [PATCH] staging: lustre: Fix a spatch warning due to an assignment from kernel to user space

2016-12-07 Thread Oleg Drokin
On Dec 7, 2016, at 10:33 AM, Dan Carpenter wrote: > Lustre is kind of a mess with regards to keeping user and kernel > pointers separate. It's not going to be easy to fix. Actually I believe I made significant inroads in properly cleaning (almost?) everything in this area about a year ago (to

Re: [lustre-devel] [PATCH] staging: lustre: Fix a spatch warning due to an assignment from kernel to user space

2016-12-07 Thread Quentin Lambert
On 12/07/2016 04:33 PM, Dan Carpenter wrote: Lustre is kind of a mess with regards to keeping user and kernel pointers separate. It's not going to be easy to fix. Fair enough. I am trying to make a contribution to drivers/staging using sparse. With that in mind, do you still fill I should kee

Re: [lustre-devel] [PATCH] staging: lustre: Fix a spatch warning due to an assignment from kernel to user space

2016-12-07 Thread Dan Carpenter
Lustre is kind of a mess with regards to keeping user and kernel pointers separate. It's not going to be easy to fix. regards, dan carpenter

Re: [lustre-devel] [PATCH] staging: lustre: Fix a spatch warning due to an assignment from kernel to user space

2016-12-07 Thread Dan Carpenter
On Wed, Dec 07, 2016 at 04:20:06PM +0100, Quentin Lambert wrote: > Hi all, > > I am looking at the drivers/staging/lustre/lustre/llite/dir.c: > > 1469 /* Call mdc_iocontrol */ > 1470 rc = obd_iocontrol(LL_IOC_FID2MDTIDX, exp, > sizeof(fid), &fid, > 1471

Re: [lustre-devel] [PATCH] staging: lustre: Fix a spatch warning due to an assignment from kernel to user space

2016-12-07 Thread Quentin Lambert
Hi all, I am looking at the drivers/staging/lustre/lustre/llite/dir.c: 1469 /* Call mdc_iocontrol */ 1470 rc = obd_iocontrol(LL_IOC_FID2MDTIDX, exp, sizeof(fid), &fid, 1471&index); 1472 if (rc) and sparse says

Re: [lustre-devel] [PATCH] staging: lustre: Fix a spatch warning due to an assignment from kernel to user space

2016-12-06 Thread Quentin Lambert
On 12/05/2016 11:58 PM, Oleg Drokin wrote: I guess it's a false positive? Yes, probably. Thank you for the explanation though, I don't fully understand all this yet, I am still learning. Sorry for the noise. Quentin

Re: [lustre-devel] [PATCH] staging: lustre: Fix a spatch warning due to an assignment from kernel to user space

2016-12-05 Thread Oleg Drokin
On Dec 2, 2016, at 12:33 PM, Quentin Lambert wrote: > lnet_ipif_enumerate was assigning a pointer from kernel space to user > space. This patch uses copy_to_user to properly do that assignment. I guess it's a false positive? While lnet_sock_ioctl()->kernel_sock_unlocked_ioctl() does call into t

Re: [PATCH] staging: lustre: Fix a spatch warning due to an assignment from kernel to user space

2016-12-05 Thread Dan Carpenter
On Fri, Dec 02, 2016 at 06:33:32PM +0100, Quentin Lambert wrote: > lnet_ipif_enumerate was assigning a pointer from kernel space to user > space. This patch uses copy_to_user to properly do that assignment. Put the exact warning message here. > > Signed-off-by: Quentin Lambert > --- > shouldn'

[PATCH] staging: lustre: Fix a spatch warning due to an assignment from kernel to user space

2016-12-02 Thread Quentin Lambert
lnet_ipif_enumerate was assigning a pointer from kernel space to user space. This patch uses copy_to_user to properly do that assignment. Signed-off-by: Quentin Lambert --- shouldn't we be using ifc_req instead of ifc_buf? drivers/staging/lustre/lnet/lnet/lib-socket.c |8 +++- 1 file c