Received: by 2002:ac0:bc90:0:0:0:0:0 with SMTP id a16csp5647023img; Wed, 27 Mar 2019 12:22:41 -0700 (PDT) X-Google-Smtp-Source: APXvYqy6Nv9UPTHLqNDVFoyK1Syn2IHuQqY1uxUT4xzDBJJ2NImxqlTd3WI0M9dWZMwc0B9t5Zsg X-Received: by 2002:a17:902:bd41:: with SMTP id b1mr19827983plx.221.1553714561243; Wed, 27 Mar 2019 12:22:41 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1553714561; cv=none; d=google.com; s=arc-20160816; b=EFYGLvuwer92wJ88Y5zjE6f+MdhuJkcMDaiKAYi61D0asbqk/lOf8tJnn5ztpcdB1K kUVVyCjtR83xw1lWmaD2YfOqQy8yhdobeaGHy1tviHNndv+eQUy4ZdpuMX0kPHvLhYTE X31tzqLuRiJK/gP/71ZJt0VcNQut/+dAUU4cEV1X7Pc5Y0SgQpst7B8yxIanbigQ4EMW cG1u9/BKdQUwoP60LnGtCMlbQnPInsD0PaT1QHmG2Wc9xzrld5/5rIipGYy6zODj5cV2 Fj3QF40N/9JAzWvtE4uRJA0GpFlrZSlSPmxHEfHrflZfOGjhO2slIWMESs4juJYBGS8h M4QQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:content-transfer-encoding:mime-version :references:in-reply-to:message-id:date:subject:cc:to:from :dkim-signature; bh=6GdscH4wSLntwcd+RQM5uQPgzgJJQu6Bha9NzVQfeOk=; b=IE/hN9wrUiW4Jdfh+hW6IVCIUgvaDZK2IftFPMgnzqaeP+g8FV9LHpweD4uewrdwy0 hIRKjR32G50pP8rVC8LeO4rI2jKSpJCdSIAP+QU09I6My3O3gLYq5EWe2+Lx0K3LFUUu P9S3lL59cMzr5E4Kt5+D5r3WfYkLWtzFxWc9ClApkfgL+rWjPVhmPnXY2gNBZ3KWT2D3 JmS7YJvG9dA1MfLxb1O0uTolNprG68sk5HIiggJrGOQpE+N874cwm6XBwATCzlEGMmj0 ELaLnEYQZ/eEh28G21mwBlvxgYUswuaqF9pH8WOS7rmHZxmuCmwdYtLsJHqEsuuTV004 D4Lw== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@kernel.org header.s=default header.b=qKyqLxhL; 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; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id h3si14089749pfe.90.2019.03.27.12.22.25; Wed, 27 Mar 2019 12:22:41 -0700 (PDT) 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; dkim=pass header.i=@kernel.org header.s=default header.b=qKyqLxhL; 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; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S2388167AbfC0TVw (ORCPT + 99 others); Wed, 27 Mar 2019 15:21:52 -0400 Received: from mail.kernel.org ([198.145.29.99]:48408 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S2387998AbfC0SGm (ORCPT ); Wed, 27 Mar 2019 14:06:42 -0400 Received: from sasha-vm.mshome.net (c-73-47-72-35.hsd1.nh.comcast.net [73.47.72.35]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPSA id EB0922075C; Wed, 27 Mar 2019 18:06:39 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=default; t=1553710001; bh=lD0izxuF9DGGz0uvnGlD/4KBNdPKQ9eWkmBVBzQUxSw=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=qKyqLxhLmrnRfDTEswE1zZqAnmS3CIczR0QFSpaDvAEtJ3qJBCqy0fVcXpfPZ05Va pxdYgF6hu58asaZnsWtVB0vSK7EQwAYgHGnM1edz8+kqnDmFdSw64TUVDaAyXwsTcm uTvEw7ADp6RjVzv/4n0sIUbl/TbcRoJu0aalgvYo= From: Sasha Levin To: linux-kernel@vger.kernel.org, stable@vger.kernel.org Cc: Masami Hiramatsu , Alexander Shishkin , Andrea Righi , Arnaldo Carvalho de Melo , Jiri Olsa , Linus Torvalds , Mathieu Desnoyers , Peter Zijlstra , Steven Rostedt , Thomas Gleixner , Ingo Molnar , Sasha Levin Subject: [PATCH AUTOSEL 5.0 151/262] kprobes: Prohibit probing on RCU debug routine Date: Wed, 27 Mar 2019 14:00:06 -0400 Message-Id: <20190327180158.10245-151-sashal@kernel.org> X-Mailer: git-send-email 2.19.1 In-Reply-To: <20190327180158.10245-1-sashal@kernel.org> References: <20190327180158.10245-1-sashal@kernel.org> MIME-Version: 1.0 X-Patchwork-Hint: Ignore Content-Transfer-Encoding: 8bit Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org From: Masami Hiramatsu [ Upstream commit a39f15b9644fac3f950f522c39e667c3af25c588 ] Since kprobe itself depends on RCU, probing on RCU debug routine can cause recursive breakpoint bugs. Prohibit probing on RCU debug routines. int3 ->do_int3() ->ist_enter() ->RCU_LOCKDEP_WARN() ->debug_lockdep_rcu_enabled() -> int3 Signed-off-by: Masami Hiramatsu Cc: Alexander Shishkin Cc: Andrea Righi 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/154998807741.31052.11229157537816341591.stgit@devbox Signed-off-by: Ingo Molnar Signed-off-by: Sasha Levin --- kernel/rcu/update.c | 2 ++ 1 file changed, 2 insertions(+) diff --git a/kernel/rcu/update.c b/kernel/rcu/update.c index 1971869c4072..f4ca36d92138 100644 --- a/kernel/rcu/update.c +++ b/kernel/rcu/update.c @@ -52,6 +52,7 @@ #include #include #include +#include #define CREATE_TRACE_POINTS @@ -249,6 +250,7 @@ int notrace debug_lockdep_rcu_enabled(void) current->lockdep_recursion == 0; } EXPORT_SYMBOL_GPL(debug_lockdep_rcu_enabled); +NOKPROBE_SYMBOL(debug_lockdep_rcu_enabled); /** * rcu_read_lock_held() - might we be in RCU read-side critical section? -- 2.19.1