Re: [PATCH 02/24] bpfilter: fix up a sparse annotation

2020-07-20 Thread Al Viro
On Tue, Jul 21, 2020 at 07:23:26AM +0200, Christoph Hellwig wrote: > On Tue, Jul 21, 2020 at 04:40:16AM +0200, Luc Van Oostenryck wrote: > > > req.pid = current->pid; > > > req.cmd = optname; > > > - req.addr = (long __force __user)optval; > > > + req.addr = (__force long)optval; > > > > For

Re: [PATCH 02/24] bpfilter: fix up a sparse annotation

2020-07-20 Thread Christoph Hellwig
On Tue, Jul 21, 2020 at 04:40:16AM +0200, Luc Van Oostenryck wrote: > > req.pid = current->pid; > > req.cmd = optname; > > - req.addr = (long __force __user)optval; > > + req.addr = (__force long)optval; > > For casts to integers, even '__force' is not needed (since integers > can't

Re: [PATCH 02/24] bpfilter: fix up a sparse annotation

2020-07-20 Thread Luc Van Oostenryck
On Mon, Jul 20, 2020 at 02:47:15PM +0200, Christoph Hellwig wrote: > The __user doesn't make sense when casting to an integer type. > > Signed-off-by: Christoph Hellwig > --- > net/bpfilter/bpfilter_kern.c | 2 +- > 1 file changed, 1 insertion(+), 1 deletion(-) > > diff --git

[PATCH 02/24] bpfilter: fix up a sparse annotation

2020-07-20 Thread Christoph Hellwig
The __user doesn't make sense when casting to an integer type. Signed-off-by: Christoph Hellwig --- net/bpfilter/bpfilter_kern.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/net/bpfilter/bpfilter_kern.c b/net/bpfilter/bpfilter_kern.c index 977e9dad72ca4f..713b4b3d02005d