All of lore.kernel.org
 help / color / mirror / Atom feed
From: Michael Ellerman <mpe@ellerman.id.au>
To: Khem Raj <raj.khem@gmail.com>, linuxppc-dev@lists.ozlabs.org
Cc: Khem Raj <raj.khem@gmail.com>, Kees Cook <keescook@chromium.org>
Subject: Re: [V2] powerpc/ptrace: Fix out of bounds array access warning
Date: Tue,  7 Jun 2016 13:35:49 +1000 (AEST)	[thread overview]
Message-ID: <3rNxzn27hwz9t3x@ozlabs.org> (raw)
In-Reply-To: <1461601157-27478-1-git-send-email-raj.khem@gmail.com>

On Mon, 2016-25-04 at 16:19:17 UTC, Khem Raj wrote:
> gcc-6 correctly warns about a out of bounds access
> 
> arch/powerpc/kernel/ptrace.c:407:24: warning: index 32 denotes an offset greater than size of 'u64[32][1] {aka long long unsigned int[32][1]}' [-Warray-bounds]
>         offsetof(struct thread_fp_state, fpr[32][0]));
>                         ^
> 
> check the end of array instead of beginning of next element to fix this
> 
> Signed-off-by: Khem Raj <raj.khem@gmail.com>
> Cc: Kees Cook <keescook@chromium.org>
> Cc: Michael Ellerman <mpe@ellerman.id.au>
> Cc: Segher Boessenkool <segher@kernel.crashing.org>
> Tested-by: Aaro Koskinen <aaro.koskinen@iki.fi>
> Acked-by: Olof Johansson <olof@lixom.net>

Applied to powerpc fixes, thanks.

https://git.kernel.org/powerpc/c/1e407ee3b21f981140491d5b8a

cheers

      parent reply	other threads:[~2016-06-07  3:35 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2016-04-25 16:19 [PATCH V2] powerpc/ptrace: Fix out of bounds array access warning Khem Raj
2016-05-11 17:51 ` Aaro Koskinen
2016-06-05 22:04   ` Olof Johansson
2016-06-07  3:35 ` Michael Ellerman [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=3rNxzn27hwz9t3x@ozlabs.org \
    --to=mpe@ellerman.id.au \
    --cc=keescook@chromium.org \
    --cc=linuxppc-dev@lists.ozlabs.org \
    --cc=raj.khem@gmail.com \
    /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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.