From: Kees Cook <keescook@chromium.org>
To: Geert Uytterhoeven <geert@linux-m68k.org>
Cc: Greg Ungerer <gerg@linux-m68k.org>,
Mark Rutland <mark.rutland@arm.com>,
"Peter Zijlstra (Intel)" <peterz@infradead.org>,
Arnd Bergmann <arnd@arndb.de>,
Linux Kernel Mailing List <linux-kernel@vger.kernel.org>,
linux-m68k <linux-m68k@lists.linux-m68k.org>,
linux-hardening@vger.kernel.org
Subject: Re: [PATCH] m68k: cmpxchg: Dereference matching size
Date: Thu, 3 Feb 2022 08:42:27 -0800 [thread overview]
Message-ID: <202202030841.E00D20362@keescook> (raw)
In-Reply-To: <CAMuHMdVRrD+2zKoHxAaQdDuiK5JFDanbv0SJ91OdWfx+eyekPQ@mail.gmail.com>
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@chromium.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@chromium.org>
>
> Thanks for your patch!
>
> Reviewed-by: Geert Uytterhoeven <geert@linux-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@linux-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@linux-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
prev parent reply other threads:[~2022-02-03 16:42 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2022-02-02 22:53 [PATCH] m68k: cmpxchg: Dereference matching size Kees Cook
2022-02-03 8:13 ` Geert Uytterhoeven
2022-02-03 16:42 ` Kees Cook [this message]
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=202202030841.E00D20362@keescook \
--to=keescook@chromium.org \
--cc=arnd@arndb.de \
--cc=geert@linux-m68k.org \
--cc=gerg@linux-m68k.org \
--cc=linux-hardening@vger.kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-m68k@lists.linux-m68k.org \
--cc=mark.rutland@arm.com \
--cc=peterz@infradead.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).