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] [thread-next>] [day] [month] [year] [list]
Message-ID: <CAPomEdz6pVnD39iZHSEd3gwEhgP2g8B5vTvqBP7eEHEAvTvFMg@mail.gmail.com>
Date:   Fri, 13 Mar 2020 15:44:02 +0500
From:   Александр Берсенев 
        <bay@...kerdom.ru>
To:     Stephen Rothwell <sfr@...b.auug.org.au>
Cc:     David Miller <davem@...emloft.net>,
        Networking <netdev@...r.kernel.org>,
        Linux Next Mailing List <linux-next@...r.kernel.org>,
        Linux Kernel Mailing List <linux-kernel@...r.kernel.org>
Subject: Re: linux-next: build warning after merge of the net-next tree

Hi,

This is my patch, sorry for this warning.

The fix is to change cpu_to_le32 to cpu_to_le16 in line 1175:
ndp32->wLength = cpu_to_le16(sizeof(struct usb_cdc_ncm_ndp32) +
sizeof(struct usb_cdc_ncm_dpe32));

The full patch is attached

Best,
Alexander Bersenev

пт, 13 мар. 2020 г. в 14:54, Stephen Rothwell <sfr@...b.auug.org.au>:
>
> Hi all,
>
> After merging the net-next tree, today's linux-next build (powerpc
> allyesconfig) produced this warning:
>
> In file included from include/linux/byteorder/big_endian.h:5,
>                  from arch/powerpc/include/uapi/asm/byteorder.h:14,
>                  from include/asm-generic/bitops/le.h:6,
>                  from arch/powerpc/include/asm/bitops.h:250,
>                  from include/linux/bitops.h:29,
>                  from include/linux/kernel.h:12,
>                  from include/linux/list.h:9,
>                  from include/linux/module.h:12,
>                  from drivers/net/usb/cdc_ncm.c:41:
> drivers/net/usb/cdc_ncm.c: In function 'cdc_ncm_ndp32':
> include/uapi/linux/byteorder/big_endian.h:33:26: warning: conversion from 'unsigned int' to '__le16' {aka 'short unsigned int'} changes value from '402653184' to '0' [-Woverflow]
>    33 | #define __cpu_to_le32(x) ((__force __le32)__swab32((x)))
>       |                          ^
> include/linux/byteorder/generic.h:88:21: note: in expansion of macro '__cpu_to_le32'
>    88 | #define cpu_to_le32 __cpu_to_le32
>       |                     ^~~~~~~~~~~~~
> drivers/net/usb/cdc_ncm.c:1175:19: note: in expansion of macro 'cpu_to_le32'
>  1175 |  ndp32->wLength = cpu_to_le32(sizeof(struct usb_cdc_ncm_ndp32) + sizeof(struct usb_cdc_ncm_dpe32));
>       |                   ^~~~~~~~~~~
>
> Introduced by commit
>
>   0fa81b304a79 ("cdc_ncm: Implement the 32-bit version of NCM Transfer Block")
>
> --
> Cheers,
> Stephen Rothwell

View attachment "0001-cdc_ncm-Implement-the-32-bit-version-of-NCM-Transfer.patch" of type "text/x-patch" (25320 bytes)

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ