Received: by 2002:ac0:946b:0:0:0:0:0 with SMTP id j40csp104749imj; Wed, 13 Feb 2019 05:29:02 -0800 (PST) X-Google-Smtp-Source: AHgI3IYaDeuoT3juDkC5X9XJgo894IWD/jaCytrwTDfcBl+d2M4SQY6Hnr1sggIPP8dTWKAr6a3y X-Received: by 2002:a17:902:24e7:: with SMTP id l36mr543770plg.61.1550064542454; Wed, 13 Feb 2019 05:29:02 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1550064542; cv=none; d=google.com; s=arc-20160816; b=oO9PVHv/+9eTeScwgieHSjj7exRQCvy51fdhklEwK9NBKdWZxioFw0b/zFpF5UBkrs 54PRgqwfEMioRQm82h/GbSB58vV500iVdcQR90IY3B6sDJ00frdjW6K7Y0DqJEi2Kqyo 5odDXU/9dIhYSgU7+1GE1d3bgLZP4iaGo05HBoUHc550Dk7s/3gr5WLPq54YWGdPDr0T +wgcMkm/QRMMVyBTVUe2sy5J5ifqPNdZo2oaVE1xqqyJTeMh9qWzZ5jLNBzByxPmwS84 FkAeBkGNJIu1O8a1/ucHSpwKCxwF4tcfoWbpScVhAR7INWaPHNf2hg25sCyh1He6+x4y SN3A== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:content-disposition :content-transfer-encoding:mime-version:robot-unsubscribe:robot-id :git-commit-id:subject:to:references:in-reply-to:reply-to:cc :message-id:from:date; bh=uYS0dYgMOArKf7IahQEs8Kj8x+QEoiU+b1jaeaj8nDA=; b=YWmkIQz9SSgxp58MHFuemjcYy+kBXBw6n1WTffdKfAa2kOtPiIpJKY2159eBc9XNox bo7NdAeHfqJu6oFmJ9f/t/6W9ofBOyMJRwAVAeliJIZ2N2GFEBYB885Yepfku27kHrAb 5duIIzwYaYycyAQLUm1yDx7KAGwZ3yiLzUuvas6F5itA+anS1h//IJcomiHS4Y1LP3tN PDBTr7yLTmPXkSFEYX7Ur2bnIbUZdTMDjJYR5hCg9mL6f74Gqk52nSIfRtyhtXubhM04 SO0mhGzefjdT3o0cYRHKhUxhTQqqtjMDVVjuqu7F/gGQ9r6jiGdrj/sGlpLNPxcUtRZ/ D6ew== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id r7si15615019pfb.237.2019.02.13.05.28.37; Wed, 13 Feb 2019 05:29:02 -0800 (PST) Received-SPF: pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S2391036AbfBMJFH (ORCPT + 99 others); Wed, 13 Feb 2019 04:05:07 -0500 Received: from terminus.zytor.com ([198.137.202.136]:41019 "EHLO terminus.zytor.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1731659AbfBMJFG (ORCPT ); Wed, 13 Feb 2019 04:05:06 -0500 Received: from terminus.zytor.com (localhost [127.0.0.1]) by terminus.zytor.com (8.15.2/8.15.2) with ESMTPS id x1D94VKV198198 (version=TLSv1.3 cipher=TLS_AES_256_GCM_SHA384 bits=256 verify=NO); Wed, 13 Feb 2019 01:04:31 -0800 Received: (from tipbot@localhost) by terminus.zytor.com (8.15.2/8.15.2/Submit) id x1D94U1V198195; Wed, 13 Feb 2019 01:04:30 -0800 Date: Wed, 13 Feb 2019 01:04:30 -0800 X-Authentication-Warning: terminus.zytor.com: tipbot set sender to tipbot@zytor.com using -f From: tip-bot for Andrea Righi Message-ID: Cc: alexander.shishkin@linux.intel.com, peterz@infradead.org, righi.andrea@gmail.com, linux-kernel@vger.kernel.org, mingo@kernel.org, mhiramat@kernel.org, torvalds@linux-foundation.org, jolsa@redhat.com, rostedt@goodmis.org, mathieu.desnoyers@efficios.com, tglx@linutronix.de, acme@redhat.com, hpa@zytor.com Reply-To: hpa@zytor.com, acme@redhat.com, rostedt@goodmis.org, tglx@linutronix.de, mathieu.desnoyers@efficios.com, mhiramat@kernel.org, linux-kernel@vger.kernel.org, mingo@kernel.org, jolsa@redhat.com, torvalds@linux-foundation.org, alexander.shishkin@linux.intel.com, righi.andrea@gmail.com, peterz@infradead.org In-Reply-To: <154998813406.31052.8791425358974650922.stgit@devbox> References: <154998813406.31052.8791425358974650922.stgit@devbox> To: linux-tip-commits@vger.kernel.org Subject: [tip:perf/core] kprobes: Prohibit probing on bsearch() Git-Commit-ID: 02106f883cd745523f7766d90a739f983f19e650 X-Mailer: tip-git-log-daemon Robot-ID: Robot-Unsubscribe: Contact to get blacklisted from these emails MIME-Version: 1.0 Content-Transfer-Encoding: 8bit Content-Type: text/plain; charset=UTF-8 Content-Disposition: inline X-Spam-Status: No, score=-0.8 required=5.0 tests=ALL_TRUSTED,BAYES_00, FREEMAIL_FORGED_REPLYTO,T_DATE_IN_FUTURE_96_Q autolearn=no autolearn_force=no version=3.4.2 X-Spam-Checker-Version: SpamAssassin 3.4.2 (2018-09-13) on terminus.zytor.com Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Commit-ID: 02106f883cd745523f7766d90a739f983f19e650 Gitweb: https://git.kernel.org/tip/02106f883cd745523f7766d90a739f983f19e650 Author: Andrea Righi AuthorDate: Wed, 13 Feb 2019 01:15:34 +0900 Committer: Ingo Molnar 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 Acked-by: Masami Hiramatsu Cc: Alexander Shishkin Cc: Arnaldo Carvalho de Melo Cc: Jiri Olsa Cc: Linus Torvalds Cc: Mathieu Desnoyers Cc: Peter Zijlstra Cc: Steven Rostedt Cc: Thomas Gleixner Link: http://lkml.kernel.org/r/154998813406.31052.8791425358974650922.stgit@devbox Signed-off-by: Ingo Molnar --- 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 #include +#include /* * 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);