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: <CAK8P3a0ShMf+QCHWishO9DbvRrJ5x9f=9cS9kwm_tkBqwyWtEw@mail.gmail.com>
Date:   Thu, 31 Mar 2022 10:43:35 +0200
From:   Arnd Bergmann <arnd@...db.de>
To:     kernel test robot <lkp@...el.com>
Cc:     Arnd Bergmann <arnd@...db.de>, kbuild-all@...ts.01.org,
        Linux Kernel Mailing List <linux-kernel@...r.kernel.org>,
        Christoph Hellwig <hch@....de>,
        linux-riscv <linux-riscv@...ts.infradead.org>,
        Openrisc <openrisc@...ts.librecores.org>,
        Stafford Horne <shorne@...il.com>,
        Palmer Dabbelt <palmer@...belt.com>
Subject: Re: drivers/pci/proc.c:150:17: sparse: sparse: restricted __le16
 degrades to integer

On Mon, Mar 28, 2022 at 5:04 AM kernel test robot <lkp@...el.com> wrote:
>
> tree:   https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git master
> head:   f82da161ea75dc4db21b2499e4b1facd36dab275
> commit: a97b693c3712f040c5802f32b2d685352e08cefa uaccess: fix nios2 and microblaze get_user_8()
> date:   4 weeks ago
> config: microblaze-randconfig-s032-20220328 (https://download.01.org/0day-ci/archive/20220328/202203281004.InhLOFxn-lkp@intel.com/config)
> compiler: microblaze-linux-gcc (GCC) 11.2.0
> reproduce:
>         wget https://raw.githubusercontent.com/intel/lkp-tests/master/sbin/make.cross -O ~/bin/make.cross
>         chmod +x ~/bin/make.cross
>         # apt-get install sparse
>         # sparse version: v0.6.4-dirty
>         # https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git/commit/?id=a97b693c3712f040c5802f32b2d685352e08cefa
>         git remote add linus https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
>         git fetch --no-tags linus master
>         git checkout a97b693c3712f040c5802f32b2d685352e08cefa
>         # save the config file to linux build tree
>         mkdir build_dir
>         COMPILER_INSTALL_PATH=$HOME/0day COMPILER=gcc-11.2.0 make.cross C=1 CF='-fdiagnostic-prefix -D__CHECK_ENDIAN__' O=build_dir ARCH=microblaze SHELL=/bin/bash drivers/pci/
>
> If you fix the issue, kindly add following tag as appropriate
> Reported-by: kernel test robot <lkp@...el.com>
>
>
> sparse warnings: (new ones prefixed by >>)
> >> drivers/pci/proc.c:150:17: sparse: sparse: restricted __le16 degrades to integer
> >> drivers/pci/proc.c:150:17: sparse: sparse: restricted __le16 degrades to integer
>    drivers/pci/proc.c:150:17: sparse: sparse: cast to restricted __le16
> >> drivers/pci/proc.c:159:17: sparse: sparse: restricted __le32 degrades to integer
> >> drivers/pci/proc.c:159:17: sparse: sparse: restricted __le32 degrades to integer
>    drivers/pci/proc.c:159:17: sparse: sparse: cast to restricted __le32
>    drivers/pci/proc.c:168:17: sparse: sparse: restricted __le16 degrades to integer
>    drivers/pci/proc.c:168:17: sparse: sparse: restricted __le16 degrades to integer
>    drivers/pci/proc.c:168:17: sparse: sparse: cast to restricted __le16

On Tue, Mar 29, 2022 at 8:56 AM Christoph Hellwig <hch@....de> wrote:
>
> Looks like new uaccess code doesn't handle sparse __bitwise annotations.

Right. I copied the line that caused this from 32-bit riscv, which has the same
issue, same on openrisc after d877322bc1ad ("openrisc: Fix issue with
get_user for
64-bit values").

It sounds like we should fix all three of these the same way, any
suggestion which
architecture to copy from?

       Arnd

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ