[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-Id: <1567588343.zi51gn8p0w.naveen@linux.ibm.com>
Date: Wed, 04 Sep 2019 14:43:26 +0530
From: "Naveen N. Rao" <naveen.n.rao@...ux.ibm.com>
To: Masami Hiramatsu <mhiramat@...nel.org>,
Ingo Molnar <mingo@...nel.org>
Cc: Anil S Keshavamurthy <anil.s.keshavamurthy@...el.com>,
"David S . Miller" <davem@...emloft.net>,
linux-kernel@...r.kernel.org, Steven Rostedt <rostedt@...dmis.org>
Subject: Re: [PATCH -tip v2] kprobes: Prohibit probing on BUG() and WARN()
address
Masami Hiramatsu wrote:
> Since BUG() and WARN() may use a trap (e.g. UD2 on x86) to
> get the address where the BUG() has occurred, kprobes can not
> do single-step out-of-line that instruction. So prohibit
> probing on such address.
>
> Without this fix, if someone put a kprobe on WARN(), the
> kernel will crash with invalid opcode error instead of
> outputing warning message, because kernel can not find
> correct bug address.
>
> Signed-off-by: Masami Hiramatsu <mhiramat@...nel.org>
> ---
> Changes in v2:
> - Add find_bug() stub function for !CONFIG_GENERIC_BUG
> - Cast the p->addr to unsigned long.
> ---
> include/linux/bug.h | 5 +++++
> kernel/kprobes.c | 3 ++-
> 2 files changed, 7 insertions(+), 1 deletion(-)
Acked-by: Naveen N. Rao <naveen.n.rao@...ux.vnet.ibm.com>
- Naveen
Powered by blists - more mailing lists