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:   Wed, 26 Jan 2022 10:16:24 +0100
From:   Geert Uytterhoeven <geert@...ux-m68k.org>
To:     Kees Cook <keescook@...omium.org>
Cc:     Yury Norov <yury.norov@...il.com>,
        linux-m68k <linux-m68k@...ts.linux-m68k.org>,
        Arnd Bergmann <arnd@...db.de>,
        Linux Kernel Mailing List <linux-kernel@...r.kernel.org>
Subject: Re: kisskb: FAILED linux-next/m68k-allmodconfig/m68k-gcc8 Tue Jan 25, 18:24

Hi Kees

On Wed, Jan 26, 2022 at 9:54 AM Kees Cook <keescook@...omium.org> wrote:
> On January 25, 2022 10:02:56 AM PST, Yury Norov <yury.norov@...il.com> wrote:
> >On Tue, Jan 25, 2022 at 12:47 AM Geert Uytterhoeven
> ><geert@...ux-m68k.org> wrote:
> >> On Tue, Jan 25, 2022 at 8:31 AM <noreply@...erman.id.au> wrote:
> >> > FAILED linux-next/m68k-allmodconfig/m68k-gcc8 Tue Jan 25, 18:24
> >> >
> >> > http://kisskb.ellerman.id.au/kisskb/buildresult/14688953/
> >> >
> >> > Commit:   Add linux-next specific files for 20220125
> >> >           d25ee88530253138d0b20d43511ca5acbda4e9f7
> >> > Compiler: m68k-linux-gcc (GCC) 8.1.0 / GNU ld (GNU Binutils) 2.30
> >> >
> >> > Possible errors
> >> > ---------------
> >> >
> >> > arch/m68k/include/asm/bitops.h:329:20: error: array subscript 2 is above array bounds of 'long unsigned int[1]' [-Werror=array-bounds]
> >
> >The array-bounds warning has been enabled just recently. CC Kees Cook for this.
> >
> >> > cc1: all warnings being treated as errors
> >> > make[4]: *** [scripts/Makefile.build:289: drivers/net/ipa/ipa_mem.o] Error 1
> >> > make[3]: *** [scripts/Makefile.build:572: drivers/net/ipa] Error 2
> >> > make[2]: *** [scripts/Makefile.build:572: drivers/net] Error 2
> >> > make[1]: *** [Makefile:1965: drivers] Error 2
> >> > make: *** [Makefile:226: __sub-make] Error 2
> >> >
> >> > No warnings found in log.
> >>
> >> The code that causes this is drivers/net/ipa/ipa_mem.c:ipa_mem_valid():
> >>
> >>         DECLARE_BITMAP(regions, IPA_MEM_COUNT) = { };
> >>         ...
> >>         for_each_clear_bit(mem_id, regions, IPA_MEM_COUNT) {
> >>                 if (ipa_mem_id_required(ipa, mem_id))
> >>                         dev_err(dev, "required memory region %u missing\n",
> >>                                 mem_id);
> >>         }
> >>
> >> This only happens with gcc-8, not with gcc-9, so it might be a
> >> compiler bug. I don't see anything wrong with c:ipa_mem_valid()
> >> nor with m68k's find_first_zero_bit().
> >
> >I don't see any problems about how this code uses bitmap API.
> >The m68k version of find_first_zero_bit() looks correct as well.
>
> The trouble is with "enum ipa_mem_id mem_id;" which is an int, and the bitmap API requires unsigned long. I tried to fix this[1] at the source, but the maintainers want each[2] call site to fix it instead. :(

Sorry, I don't get it. "mem_id" is not used as the bitmap, "regions" is,
and the latter has the correct type?

Gr{oetje,eeting}s,

                        Geert

--
Geert Uytterhoeven -- There's lots of Linux beyond ia32 -- geert@...ux-m68k.org

In personal conversations with technical people, I call myself a hacker. But
when I'm talking to journalists I just say "programmer" or something like that.
                                -- Linus Torvalds

Powered by blists - more mailing lists