From: Dave Hansen <dave@sr71.net>
To: Andy Lutomirski <luto@amacapital.net>
Cc: "linux-kernel@vger.kernel.org" <linux-kernel@vger.kernel.org>,
X86 ML <x86@kernel.org>,
Dave Hansen <dave.hansen@linux.intel.com>
Subject: Re: [PATCH 2/3] x86: add some better documentation for probe_kernel_address()
Date: Fri, 22 Jul 2016 11:18:13 -0700 [thread overview]
Message-ID: <57926365.5040307@sr71.net> (raw)
In-Reply-To: <CALCETrXNUCzE3V-Ef3yXNjojp3V_Z-idfMDdYb3T5bq-EbcOLA@mail.gmail.com>
On 07/22/2016 11:10 AM, Andy Lutomirski wrote:
> On Jul 22, 2016 11:03 AM, "Dave Hansen" <dave@sr71.net> wrote:
>> From: Dave Hansen <dave.hansen@linux.intel.com>
>>
>> probe_kernel_address() has an unfortunate name since it is used
>> to probe kernel *and* userspace addresses. Add a comment
>> explaining some of the situation to help the next developer who
>> might make the silly assumption that it is for probing kernel
>> addresses.
>
> This can't work on architectures like s390 that have separate,
> overlapping user and kernel address spaces. Maybe we should fix x86
> to stop abusing it and use get_user instead. (In which case, your new
> function should be called get_user_insn_byte or similar.)
Urg.
But can't the x86 use in no_context() be called from a kernel-initiated
fault? Like a prefetch instruction to a vmalloc() page that we needed
to do a vmalloc fault for?
In either case, it would be awfully nice to have the clarity about
exactly what is being probed. The other 2 calls to is_prefetch() do
appear to be userspace-only.
next prev parent reply other threads:[~2016-07-22 18:18 UTC|newest]
Thread overview: 8+ messages / expand[flat|nested] mbox.gz Atom feed top
2016-07-22 18:03 [PATCH 0/3] x86, pkeys: fix prefetch/pkeys interaction Dave Hansen
2016-07-22 18:03 ` [PATCH 1/3] x86, tracing: fix x86 exceptions trace header Dave Hansen
2016-07-29 15:08 ` Steven Rostedt
2016-07-22 18:03 ` [PATCH 2/3] x86: add some better documentation for probe_kernel_address() Dave Hansen
2016-07-22 18:10 ` Andy Lutomirski
2016-07-22 18:18 ` Dave Hansen [this message]
2016-07-22 18:22 ` Andy Lutomirski
2016-07-22 18:03 ` [PATCH 3/3] x86, pkeys: allow instruction fetches in presence of pkeys Dave Hansen
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=57926365.5040307@sr71.net \
--to=dave@sr71.net \
--cc=dave.hansen@linux.intel.com \
--cc=linux-kernel@vger.kernel.org \
--cc=luto@amacapital.net \
--cc=x86@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 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.