From: Masami Hiramatsu <mhiramat@kernel.org>
To: Andrea Righi <righi.andrea@gmail.com>
Cc: "Naveen N. Rao" <naveen.n.rao@linux.vnet.ibm.com>,
Anil S Keshavamurthy <anil.s.keshavamurthy@intel.com>,
"David S. Miller" <davem@davemloft.net>,
Yonghong Song <yhs@fb.com>, Andy Lutomirski <luto@kernel.org>,
Thomas Gleixner <tglx@linutronix.de>,
Ingo Molnar <mingo@redhat.com>, Borislav Petkov <bp@alien8.de>,
"H. Peter Anvin" <hpa@zytor.com>,
x86@kernel.org, linux-kernel@vger.kernel.org
Subject: Re: [PATCH] kprobes: x86_64: blacklist non-attachable interrupt functions
Date: Fri, 7 Dec 2018 23:47:31 +0900 [thread overview]
Message-ID: <20181207234731.f52a8c1eff6c0e72c073ad40@kernel.org> (raw)
In-Reply-To: <20181206095648.GA8249@Dell>
On Thu, 6 Dec 2018 10:56:48 +0100
Andrea Righi <righi.andrea@gmail.com> wrote:
> These interrupt functions are already non-attachable by kprobes.
> Blacklist them explicitly so that they can show up in
> /sys/kernel/debug/kprobes/blacklist and tools like BCC can use this
> additional information.
>
> Signed-off-by: Andrea Righi <righi.andrea@gmail.com>
For the short term, this is OK. But this is not the best way to cover
other functions which are also prohibited by arch_within_kprobe_blacklist().
I'll fix this issue later.
Acked-by: Masami Hiramatsu <mhiramat@kernel.org>
Thank you,
> ---
> arch/x86/entry/entry_64.S | 4 ++++
> 1 file changed, 4 insertions(+)
>
> diff --git a/arch/x86/entry/entry_64.S b/arch/x86/entry/entry_64.S
> index ce25d84023c0..1f0efdb7b629 100644
> --- a/arch/x86/entry/entry_64.S
> +++ b/arch/x86/entry/entry_64.S
> @@ -566,6 +566,7 @@ ENTRY(interrupt_entry)
>
> ret
> END(interrupt_entry)
> +_ASM_NOKPROBE(interrupt_entry)
>
>
> /* Interrupt entry/exit. */
> @@ -766,6 +767,7 @@ native_irq_return_ldt:
> jmp native_irq_return_iret
> #endif
> END(common_interrupt)
> +_ASM_NOKPROBE(common_interrupt)
>
> /*
> * APIC interrupts.
> @@ -780,6 +782,7 @@ ENTRY(\sym)
> call \do_sym /* rdi points to pt_regs */
> jmp ret_from_intr
> END(\sym)
> +_ASM_NOKPROBE(\sym)
> .endm
>
> /* Make sure APIC interrupt handlers end up in the irqentry section: */
> @@ -960,6 +963,7 @@ ENTRY(\sym)
>
> jmp error_exit
> .endif
> +_ASM_NOKPROBE(\sym)
> END(\sym)
> .endm
>
> --
> 2.17.1
--
Masami Hiramatsu <mhiramat@kernel.org>
next prev parent reply other threads:[~2018-12-07 14:47 UTC|newest]
Thread overview: 11+ messages / expand[flat|nested] mbox.gz Atom feed top
2018-12-06 9:56 [PATCH] kprobes: x86_64: blacklist non-attachable interrupt functions Andrea Righi
2018-12-06 16:39 ` [tip:perf/urgent] kprobes/x86: Blacklist " tip-bot for Andrea Righi
2018-12-07 14:47 ` Masami Hiramatsu [this message]
2018-12-07 16:01 ` [PATCH] kprobes: x86_64: blacklist " Masami Hiramatsu
2018-12-07 17:00 ` Andrea Righi
2018-12-08 3:42 ` Masami Hiramatsu
2018-12-08 7:07 ` Andrea Righi
2018-12-07 17:58 ` Andrea Righi
2018-12-08 3:48 ` Masami Hiramatsu
2018-12-08 7:09 ` Andrea Righi
2018-12-16 16:07 ` 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=20181207234731.f52a8c1eff6c0e72c073ad40@kernel.org \
--to=mhiramat@kernel.org \
--cc=anil.s.keshavamurthy@intel.com \
--cc=bp@alien8.de \
--cc=davem@davemloft.net \
--cc=hpa@zytor.com \
--cc=linux-kernel@vger.kernel.org \
--cc=luto@kernel.org \
--cc=mingo@redhat.com \
--cc=naveen.n.rao@linux.vnet.ibm.com \
--cc=righi.andrea@gmail.com \
--cc=tglx@linutronix.de \
--cc=x86@kernel.org \
--cc=yhs@fb.com \
/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).