From: Greg KH <gregkh@linuxfoundation.org>
To: Masami Hiramatsu <mhiramat@kernel.org>
Cc: linux-kernel@vger.kernel.org, linux-arch@vger.kernel.org,
Ingo Molnar <mingo@redhat.com>, "H . Peter Anvin" <hpa@zytor.com>,
x86@kernel.org, Ananth N Mavinakayanahalli <ananth@in.ibm.com>,
Anil S Keshavamurthy <anil.s.keshavamurthy@intel.com>,
"David S . Miller" <davem@davemloft.net>,
Jon Medhurst <tixy@linaro.org>, Will Deacon <will.deacon@arm.com>,
Arnd Bergmann <arnd@arndb.de>,
David Howells <dhowells@redhat.com>,
Heiko Carstens <heiko.carstens@de.ibm.com>,
"Tobin C . Harding" <me@tobin.cc>,
Linus Torvalds <torvalds@linux-foundation.org>,
Thomas Richter <tmricht@linux.ibm.com>,
akpm@linux-foundation.org, acme@kernel.org, rostedt@goodmis.org,
brueckner@linux.vnet.ibm.com, schwidefsky@de.ibm.com,
stable@vger.kernel.org
Subject: Re: [PATCH -tip v2 0/7] kprobes: Fix %p in kprobes
Date: Thu, 26 Apr 2018 10:40:22 +0200 [thread overview]
Message-ID: <20180426084022.GA6777@kroah.com> (raw)
In-Reply-To: <152473007907.8819.10449983839199591406.stgit@devbox>
On Thu, Apr 26, 2018 at 05:08:00PM +0900, Masami Hiramatsu wrote:
> Hi,
>
> This 2nd version of the series which fixes %p uses in kprobes.
> Some by replacing with %pS, some by replacing with %px but
> masking with kallsyms_show_value().
>
> V1 series is here:
> https://lkml.org/lkml/2018/1/25/1
>
> I've read the thread about %pK and if I understand correctly
> we shouldn't print kernel addresses. However, kprobes debugfs
> interface can not stop to show the actual probe address because
> it should be compared with addresses in kallsyms for debugging.
> So, it depends on that kallsyms_show_value() allows to show
> address to user, because if it returns true, anyway that user
> can dump /proc/kallsyms.
>
> Other error messages are replaced it with %pS, and one critical
> function uses %px which is called right before BUG().
>
> Also, I tried to fix this issue on each arch port. I searched
> it by
>
> # find arch/* | grep -e 'kprobe.*c' | xargs grep -w %p
>
> And fixed all %p uses in those files.
>
> Changes in this version;
> - [1/7] is newly added.
> - patches for MN10300(deleted) and s390(merged) are removed.
>
> Thank you,
>
> ---
>
> Masami Hiramatsu (7):
> kprobes: Make blacklist root user read only
> kprobes: Show blacklist addresses as same as kallsyms does
> kprobes: Show address of kprobes if kallsyms does
> kprobes: Replace %p with other pointer types
> kprobes/x86: Fix %p uses in error messages
> kprobes/arm: Fix %p uses in error messages
> kprobes/arm64: Fix %p uses in error messages
>
>
> arch/arm/probes/kprobes/core.c | 10 ++++----
> arch/arm/probes/kprobes/test-core.c | 1 -
> arch/arm64/kernel/probes/kprobes.c | 4 ++-
> arch/x86/kernel/kprobes/core.c | 12 +++------
> kernel/kprobes.c | 46 ++++++++++++++++++++++-------------
> 5 files changed, 40 insertions(+), 33 deletions(-)
>
> --
> Masami Hiramatsu (Linaro) <mhiramat@kernel.org>
<formletter>
This is not the correct way to submit patches for inclusion in the
stable kernel tree. Please read:
https://www.kernel.org/doc/html/latest/process/stable-kernel-rules.html
for how to do this properly.
</formletter>
next prev parent reply other threads:[~2018-04-26 8:40 UTC|newest]
Thread overview: 18+ messages / expand[flat|nested] mbox.gz Atom feed top
2018-04-26 8:08 [PATCH -tip v2 0/7] kprobes: Fix %p in kprobes Masami Hiramatsu
2018-04-26 8:08 ` [PATCH -tip v2 1/7] kprobes: Make blacklist root user read only Masami Hiramatsu
2018-04-26 8:09 ` [PATCH -tip v2 2/7] kprobes: Show blacklist addresses as same as kallsyms does Masami Hiramatsu
2018-04-26 8:09 ` [PATCH -tip v2 3/7] kprobes: Show address of kprobes if " Masami Hiramatsu
2018-04-26 8:10 ` [PATCH -tip v2 4/7] kprobes: Replace %p with other pointer types Masami Hiramatsu
2018-04-27 1:13 ` Steven Rostedt
2018-04-27 2:39 ` Masami Hiramatsu
2018-04-27 2:48 ` Steven Rostedt
2018-04-27 5:07 ` Masami Hiramatsu
2018-04-26 8:10 ` [PATCH -tip v2 5/7] kprobes/x86: Fix %p uses in error messages Masami Hiramatsu
2018-04-26 8:11 ` [PATCH -tip v2 6/7] kprobes/arm: " Masami Hiramatsu
2018-04-26 8:11 ` [PATCH -tip v2 7/7] kprobes/arm64: " Masami Hiramatsu
2018-04-26 8:13 ` [PATCH -tip v2 0/7] kprobes: Fix %p in kprobes Masami Hiramatsu
2018-04-26 8:40 ` Greg KH [this message]
2018-04-27 1:14 ` Steven Rostedt
2018-04-27 6:08 ` Masami Hiramatsu
2018-04-27 6:56 ` Greg KH
2018-04-27 14:51 ` Masami Hiramatsu
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=20180426084022.GA6777@kroah.com \
--to=gregkh@linuxfoundation.org \
--cc=acme@kernel.org \
--cc=akpm@linux-foundation.org \
--cc=ananth@in.ibm.com \
--cc=anil.s.keshavamurthy@intel.com \
--cc=arnd@arndb.de \
--cc=brueckner@linux.vnet.ibm.com \
--cc=davem@davemloft.net \
--cc=dhowells@redhat.com \
--cc=heiko.carstens@de.ibm.com \
--cc=hpa@zytor.com \
--cc=linux-arch@vger.kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=me@tobin.cc \
--cc=mhiramat@kernel.org \
--cc=mingo@redhat.com \
--cc=rostedt@goodmis.org \
--cc=schwidefsky@de.ibm.com \
--cc=stable@vger.kernel.org \
--cc=tixy@linaro.org \
--cc=tmricht@linux.ibm.com \
--cc=torvalds@linux-foundation.org \
--cc=will.deacon@arm.com \
--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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).