Received: by 2002:ac0:946b:0:0:0:0:0 with SMTP id j40csp4006784imj; Tue, 12 Feb 2019 08:15:53 -0800 (PST) X-Google-Smtp-Source: AHgI3IaEpDKD0Yc538HxiXTT/O9xFSrbw1+7Pl+0hvab22N4iIJxIC4D1f/Mq/McCdKJJ8uZ1bnH X-Received: by 2002:a17:902:9893:: with SMTP id s19mr4773755plp.165.1549988153581; Tue, 12 Feb 2019 08:15:53 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1549988153; cv=none; d=google.com; s=arc-20160816; b=NkC+p1GtOUYdWil0WnpA3dUlpgS/xQ5eZlOOSvJXf2QLbJO3Nu/YBh+YtPT0hPiq+5 xyHTD5dBHsns+Bc3MUcV6gqcZyL7sS6NL7tfjLJLdquvIguIVvsOS4/nx4bfbpqND4jg Vf2AiwMj2tEVLMiLzumGfS7QgvqUo0VU77tjizggDCrw4wHzAd/q2vUGyQnIXb1IASv2 foF/E7Yl8uT4xhyrO4eF+9V1+5lhW8t8FIXkNJXrNEHWhsbU3PivCghsTg3e47H/iStI DcnyDhySCUtp+Q6XmrxXfqLM/GfYWzUIAoU3GAqVn6rc2wHaObb4HeKafJsAhC5cBQM3 85+g== 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=HbT4btDRsbJeJCg3p/URPVRXamArFA1g9y8SfmUC/kw=; b=F/jpwyRgO38Hphkl65XnCuCtCZrfiprCV8M0xorJu+iXczRICqGlZWPQiaJa0iLXF1 GmrIDGuhdahj0iHdf2MkUV49/qit7BLgWcW5a0leJl6Rbbitoa62PetEF+Y4L0Togkik sJtm1vwdpCg9sCFZIe/R46MCrLkBzohHn0G6C5bsMFxjXwtRlqh9diFcEiL7qMujfE3s Na+yFQo5NVCh8mszRmCK6Ieg15bu0gfLFTMyz2IB1HMtVJoGM3SRx16FVjjMDp8psU7l rzLt578XpH2WksVF5cdsREekigNi2FjNdZ44K/Qrj6Zo96syXsOqvzkJaaJESgbLsK7w 9H1A== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@kernel.org header.s=default header.b=f4ZhZ47R; 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 g20si1111388pgk.587.2019.02.12.08.15.37; Tue, 12 Feb 2019 08:15:53 -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; dkim=pass header.i=@kernel.org header.s=default header.b=f4ZhZ47R; 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 S1727932AbfBLQPB (ORCPT + 99 others); Tue, 12 Feb 2019 11:15:01 -0500 Received: from mail.kernel.org ([198.145.29.99]:43348 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1730301AbfBLQPA (ORCPT ); Tue, 12 Feb 2019 11:15:00 -0500 Received: from localhost.localdomain (NE2965lan1.rev.em-net.ne.jp [210.141.244.193]) (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 606EC21773; Tue, 12 Feb 2019 16:14:59 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=default; t=1549988100; bh=Xv5OzXSHjGSc0XjZHsImy5SwDPRNMpFpsQfpnURglKA=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=f4ZhZ47R1zi/Iq36B7tHASuS0xrDSB9K2U70RbAb7WkGBcBe4L1IojSf3LsQQ0lWU WL3QAG0MW/GN1X/+U73EmEaK3TwrLQ+g5IMjsS3eftUeXUCkAU1wKA8H/sgRod0u4/ O2ZbLNVaBP7OQ6zNX8c4waAdBUe5MySbsjpM4XmE= From: Masami Hiramatsu To: Ingo Molnar Cc: Masami Hiramatsu , peterz@infradead.org, Mathieu Desnoyers , linux-kernel , Andrea Righi , Steven Rostedt Subject: [PATCH -tip v3 08/10] kprobes: Prohibit probing on RCU debug routine Date: Wed, 13 Feb 2019 01:14:37 +0900 Message-Id: <154998807741.31052.11229157537816341591.stgit@devbox> X-Mailer: git-send-email 2.13.6 In-Reply-To: <154998785011.31052.1475728497912659748.stgit@devbox> References: <154998785011.31052.1475728497912659748.stgit@devbox> User-Agent: StGit/0.17.1-dirty MIME-Version: 1.0 Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: 7bit Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Since kprobe itself depends on RCU, probing on RCU debug routine can cause recursive breakpoint problem. Prohibit probing on RCU debug routines. int3 ->do_int3() ->ist_enter() ->RCU_LOCKDEP_WARN() ->debug_lockdep_rcu_enabled() -> int3 Signed-off-by: Masami Hiramatsu --- 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?