lists.openwall.net   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  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite for Android: free password hash cracker in your pocket
[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Message-ID: <61008eb0-25f3-5986-b5f8-b9844a18dcef@pengutronix.de>
Date:   Fri, 30 Oct 2020 20:14:45 +0100
From:   Marc Kleine-Budde <mkl@...gutronix.de>
To:     Oliver Hartkopp <socketcan@...tkopp.net>,
        kernel test robot <lkp@...el.com>
Cc:     kbuild-all@...ts.01.org, linux-kernel@...r.kernel.org,
        Rich Felker <dalias@...c.org>,
        Yoshinori Sato <ysato@...rs.sourceforge.jp>,
        linux-can <linux-can@...r.kernel.org>
Subject: Re: net/can/isotp.c:1240:13: sparse: sparse: incorrect type in
 initializer (different address spaces)

On 10/30/20 7:55 PM, Oliver Hartkopp wrote:
>>>    1229	
>>>    1230	static int isotp_getsockopt(struct socket *sock, int level, int optname,
>>>    1231				    char __user *optval, int __user *optlen)
>>>    1232	{
>>>    1233		struct sock *sk = sock->sk;
>>>    1234		struct isotp_sock *so = isotp_sk(sk);
>>>    1235		int len;
>>>    1236		void *val;
>>>    1237	
>>>    1238		if (level != SOL_CAN_ISOTP)
>>>    1239			return -EINVAL;
>>>> 1240		if (get_user(len, optlen))
>>>    1241			return -EFAULT;
>>>    1242		if (len < 0)
>>>    1243			return -EINVAL;
>>>    1244	
> 
> Sorry but there are tons of identical items in the networking subsystem 
> in getsockopt functions.
> 
> And I don't get the sparse warning with make C=1 for none of the 
> occurrences of

Due to ARCH=sh

looks like sh is missing the some __user annotations so that sparse spwes these
warnings.

Marc

-- 
Pengutronix e.K.                 | Marc Kleine-Budde           |
Embedded Linux                   | https://www.pengutronix.de  |
Vertretung West/Dortmund         | Phone: +49-231-2826-924     |
Amtsgericht Hildesheim, HRA 2686 | Fax:   +49-5121-206917-5555 |



Download attachment "signature.asc" of type "application/pgp-signature" (489 bytes)

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ