Received: by 2002:a05:6a10:8c0a:0:0:0:0 with SMTP id go10csp930301pxb; Thu, 4 Feb 2021 00:15:44 -0800 (PST) X-Google-Smtp-Source: ABdhPJyRxNTUfx4HYgE/sdNSLHM68uLqAs+IauOR6Lj8flfXluhdUVJPztIMu+pGUs10daTuuiQF X-Received: by 2002:a17:906:296a:: with SMTP id x10mr6844493ejd.240.1612426544053; Thu, 04 Feb 2021 00:15:44 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1612426544; cv=none; d=google.com; s=arc-20160816; b=oTj3YNV6E9TQQFT140zxw+c7PdSbeVJEGMnc+Se9Ax38Mf3NGxRe+v30rLndiLJUHa MOG63B6gcZR0qWkbcAIf4DEVqvXnHK60v95wplg67t80r4t3HqoYnHObW74zasaPGEFr WfG9kuCWwsdnc6mjFQhGj2VKF98Fot91SKqOY0eX3r8Uy0pa7avWFz3bSjnJI6GFzItk IPVqU1sLkHgDM2NOWXU4cDQAopASGIR85yfTXQ2OKRb8xcYLnmwj9LCIKa5waoj9I+rI jTul02sp1zpz1Dmp2kPCkPZpcrceubQdmMWSuZDVD8z5RbWeTmynHjFbBgAO+iyMOwYO cRtg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:cc:to:subject:message-id:date:from:in-reply-to :references:mime-version:dkim-signature; bh=1Nog0rN1xf0KJgJL+WKZHZDXJcBl2YkqYIvV+qIaqw0=; b=yvHoZWcYA1So/I2hQsN6PIFDbGaqd5rcxO2wUPLyQUG+57K4lfNUOXkML/yQeTCWH7 iIEDo/TMWtNy8E8odCRfBf2wzXphE7HIH04OvMW0ip1UVz5WHs5hIVc4re/fJN+au/1b X4NU658iBjstK8r+Fa8CkB696TaBn7cLwfStNtf6AjzqKVGu6GBACoNe+ITLCYyHEAlU KsvzfG50cizCS8chzdXw0E5B5pVFg43kX0ZXKgpQSFxVX1JnI/fIRilO5kdWYxJYXHeZ hZ8z0pUCJi388M6mFkMQEgm8glnt0sCVvRK/Ha3Q6uZQWhNPVkt+okmi5lAPp8lfgPBV 5hAg== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@google.com header.s=20161025 header.b=vjqK6vq1; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=REJECT sp=REJECT dis=NONE) header.from=google.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id b8si2862583eds.433.2021.02.04.00.15.18; Thu, 04 Feb 2021 00:15:44 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) client-ip=23.128.96.18; Authentication-Results: mx.google.com; dkim=pass header.i=@google.com header.s=20161025 header.b=vjqK6vq1; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=REJECT sp=REJECT dis=NONE) header.from=google.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S234850AbhBDILq (ORCPT + 99 others); Thu, 4 Feb 2021 03:11:46 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:57910 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S230252AbhBDILp (ORCPT ); Thu, 4 Feb 2021 03:11:45 -0500 Received: from mail-qv1-xf32.google.com (mail-qv1-xf32.google.com [IPv6:2607:f8b0:4864:20::f32]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id A6D95C0613D6 for ; Thu, 4 Feb 2021 00:11:04 -0800 (PST) Received: by mail-qv1-xf32.google.com with SMTP id a1so1303115qvd.13 for ; Thu, 04 Feb 2021 00:11:04 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=20161025; h=mime-version:references:in-reply-to:from:date:message-id:subject:to :cc; bh=1Nog0rN1xf0KJgJL+WKZHZDXJcBl2YkqYIvV+qIaqw0=; b=vjqK6vq1mqbvodBwCVvC16zvZ55GAlwUvGcO5wKvXJgUEH3I8aASfppDhfrVYzIwBA TnYnUXtkr63u5/DMNY0w5uXeqtgm3oJHAcI9mvCj5xfqvWO+m8N/A/xZnrQfd/T0fyS9 3RsZSx2vBdAtGI4kKmkp+zEsxihvfVc1Q0ol69PKFpurZuvcZu85IbSqWSIke+VLrrJJ m9+tTeKwh3y2jx8Qt0eydv1E/U1OTHst8Ujrv0nBjDECjnZJrgWS+fWXYkIH63s/F3gG VHFNPkGOCqYtjidc913a8wfoKFcCYC3bnVNeldRcArmLCtsD3NDfceD8ZRS5GvW2Es9T rFXw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:references:in-reply-to:from:date :message-id:subject:to:cc; bh=1Nog0rN1xf0KJgJL+WKZHZDXJcBl2YkqYIvV+qIaqw0=; b=lKFJSv0Na2lSro3jN6L3cnynw0eeq9Z8Fy7RWiI8K09ZUajpFkkkOGq543Ky96kNwh VSHfq0SoxBB/lYw0gX5cm9JpxqMLKfF4hfOTTPBtem23QIAa20n0kW0upMOn9N4KK/fN qXkRAFQQe0XBbKVc8qfMLpyS4/JEH0RHCZsyoKh/g934lWoG52HnPjuwn60/arW/wdOw 05199urUXGtmch/dAnw/iYPfKlIwGnycgtLoqHiaqOiUv0vS1gUl1Yw8CriqL4rbx+4N WwceEdJByjBsne09AQ7f+o5ILQLRSTSUasNJRNqSaaPT9TNa2LbPvnSPcGYi4BjZuFL5 ntqA== X-Gm-Message-State: AOAM531KyKnW1Iu0VWrBTFhh82D2uxbskTCVBbGOLqu4JK3Rzzrhnlww JS3Ol+B7kRV/SspJfBFHTBhvrRL/mPTuaiOSoVvxAw== X-Received: by 2002:a0c:ab16:: with SMTP id h22mr6458067qvb.44.1612426263739; Thu, 04 Feb 2021 00:11:03 -0800 (PST) MIME-Version: 1.0 References: <20201112103125.GV2628@hirez.programming.kicks-ass.net> In-Reply-To: From: Dmitry Vyukov Date: Thu, 4 Feb 2021 09:10:52 +0100 Message-ID: Subject: Re: Process-wide watchpoints To: Namhyung Kim Cc: Peter Zijlstra , Ingo Molnar , Arnaldo Carvalho de Melo , Mark Rutland , Alexander Shishkin , Jiri Olsa , Will Deacon , LKML , Matt Morehouse Content-Type: text/plain; charset="UTF-8" Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Wed, Feb 3, 2021 at 6:38 AM Namhyung Kim wrote: > > Hello, > > On Sun, Jan 31, 2021 at 7:28 PM Dmitry Vyukov wrote: > > Not directly related to the above question, but related to my use case. > > Could we extend bpf_perf_event_data with some more data re breakpoint events? > > > > struct bpf_perf_event_data { > > bpf_user_pt_regs_t regs; > > __u64 sample_period; > > __u64 addr; > > }; > > > > Ideally, I would like to have an actual access address, size and > > read/write type (may not match bp addr/size). Is that info easily > > available at the point of bpf hook call? > > Or, if that's not available at least breakpoint bp_type/bp_size. > > > > Is it correct that we can materialize in bpf_perf_event_data anything > > that's available in bpf_perf_event_data_kern (if it makes sense in the > > public interface of course)? > > > > struct bpf_perf_event_data_kern { > > bpf_user_pt_regs_t *regs; > > struct perf_sample_data *data; > > struct perf_event *event; > > }; > > > > Unfortunately I don't see perf_event_attr.bp_type/bp_size > > stored/accessible anywhere in bpf_perf_event_data_kern. What would be > > the right way to expose them in bpf_perf_event_data? > > I think you can access it via event->attr.bp_type/size in the struct > bpf_perf_event_data_kern. Hi Namhyung, Right, that's I need. Thanks.