lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  PHC 
Open Source and information security mailing list archives
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Date:   Tue, 21 Jul 2020 07:23:26 +0200
From:   Christoph Hellwig <>
To:     Luc Van Oostenryck <>
Cc:     Christoph Hellwig <>,
        "David S. Miller" <>,
        Jakub Kicinski <>,
        Alexei Starovoitov <>,
        Daniel Borkmann <>,
        Alexey Kuznetsov <>,
        Hideaki YOSHIFUJI <>,
        Eric Dumazet <>,,,,,,,,,,,,,,,,,,,,,
Subject: Re: [PATCH 02/24] bpfilter: fix up a sparse annotation

On Tue, Jul 21, 2020 at 04:40:16AM +0200, Luc Van Oostenryck wrote:
> > = 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 be dereferenced, the concept of address-space is meaningless
> for them, so it's never useful to warn when it's dropped and
> '__force' is thus not needed).

That's what I thought. but if I remove it here I actually do get a

CHECK   net/bpfilter/bpfilter_kern.c
net/bpfilter/bpfilter_kern.c:52:21: warning: cast removes address space '__user' of expression

Using this recent sparse build:$ sparse --version

Powered by blists - more mailing lists