linux-hardening.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Max Filippov <jcmvbkbc@gmail.com>
To: Kees Cook <keescook@chromium.org>
Cc: Chris Zankel <chris@zankel.net>,
	"open list:TENSILICA XTENSA PORT (xtensa)" 
	<linux-xtensa@linux-xtensa.org>,
	linux-hardening@vger.kernel.org
Subject: Re: How large is the xtensa pt_regs::areg array supposed to be?
Date: Sat, 5 Mar 2022 12:43:23 -0800	[thread overview]
Message-ID: <CAMo8BfKO-ysOrYFGpZNsorZ-zyMWY5CObC1Oie0ubuXVF=ZCbg@mail.gmail.com> (raw)
In-Reply-To: <202202021501.DA6594BFC@keescook>

Hi Kees,

On Wed, Feb 2, 2022 at 3:03 PM Kees Cook <keescook@chromium.org> wrote:
> When building with -Warray-bounds, I see this:
>
> In file included from ./include/linux/uaccess.h:11,
>                  from ./include/linux/sched/task.h:11,
>                  from arch/xtensa/kernel/process.c:21:
> arch/xtensa/kernel/process.c: In function 'copy_thread':
> arch/xtensa/kernel/process.c:262:52: warning: array subscript 53 is above array bounds of 'long unsigned int[16]' [-Warray-bounds]

I tried to reproduce this by building with -Warray-bounds added to
KBUILD_CFLAGS but couldn't get neither gcc-11 nor the current
gcc trunk to issue this warning. How did you get it?

-- 
Thanks.
-- Max

  parent reply	other threads:[~2022-03-05 20:43 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2022-02-02 23:03 How large is the xtensa pt_regs::areg array supposed to be? Kees Cook
2022-02-03 21:13 ` Max Filippov
2022-02-03 21:56   ` Kees Cook
2022-02-04  0:05     ` Max Filippov
2022-03-05 20:43 ` Max Filippov [this message]
2022-03-06  1:50   ` Max Filippov

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='CAMo8BfKO-ysOrYFGpZNsorZ-zyMWY5CObC1Oie0ubuXVF=ZCbg@mail.gmail.com' \
    --to=jcmvbkbc@gmail.com \
    --cc=chris@zankel.net \
    --cc=keescook@chromium.org \
    --cc=linux-hardening@vger.kernel.org \
    --cc=linux-xtensa@linux-xtensa.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).