From: Luc Van Oostenryck <luc.vanoostenryck@gmail.com>
To: Jann Horn <jannh@google.com>
Cc: Thomas Gleixner <tglx@linutronix.de>,
linux-kernel@vger.kernel.org, Kees Cook <keescook@chromium.org>,
Borislav Petkov <bp@suse.de>
Subject: Re: [PATCH] x86/dumpstack: fix address space casting in show_opcodes()
Date: Fri, 31 Aug 2018 10:27:14 +0200 [thread overview]
Message-ID: <20180831082712.cbfvv655amizvkfq@ltop.local> (raw)
In-Reply-To: <20180830194736.210039-1-jannh@google.com>
On Thu, Aug 30, 2018 at 09:47:36PM +0200, Jann Horn wrote:
> I sloppily passed a kernel-typed pointer to __range_not_ok(), and sparse
> doesn't like that.
> Make `prologue` a __user pointer (to protect against accidental
> dereferences) and force-cast it to a kernel pointer when calling
> probe_kernel_read(), which will then immediately force-cast it back to a
> user pointer.
It's a bit sad to have to do this.
__range_not_ok() explicitly requires a __user pointer (I don't know
if there is a good reason for it) but the real job is done by
__chk_range_not_ok(). Can't you use this later instead?
-- Luc Van Oostenryck
next prev parent reply other threads:[~2018-08-31 8:27 UTC|newest]
Thread overview: 5+ messages / expand[flat|nested] mbox.gz Atom feed top
2018-08-30 19:47 Jann Horn
2018-08-31 8:04 ` Borislav Petkov
2018-08-31 8:27 ` Luc Van Oostenryck [this message]
2018-08-31 13:26 ` Jann Horn
2018-08-31 14:38 ` Luc Van Oostenryck
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=20180831082712.cbfvv655amizvkfq@ltop.local \
--to=luc.vanoostenryck@gmail.com \
--cc=bp@suse.de \
--cc=jannh@google.com \
--cc=keescook@chromium.org \
--cc=linux-kernel@vger.kernel.org \
--cc=tglx@linutronix.de \
/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®