From: Russell Currey <ruscur@russell.cc>
To: Christophe Leroy <christophe.leroy@c-s.fr>,
keescook@chromium.org, mpe@ellerman.id.au
Cc: kernel-hardening@lists.openwall.com,
linuxppc-dev@lists.ozlabs.org, linux-kernel@vger.kernel.org,
dja@axtens.net
Subject: Re: [PATCH] lkdtm: Test KUAP directional user access unlocks on powerpc
Date: Fri, 31 Jan 2020 18:01:32 +1100 [thread overview]
Message-ID: <9edd517d0238dc3319788a23d708b68102cdbc2f.camel@russell.cc> (raw)
In-Reply-To: <c05a4327-0c81-0e3e-d93a-9d62183b146c@c-s.fr>
On Fri, 2020-01-31 at 07:58 +0100, Christophe Leroy wrote:
>
> Le 31/01/2020 à 07:53, Russell Currey a écrit :
> > On Fri, 2020-01-31 at 07:44 +0100, Christophe Leroy wrote:
> > > Le 31/01/2020 à 06:31, Russell Currey a écrit :
> > > > + pr_info("attempting bad read at %px with write
> > > > allowed\n",
> > > > ptr);
> > > > + tmp = *ptr;
> > > > + tmp += 0xc0dec0de;
> > > > + prevent_write_to_user(ptr, sizeof(unsigned long));
> > >
> > > Does it work ? I would have thought that if the read fails the
> > > process
> > > will die and the following test won't be performed.
> >
> > Correct, the ACCESS_USERSPACE test does the same thing. Splitting
> > this
> > into separate R and W tests makes sense, even if it is unlikely
> > that
> > one would be broken without the other.
> >
>
> Or once we are using user_access_begin() stuff, we can use
> unsafe_put_user() and unsafe_get_user() which should return an error
> instead of killing the caller.
Even better, and thanks for your work on all this stuff.
- Russell
>
> Christophe
next prev parent reply other threads:[~2020-01-31 7:03 UTC|newest]
Thread overview: 6+ messages / expand[flat|nested] mbox.gz Atom feed top
2020-01-31 5:31 [PATCH] lkdtm: Test KUAP directional user access unlocks on powerpc Russell Currey
2020-01-31 6:44 ` Christophe Leroy
2020-01-31 6:53 ` Russell Currey
2020-01-31 6:58 ` Christophe Leroy
2020-01-31 7:01 ` Russell Currey [this message]
2020-02-01 16:40 ` Kees Cook
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=9edd517d0238dc3319788a23d708b68102cdbc2f.camel@russell.cc \
--to=ruscur@russell.cc \
--cc=christophe.leroy@c-s.fr \
--cc=dja@axtens.net \
--cc=keescook@chromium.org \
--cc=kernel-hardening@lists.openwall.com \
--cc=linux-kernel@vger.kernel.org \
--cc=linuxppc-dev@lists.ozlabs.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