Received: by 2002:a25:1506:0:0:0:0:0 with SMTP id 6csp1800858ybv; Fri, 21 Feb 2020 03:44:38 -0800 (PST) X-Google-Smtp-Source: APXvYqwwma4POifcclmRJKiFi5Sdjti4XDFCX+5aPXDhmmBqHjHzvXeIb9Lyn9GdFBclSSt6riiW X-Received: by 2002:aca:d4ca:: with SMTP id l193mr1680963oig.133.1582285478579; Fri, 21 Feb 2020 03:44:38 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1582285478; cv=none; d=google.com; s=arc-20160816; b=yByHQcT1TW4dW2Dgf7wcVJdVQv+wc18lW+dD31VcxKWQJPx7VZkxi5jofVq0/mZYaZ BIq77ZU0B0hxHBqQmPW/RpI29A6K1Rlnes2DJjDtrhDF7FOldnxzkyewplSrx+O//7+n RiylbXzzH14D3GQVku5qZ2NsEYzIDn5qe1JXmqie9px39hYr/qGob+NZvKXt25v4VzHi jgmdficqzZ9eb9/a0uVuL9h3K6xfkM9IJlbiXtJYyUbB0R5Qp1vbrysZpXet0Pylg0UP SiKP5J22y0hP53WVfOIDAau68KbMFLmgnHPKygvcXRWJAuTOvPnx+7dYfa6UDy7ZgboW i9iQ== 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=mwysckexeH2ibGqYnsqIlH+JvV2orncKleiFIyfPv9o=; b=zFOX+B36Nx+RlRJ6BXf/DJkZb3SP1Eoi9p/bKFL2gAy/pcq8C7K6/10S0xZ5t6Wto/ z/u7jJWXpm7tVFEDXbiTz0G+SV0Ld0pueW6uUYBbTWU0Z5iPijYdEFxrjZyDrxfKOKNS 2ijPJGClc69CpdFzz5iZMeMoZQy0xyLN8Oda0O34DE9q9fv0pQN6k9zKyQ6CBTTeb8a0 7z06lyiSlU5DnyjB/xRqPR+dzYduukm4kLm3HBWGSQ/2LTD+cXVu1hknfZJ6U/JWIjhh f23DbSKR4rjSRb+TkRdiNMJAKf/7PzA6hL5ES4wJjtHK9lCGlH0my8tyfxxmch0bPztf c3EA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@kernel.org header.s=default header.b=JfBJUj0K; 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 z26si1358461oti.215.2020.02.21.03.44.26; Fri, 21 Feb 2020 03:44:38 -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=JfBJUj0K; 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 S1727395AbgBULoR (ORCPT + 99 others); Fri, 21 Feb 2020 06:44:17 -0500 Received: from mail.kernel.org ([198.145.29.99]:42882 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726909AbgBULoQ (ORCPT ); Fri, 21 Feb 2020 06:44:16 -0500 Received: from localhost.localdomain (236.31.169.217.in-addr.arpa [217.169.31.236]) (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 DA33E24653; Fri, 21 Feb 2020 11:44:13 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=default; t=1582285455; bh=NCvkpzqOanbsDIfiwp010XRE/+mm3uHCUTkAtp3xw4Y=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=JfBJUj0KI9PxGqfGdxuEfXOr1KBVRAA9JnI7eLT+q7WCJXJqcTJXNWVIJZtMdf9om JEMCV+11Pltkh8iNc2iuxdpx+iZx32hzSwAUdCiz8JAHudH7IDhhcTAMUyT71gsbOH BiHeEEXLputCOdTExwfVajWtkeQaTphCFB56hJMM= From: Will Deacon To: linux-kernel@vger.kernel.org Cc: kernel-team@android.com, akpm@linux-foundation.org, Will Deacon , "K . Prasad" , Thomas Gleixner , Greg Kroah-Hartman , Frederic Weisbecker , Christoph Hellwig , Quentin Perret , Alexei Starovoitov , Masami Hiramatsu Subject: [PATCH 1/3] samples/hw_breakpoint: Drop HW_BREAKPOINT_R when reporting writes Date: Fri, 21 Feb 2020 11:44:02 +0000 Message-Id: <20200221114404.14641-2-will@kernel.org> X-Mailer: git-send-email 2.20.1 In-Reply-To: <20200221114404.14641-1-will@kernel.org> References: <20200221114404.14641-1-will@kernel.org> MIME-Version: 1.0 Content-Transfer-Encoding: 8bit Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Given the name of a kernel symbol, the 'data_breakpoint' test claims to "report any write operations on the kernel symbol". However, it creates the breakpoint using both HW_BREAKPOINT_W and HW_BREAKPOINT_R, which menas it also fires for read access. Drop HW_BREAKPOINT_R from the breakpoint attributes. Cc: K.Prasad Cc: Thomas Gleixner Cc: Greg Kroah-Hartman Cc: Frederic Weisbecker Cc: Christoph Hellwig Cc: Quentin Perret Signed-off-by: Will Deacon --- samples/hw_breakpoint/data_breakpoint.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/samples/hw_breakpoint/data_breakpoint.c b/samples/hw_breakpoint/data_breakpoint.c index c58504774118..469b36f93696 100644 --- a/samples/hw_breakpoint/data_breakpoint.c +++ b/samples/hw_breakpoint/data_breakpoint.c @@ -45,7 +45,7 @@ static int __init hw_break_module_init(void) hw_breakpoint_init(&attr); attr.bp_addr = kallsyms_lookup_name(ksym_name); attr.bp_len = HW_BREAKPOINT_LEN_4; - attr.bp_type = HW_BREAKPOINT_W | HW_BREAKPOINT_R; + attr.bp_type = HW_BREAKPOINT_W; sample_hbp = register_wide_hw_breakpoint(&attr, sample_hbp_handler, NULL); if (IS_ERR((void __force *)sample_hbp)) { -- 2.25.0.265.gbab2e86ba0-goog