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]
Date:   Fri, 19 Jun 2020 11:38:59 +0300
From:   Andy Shevchenko <andy.shevchenko@...il.com>
To:     Syed Nayyar Waris <syednwaris@...il.com>
Cc:     kernel test robot <lkp@...el.com>,
        Linus Walleij <linus.walleij@...aro.org>,
        Andrew Morton <akpm@...ux-foundation.org>,
        kbuild-all@...ts.01.org,
        Andy Shevchenko <andriy.shevchenko@...ux.intel.com>,
        William Breathitt Gray <vilhelm.gray@...il.com>,
        Bartosz Golaszewski <bgolaszewski@...libre.com>,
        Michal Simek <michal.simek@...inx.com>,
        "open list:GPIO SUBSYSTEM" <linux-gpio@...r.kernel.org>,
        linux-arm Mailing List <linux-arm-kernel@...ts.infradead.org>,
        Linux Kernel Mailing List <linux-kernel@...r.kernel.org>
Subject: Re: [PATCH v8 4/4] gpio: xilinx: Utilize for_each_set_clump macro

On Fri, Jun 19, 2020 at 10:02 AM Syed Nayyar Waris <syednwaris@...il.com> wrote:

...

> > config: sparc64-randconfig-s032-20200615 (attached as .config)
> > compiler: sparc64-linux-gcc (GCC) 9.3.0
> > reproduce:
> >         # apt-get install sparse
> >         # sparse version: v0.6.2-rc1-3-g55607964-dirty
> >         # save the attached .config to linux build tree
> >         make W=1 C=1 ARCH=sparc64 CF='-fdiagnostic-prefix -D__CHECK_ENDIAN__'

...

> > sparse warnings: (new ones prefixed by >>)
> >
> > >> include/linux/bitmap.h:639:45: sparse: sparse: shift too big (64) for type unsigned long
> > >> include/linux/bitmap.h:639:45: sparse: sparse: shift too big (64) for type unsigned long
> >    include/linux/bitmap.h:594:63: sparse: sparse: shift too big (64) for type unsigned long
> > >> include/linux/bitmap.h:639:45: sparse: sparse: shift too big (64) for type unsigned long
> > >> include/linux/bitmap.h:638:17: sparse: sparse: invalid access past the end of 'old' (8 8)

> It seems to me that to reproduce this warning, I have to use the
> sparc64 compiler. I have installed 'sparc64-linux-gnu-gcc' on my
> computer.

Sparse is not a compiler.

> I have to specify that this compiler needs to be used for build
> process. How/ Where do I specify this?
>
> I have downloaded the config.gz (has config file) and placed it at the
> root of the linux kernel project tree. But the Makefile STILL has
> 'gcc' as the compiler. When I build, it is the 'gcc' compiler being
> used and not 'sparc64-linux-gnu-gcc'. I know I can manually change the
> Makefile to use sparc64 compiler, but I think there must be some more
> elegant way to do this, perhaps using make menuconfig?

If you wish to run a compilation, download a compiler from [1], and,
after adding its bin/ folder to PATH, run
make CROSS_COMPILE=sparc64-linux- ARCH=sparc64 ... # first generate .config

> Kindly illuminate as to how shall I reproduce the compiler warning.

> > 803024b6c8a375 Syed Nayyar Waris      2020-06-15 @638           map[index + 1] &= ~BITMAP_LAST_WORD_MASK(start + nbits);
> > 803024b6c8a375 Syed Nayyar Waris      2020-06-15 @639           map[index + 1] |= (value >> space);

Hmm... I think I sent a reply [2] where I explained how space can be
64. Do you agree with analysis?

[1]: https://mirrors.edge.kernel.org/pub/tools/crosstool/
[2]: https://lore.kernel.org/lkml/20200616081428.GP2428291@smile.fi.intel.com/

-- 
With Best Regards,
Andy Shevchenko

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ