mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: Arnd Bergmann <arnd@arndb.de>
To: Kees Cook <keescook@chromium.org>
Cc: Greg Kroah-Hartman <gregkh@linuxfoundation.org>,
	LKML <linux-kernel@vger.kernel.org>
Subject: Re: [PATCH] lkdtm: fix maybe-uninitialized warning
Date: Tue, 26 Jul 2016 22:58:32 +0200	[thread overview]
Message-ID: <24917262.Z3gWB5hbbY@wuerfel> (raw)
In-Reply-To: <CAGXu5jJ+c2-x72P95DUcb-V6SKmhpbayW2gv=zu2vpF_R5ScVQ@mail.gmail.com>

On Tuesday, July 26, 2016 8:21:37 AM CEST Kees Cook wrote:
> On Tue, Jul 26, 2016 at 5:28 AM, Arnd Bergmann <arnd@arndb.de> wrote:
> > The do_usercopy_stack() function uses uninitialized stack data to initialize
> > more of the stack, which causes a warning in some configurations (ARM allmodconfig):
> >
> > drivers/misc/lkdtm_usercopy.c:52:15: warning: 'bad_stack' may be used uninitialized in this function [-Wmaybe-uninitialized]
> >
> > The warning gets reports by Mark Brown's build bot and looks correct (we are trying
> > to trick the compiler here, and sometimes the compiler notices), and I could reproduce
> > it with gcc-4.7 through gcc-5.3 but not gcc-6.1 for some reason.
> >
> > This changes the code to use the low byte of the address of the stack to initialize
> > the stack data, instead of using data from the stack itself, to avoid the warning.
> >
> > Signed-off-by: Arnd Bergmann <arnd@arndb.de>
> > Fixes: a3dff71c1c88 ("lkdtm: split usercopy tests to separate file")
> 
> Acked-by: Kees Cook <keescook@chromium.org>
> 
> I thought I already sent this fix to Greg?

Possible. I mentioned the problem to you when it first showed up,
but noticed today that I didn't have a patch for it in my testing
tree (since I test with gcc-6.1, which doesn't show the bug).

> Maybe it got lost...

More likely that it's still in his backlog then.

	Arnd

      reply	other threads:[~2016-07-26 20:58 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2016-07-26 12:28 Arnd Bergmann
2016-07-26 15:21 ` Kees Cook
2016-07-26 20:58   ` Arnd Bergmann [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=24917262.Z3gWB5hbbY@wuerfel \
    --to=arnd@arndb.de \
    --cc=gregkh@linuxfoundation.org \
    --cc=keescook@chromium.org \
    --cc=linux-kernel@vger.kernel.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

all inboxes | Powered by JetHome®