lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <tip-02106f883cd745523f7766d90a739f983f19e650@git.kernel.org>
Date:   Wed, 13 Feb 2019 01:04:30 -0800
From:   tip-bot for Andrea Righi <tipbot@...or.com>
To:     linux-tip-commits@...r.kernel.org
Cc:     alexander.shishkin@...ux.intel.com, peterz@...radead.org,
        righi.andrea@...il.com, linux-kernel@...r.kernel.org,
        mingo@...nel.org, mhiramat@...nel.org,
        torvalds@...ux-foundation.org, jolsa@...hat.com,
        rostedt@...dmis.org, mathieu.desnoyers@...icios.com,
        tglx@...utronix.de, acme@...hat.com, hpa@...or.com
Subject: [tip:perf/core] kprobes: Prohibit probing on bsearch()

Commit-ID:  02106f883cd745523f7766d90a739f983f19e650
Gitweb:     https://git.kernel.org/tip/02106f883cd745523f7766d90a739f983f19e650
Author:     Andrea Righi <righi.andrea@...il.com>
AuthorDate: Wed, 13 Feb 2019 01:15:34 +0900
Committer:  Ingo Molnar <mingo@...nel.org>
CommitDate: Wed, 13 Feb 2019 08:16:41 +0100

kprobes: Prohibit probing on bsearch()

Since kprobe breakpoing handler is using bsearch(), probing on this
routine can cause recursive breakpoint problem.

int3
 ->do_int3()
   ->ftrace_int3_handler()
     ->ftrace_location()
       ->ftrace_location_range()
         ->bsearch() -> int3

Prohibit probing on bsearch().

Signed-off-by: Andrea Righi <righi.andrea@...il.com>
Acked-by: Masami Hiramatsu <mhiramat@...nel.org>
Cc: Alexander Shishkin <alexander.shishkin@...ux.intel.com>
Cc: Arnaldo Carvalho de Melo <acme@...hat.com>
Cc: Jiri Olsa <jolsa@...hat.com>
Cc: Linus Torvalds <torvalds@...ux-foundation.org>
Cc: Mathieu Desnoyers <mathieu.desnoyers@...icios.com>
Cc: Peter Zijlstra <peterz@...radead.org>
Cc: Steven Rostedt <rostedt@...dmis.org>
Cc: Thomas Gleixner <tglx@...utronix.de>
Link: http://lkml.kernel.org/r/154998813406.31052.8791425358974650922.stgit@devbox
Signed-off-by: Ingo Molnar <mingo@...nel.org>
---
 lib/bsearch.c | 2 ++
 1 file changed, 2 insertions(+)

diff --git a/lib/bsearch.c b/lib/bsearch.c
index 18b445b010c3..82512fe7b33c 100644
--- a/lib/bsearch.c
+++ b/lib/bsearch.c
@@ -11,6 +11,7 @@
 
 #include <linux/export.h>
 #include <linux/bsearch.h>
+#include <linux/kprobes.h>
 
 /*
  * bsearch - binary search an array of elements
@@ -53,3 +54,4 @@ void *bsearch(const void *key, const void *base, size_t num, size_t size,
 	return NULL;
 }
 EXPORT_SYMBOL(bsearch);
+NOKPROBE_SYMBOL(bsearch);

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ