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]
Date:   Thu, 3 Feb 2022 08:42:27 -0800
From:   Kees Cook <keescook@...omium.org>
To:     Geert Uytterhoeven <geert@...ux-m68k.org>
Cc:     Greg Ungerer <gerg@...ux-m68k.org>,
        Mark Rutland <mark.rutland@....com>,
        "Peter Zijlstra (Intel)" <peterz@...radead.org>,
        Arnd Bergmann <arnd@...db.de>,
        Linux Kernel Mailing List <linux-kernel@...r.kernel.org>,
        linux-m68k <linux-m68k@...ts.linux-m68k.org>,
        linux-hardening@...r.kernel.org
Subject: Re: [PATCH] m68k: cmpxchg: Dereference matching size

On Thu, Feb 03, 2022 at 09:13:30AM +0100, Geert Uytterhoeven wrote:
> Hi Kees,
> 
> On Wed, Feb 2, 2022 at 11:53 PM Kees Cook <keescook@...omium.org> wrote:
> > Similar to the recent arm64 fix[1], avoid overly wide casts in the cmpxchg
> > implementation. Avoid this warning under -Warray-bounds with GCC 11:
> >
> > net/sched/cls_tcindex.c: In function 'tcindex_set_parms':
> > ./arch/m68k/include/asm/cmpxchg.h:64:17: warning: array subscript 'volatile struct __xchg_dummy[0]' is partly outside array bounds of 'struct tcf_result[1]' [-Warray-bounds]
> >    64 |                 __asm__ __volatile__
> >       |                 ^~~~~~~
> > net/sched/cls_tcindex.c:338:27: note: while referencing 'cr'
> >   338 |         struct tcf_result cr = {};
> >       |                           ^~
> >
> > No binary output differences are seen from this change.
> >
> > [1] commit 3364c6ce23c6 ("arm64: atomics: lse: Dereference matching size")
> >
> > Signed-off-by: Kees Cook <keescook@...omium.org>
> 
> Thanks for your patch!
> 
> Reviewed-by: Geert Uytterhoeven <geert@...ux-m68k.org>
> 
> Do you want me to queue this in the m68k for-v5.18 branch, or do
> you want to take it yourself, together with commit a8712a32665f9b1a
> ("Makefile: Enable -Warray-bounds") in linux-next that triggers this?
> In case of the latter:
> Acked-by: Geert Uytterhoeven <geert@...ux-m68k.org>

Given how -next is being ordered, it's probably best to go via my tree.
Thanks for the review!

-Kees

> 
> Please let me know. Thanks!
> 
> 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

-- 
Kees Cook

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ