From: Greg KH <gregkh@linuxfoundation.org>
To: Kees Cook <keescook@chromium.org>
Cc: LKML <linux-kernel@vger.kernel.org>,
Michael Ellerman <mpe@ellerman.id.au>
Subject: Re: [PATCH] lkdtm: Prevent the compiler from optimising lkdtm_CORRUPT_STACK()
Date: Tue, 15 Nov 2016 19:27:04 +0100 [thread overview]
Message-ID: <20161115182704.GA29239@kroah.com> (raw)
In-Reply-To: <CAGXu5j+V=+-=WHmc=XMDCRLovya7ZRkiu8p9znjOkRFWPNq5Rw@mail.gmail.com>
On Tue, Nov 15, 2016 at 09:27:47AM -0800, Kees Cook wrote:
> On Mon, Nov 14, 2016 at 11:02 PM, Michael Ellerman <mpe@ellerman.id.au> wrote:
> > At least on powerpc with GCC 6, the compiler is smart enough to optimise
> > lkdtm_CORRUPT_STACK() into an empty function that just returns.
>
> Sneaky. Thanks!
>
> > If we print the buffer after we've written to it that prevents the
> > compiler from optimising away data and the memset().
> >
> > Signed-off-by: Michael Ellerman <mpe@ellerman.id.au>
>
> Acked-by: Kees Cook <keescook@chromium.org>
>
> Greg, can you add this to the drivers/misc?
Now added, thanks.
greg k-h
prev parent reply other threads:[~2016-11-15 18:26 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2016-11-15 7:02 Michael Ellerman
2016-11-15 17:27 ` Kees Cook
2016-11-15 18:27 ` Greg KH [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=20161115182704.GA29239@kroah.com \
--to=gregkh@linuxfoundation.org \
--cc=keescook@chromium.org \
--cc=linux-kernel@vger.kernel.org \
--cc=mpe@ellerman.id.au \
/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
Powered by JetHome