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: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Message-ID: <f7c6d781-f21a-a6be-8f08-9f20ef894ca3@theobroma-systems.com>
Date:   Tue, 27 Mar 2018 12:20:24 +0200
From:   Martin Elshuber <martin.elshuber@...obroma-systems.com>
To:     kbuild test robot <lkp@...el.com>,
        Jakob Unterwurzacher <jakob.unterwurzacher@...obroma-systems.com>
Cc:     kbuild-all@...org,
        Philipp Tomsich <philipp.tomsich@...obroma-systems.com>,
        Wolfgang Grandegger <wg@...ndegger.com>,
        Marc Kleine-Budde <mkl@...gutronix.de>,
        linux-can@...r.kernel.org, linux-kernel@...r.kernel.org
Subject: Re: [PATCH v3 1/1] can: ucan: add driver for Theobroma Systems UCAN
 devices

fixed and rechecked again with sparse

Am 24.03.18 um 12:43 schrieb kbuild test robot:
> Hi Jakob,
>
> Thank you for the patch! Perhaps something to improve:
>
> [auto build test WARNING on net-next/master]
> [also build test WARNING on v4.16-rc6]
> [cannot apply to next-20180323]
> [if your patch is applied to the wrong git tree, please drop us a note to help improve the system]
>
> url:    https://github.com/0day-ci/linux/commits/Jakob-Unterwurzacher/can-ucan-add-driver-for-Theobroma-Systems-UCAN-devices/20180324-164143
> reproduce:
>         # apt-get install sparse
>         make ARCH=x86_64 allmodconfig
>         make C=1 CF=-D__CHECK_ENDIAN__
>
>
> sparse warnings: (new ones prefixed by >>)
>
>>> drivers/net/can/usb/ucan.c:301:16: sparse: restricted __le32 degrades to integer
>    drivers/net/can/usb/ucan.c:414:32: sparse: incorrect type in argument 5 (different base types) @@    expected unsigned short [unsigned] [usertype] value @@    got  short [unsigned] [usertype] value @@
>    drivers/net/can/usb/ucan.c:414:32:    expected unsigned short [unsigned] [usertype] value
>    drivers/net/can/usb/ucan.c:414:32:    got restricted __le16 [usertype] <noident>
>    drivers/net/can/usb/ucan.c:428:32: sparse: incorrect type in argument 5 (different base types) @@    expected unsigned short [unsigned] [usertype] value @@    got  short [unsigned] [usertype] value @@
>    drivers/net/can/usb/ucan.c:428:32:    expected unsigned short [unsigned] [usertype] value
>    drivers/net/can/usb/ucan.c:428:32:    got restricted __le16 [usertype] <noident>
>    drivers/net/can/usb/ucan.c:683:44: sparse: incorrect type in argument 2 (different base types) @@    expected unsigned long [unsigned] [usertype] size @@    got d long [unsigned] [usertype] size @@
>    drivers/net/can/usb/ucan.c:683:44:    expected unsigned long [unsigned] [usertype] size
>    drivers/net/can/usb/ucan.c:683:44:    got restricted __le16 [usertype] wMaxPacketSize
>    drivers/net/can/usb/ucan.c:700:44: sparse: incorrect type in argument 2 (different base types) @@    expected unsigned long [unsigned] [usertype] size @@    got d long [unsigned] [usertype] size @@
>    drivers/net/can/usb/ucan.c:700:44:    expected unsigned long [unsigned] [usertype] size
>    drivers/net/can/usb/ucan.c:700:44:    got restricted __le16 [usertype] wMaxPacketSize
>    drivers/net/can/usb/ucan.c:752:25: sparse: cast to restricted __le16
>    drivers/net/can/usb/ucan.c:779:36: sparse: incorrect type in argument 5 (different base types) @@    expected int [signed] buffer_length @@    got restricted __le1int [signed] buffer_length @@
>    drivers/net/can/usb/ucan.c:779:36:    expected int [signed] buffer_length
>    drivers/net/can/usb/ucan.c:779:36:    got restricted __le16 [usertype] wMaxPacketSize
>    drivers/net/can/usb/ucan.c:793:54: sparse: incorrect type in argument 2 (different base types) @@    expected unsigned long [unsigned] [usertype] size @@    got d long [unsigned] [usertype] size @@
>    drivers/net/can/usb/ucan.c:793:54:    expected unsigned long [unsigned] [usertype] size
>    drivers/net/can/usb/ucan.c:793:54:    got restricted __le16 [usertype] wMaxPacketSize
>    drivers/net/can/usb/ucan.c:853:62: sparse: incorrect type in argument 2 (different base types) @@    expected unsigned long [unsigned] [usertype] size @@    got d long [unsigned] [usertype] size @@
>    drivers/net/can/usb/ucan.c:853:62:    expected unsigned long [unsigned] [usertype] size
>    drivers/net/can/usb/ucan.c:853:62:    got restricted __le16 [usertype] wMaxPacketSize
>    drivers/net/can/usb/ucan.c:877:61: sparse: incorrect type in argument 2 (different base types) @@    expected unsigned long [unsigned] [usertype] size @@    got d long [unsigned] [usertype] size @@
>    drivers/net/can/usb/ucan.c:877:61:    expected unsigned long [unsigned] [usertype] size
>    drivers/net/can/usb/ucan.c:877:61:    got restricted __le16 [usertype] wMaxPacketSize
>    drivers/net/can/usb/ucan.c:891:44: sparse: incorrect type in argument 5 (different base types) @@    expected int [signed] buffer_length @@    got restricted __le1int [signed] buffer_length @@
>    drivers/net/can/usb/ucan.c:891:44:    expected int [signed] buffer_length
>    drivers/net/can/usb/ucan.c:891:44:    got restricted __le16 [usertype] wMaxPacketSize
>>> drivers/net/can/usb/ucan.c:1238:41: sparse: incorrect type in assignment (different base types) @@    expected restricted __le16 [usertype] sample_point @@    got restricted __le16 [usertype] sample_point @@
>    drivers/net/can/usb/ucan.c:1238:41:    expected restricted __le16 [usertype] sample_point
>    drivers/net/can/usb/ucan.c:1238:41:    got restricted __le32 [usertype] <noident>
>    drivers/net/can/usb/ucan.c:1368:18: sparse: restricted __le16 degrades to integer
>    drivers/net/can/usb/ucan.c:1373:19: sparse: restricted __le16 degrades to integer
>    drivers/net/can/usb/ucan.c:1407:31: sparse: incorrect type in argument 5 (different base types) @@    expected unsigned short [unsigned] [usertype] value @@    got  short [unsigned] [usertype] value @@
>    drivers/net/can/usb/ucan.c:1407:31:    expected unsigned short [unsigned] [usertype] value
>    drivers/net/can/usb/ucan.c:1407:31:    got restricted __le16 [usertype] <noident>
>    drivers/net/can/usb/ucan.c:1448:31: sparse: incorrect type in argument 5 (different base types) @@    expected unsigned short [unsigned] [usertype] value @@    got  short [unsigned] [usertype] value @@
>    drivers/net/can/usb/ucan.c:1448:31:    expected unsigned short [unsigned] [usertype] value
>    drivers/net/can/usb/ucan.c:1448:31:    got restricted __le16 [usertype] <noident>
>
> vim +301 drivers/net/can/usb/ucan.c
>
>    298	
>    299	static u8 ucan_get_can_dlc(struct ucan_can_msg *msg, u16 len)
>    300	{
>  > 301		if (msg->id & CAN_RTR_FLAG)
>    302			return get_can_dlc(msg->dlc);
>    303		else
>    304			return get_can_dlc(len - (UCAN_IN_HDR_SIZE + sizeof(msg->id)));
>    305	}
>    306	
>
> ---
> 0-DAY kernel test infrastructure                Open Source Technology Center
> https://lists.01.org/pipermail/kbuild-all                   Intel Corporation

-- 
Martin Elshuber
Theobroma Systems Design und Consulting GmbH
Seestadtstraße 27 (Aspern IQ), 1220 Wien, Austria
Phone: +43 1 236 98 93-405, Fax: +43 1 236 98 93-9
http://www.theobroma-systems.com




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

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ