Received: by 2002:a25:4158:0:0:0:0:0 with SMTP id o85csp997950yba; Thu, 4 Apr 2019 02:04:30 -0700 (PDT) X-Google-Smtp-Source: APXvYqzx+FB1WaieFsau4L7nPXxF7ol/4DMVnOUQMk1ISVuNx0D1TPrvqis4eFLxXElccz1mlxM+ X-Received: by 2002:a62:524e:: with SMTP id g75mr4592999pfb.106.1554368670759; Thu, 04 Apr 2019 02:04:30 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1554368670; cv=none; d=google.com; s=arc-20160816; b=u/+fh6pHIDC1wBZEUYF24QMt4rK5V44Bm9Xd3zh+ZEzi+y1f870Y7GUfF9G5jAvH1J zMFK2VM8a78DKaEQRn2lEYK9VQZ7szjxzdiFDauT+m1m8abQihq1nesnxZ2OxgCxEcsq 8Ezg7AZG3fNBQ8QI55db+L5L7D0drTEImmM5y4Mw0uD/a/YVJKeGzZeV6Uus3dY09qrK fsnru0bKvlXqGeLP2pJ+YhsCVWL1yboqDJBqu9LvmZcFvvKJkOt5mBMgjabysUbtWtyr JQdrKZtTGQUzQplMU9r88J0EzEEyDXyN9Uxvksio4kc6+aILwl9ZEW2wUa+KaRBpjUMH I5LA== 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 :user-agent:references:in-reply-to:message-id:date:subject:cc:to :from:dkim-signature; bh=pVRNBtRCcwURxgeC0C76nGnGUwxIPDqG4bd9hsI+bwE=; b=WN3L/ITEV7DvYRLqowYT/EK7eBkfEFXcFlYpg0cBR4pQZhvrgkTHI/sc3Rgj27hEjw MK5k+5//+/QiFiGtTQ4IQYrpvP58+v9wwZKIp2jZl2iqiZmrwmmDUisr2fVa34g5J5zv vlLMF4Ud4A9oyeofBxMh100ii4Na0Lbcm2Tb0FCjiwLEoL8l9EZb2LSRAvU9B5NvbpD2 9Ram94WZ5+z0uPyl1WI8RuCCmjMtrW5ZKhgUpaTBeVCZ4RRrX7Lyo3c75gcWGLt4xtkQ xHLsKSZWba+5Pw0REo1vRpg1V46F4rc70U9Dmf5WUfvd5ERODa+jIxGgf6jPxeGCNjir ZmcA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@kernel.org header.s=default header.b=BBJoqax7; 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 b17si8547852pls.15.2019.04.04.02.04.15; Thu, 04 Apr 2019 02:04:30 -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=BBJoqax7; 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 S1731813AbfDDJDc (ORCPT + 99 others); Thu, 4 Apr 2019 05:03:32 -0400 Received: from mail.kernel.org ([198.145.29.99]:41190 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1730827AbfDDJDb (ORCPT ); Thu, 4 Apr 2019 05:03:31 -0400 Received: from localhost (83-86-89-107.cable.dynamic.v4.ziggo.nl [83.86.89.107]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPSA id C70CB21741; Thu, 4 Apr 2019 09:03:30 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=default; t=1554368611; bh=+rhhA4lt0OxCjBffbaVOtmMZTAebDZ1uTa9UCA8QEk0=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=BBJoqax7myvY/T8NmjhLrDy8OFSJK+U72JUsCcReoxk/1oGeETll17ArnY4upFDJa dbGC192s4cdGrKzkJIrKVqtQmXquyNCxC/RUISTim1605XG1+jVyY0k/383gtbAjiC 3dE80T7qiOB5QgqmrwD7GGjVyZlbxq1iLLA2bRKg= From: Greg Kroah-Hartman To: linux-kernel@vger.kernel.org Cc: Greg Kroah-Hartman , stable@vger.kernel.org, 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 4.19 103/187] kprobes: Prohibit probing on RCU debug routine Date: Thu, 4 Apr 2019 10:47:20 +0200 Message-Id: <20190404084608.072585576@linuxfoundation.org> X-Mailer: git-send-email 2.21.0 In-Reply-To: <20190404084603.119654039@linuxfoundation.org> References: <20190404084603.119654039@linuxfoundation.org> User-Agent: quilt/0.65 X-stable: review X-Patchwork-Hint: ignore MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org 4.19-stable review patch. If anyone has any objections, please let me know. ------------------ [ 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 39cb23d22109..81688a133552 100644 --- a/kernel/rcu/update.c +++ b/kernel/rcu/update.c @@ -52,6 +52,7 @@ #include #include #include +#include #define CREATE_TRACE_POINTS @@ -253,6 +254,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