Received: by 2002:a05:6a10:8c0a:0:0:0:0 with SMTP id go10csp1189534pxb; Thu, 4 Feb 2021 07:08:34 -0800 (PST) X-Google-Smtp-Source: ABdhPJyEx5OT1R9Q0uV2+iVTdsuMfsp/1d+vI9nZWdrISplDQq370HbgPHs7FcMtZT5fgkTa9N4q X-Received: by 2002:a1c:3185:: with SMTP id x127mr7692503wmx.117.1612451314378; Thu, 04 Feb 2021 07:08:34 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1612451314; cv=none; d=google.com; s=arc-20160816; b=q/9Sx+jc/q3avVjdpqqYscoPPxD5qIwnp4Rux5devvXN4+LmsJrKTSbrtewtsra2eT xtejr1icXuAv7qMnHJXOZ0pAxepI/rsRims9tMNu+nZXDhly/ntot19WjQLRe8ly+ERt iEbt7laQnzCYCqYoWYHP0kQ2PyKBcb5mkexUJmJUujcZxRHFX3I7UJdonE4pkg8b26/V u8Ub90zEUssVe4xLrZRYvo1x2og8SiLTrfS/GhdgqiHN6mQ4a3TV+h+5BKYRxeN1jgXl mTMsF5Z+znU8eGfVVOHa05bl1nWFca+EXlK0F9UE+1pqFOJBhQS8HiXb3lHHrX0YI4fy JTEg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:in-reply-to:content-disposition:mime-version :references:message-id:subject:cc:to:from:date:dkim-signature; bh=XyOwXOoeFZVqveQ9nuOPRZtCFtnB9kvZkp68qQBH4v8=; b=LJR1MTTo0xeB6XSrQnCXo9HvEaMjjgiYV58YstX3lxxnOWMXZWqaCQx7dDhbGOxSAz 1anAKl3cRrKQTu0pbC5ftkB7wHVdgmBjzpuAGd9SQc0HtEPogu5c0RjUuUb8v9kU/G9X L1MjMjTjeRyKt3wvqMQs7E4FBo7sdbkBicW79C32t4sgkmnGMiiaped77XYGzcP/BBsz yOwp7fu3ZPpw8TpzmCfP+urmARfQqbabNTaZVGW6O2tdfvDawGTIqtAKqWA6X7veStID BHcKEBTaiynkBM5gznKW/GQpwBAYbYwojKDwFyFuPKVMf4OYaOtOS8zaU9ctlZABXtZU Oyyg== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@infradead.org header.s=merlin.20170209 header.b=ADLGmyoy; 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 Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id g1si3241908ejb.606.2021.02.04.07.08.08; Thu, 04 Feb 2021 07:08:34 -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=@infradead.org header.s=merlin.20170209 header.b=ADLGmyoy; 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 Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S237076AbhBDPGF (ORCPT + 99 others); Thu, 4 Feb 2021 10:06:05 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:60570 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S236988AbhBDO7t (ORCPT ); Thu, 4 Feb 2021 09:59:49 -0500 Received: from merlin.infradead.org (merlin.infradead.org [IPv6:2001:8b0:10b:1231::1]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 9E37CC0613D6 for ; Thu, 4 Feb 2021 06:59:09 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=infradead.org; s=merlin.20170209; h=In-Reply-To:Content-Type:MIME-Version: References:Message-ID:Subject:Cc:To:From:Date:Sender:Reply-To: Content-Transfer-Encoding:Content-ID:Content-Description; bh=XyOwXOoeFZVqveQ9nuOPRZtCFtnB9kvZkp68qQBH4v8=; b=ADLGmyoynXDwSot65CsQLkbkSy Th5W55fZXqQWXAMJLlWZEg+V/cWwKcjfyGP+NHgMzvCkGPoMbo1Sidq+7CmrAUDnMXdPQwgIv6JpU Mf3qqlQ8nsPeZS+a8VBjlc3ILUmEUfE5Bw82Rk+J/bO6Pfqi+nuods2JQWiNNwdk2DiDvuzy75Nuy cvs/hTRrBnTOlYc/bonCffTwMI2/t9J8P4M7mLgMsEKHTLL/wiNeyRl5+XWnXZ8d5XrO38djXSg4e 0T0ftl11Ap07Cg8zhJcbtkoFEG6L1doHJ4aNtKeAbMfmWo3KOHsyQpeDH61O5yAPfdkMXd4PGV+Wg Nm9h0I9g==; Received: from j217100.upc-j.chello.nl ([24.132.217.100] helo=noisy.programming.kicks-ass.net) by merlin.infradead.org with esmtpsa (Exim 4.92.3 #3 (Red Hat Linux)) id 1l7g63-0006K9-25; Thu, 04 Feb 2021 14:59:03 +0000 Received: from hirez.programming.kicks-ass.net (hirez.programming.kicks-ass.net [192.168.1.225]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by noisy.programming.kicks-ass.net (Postfix) with ESMTPS id 725ED3003D8; Thu, 4 Feb 2021 15:59:01 +0100 (CET) Received: by hirez.programming.kicks-ass.net (Postfix, from userid 1000) id 372D62C1C47CA; Thu, 4 Feb 2021 15:59:01 +0100 (CET) Date: Thu, 4 Feb 2021 15:59:01 +0100 From: Peter Zijlstra To: Dmitry Vyukov Cc: Ingo Molnar , Arnaldo Carvalho de Melo , Mark Rutland , Alexander Shishkin , Jiri Olsa , Namhyung Kim , Will Deacon , LKML , Matt Morehouse Subject: Re: Process-wide watchpoints Message-ID: References: MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Thu, Feb 04, 2021 at 02:35:36PM +0100, Dmitry Vyukov wrote: > I meant that we could restrict synchronous SIGTRAP for (1) > perf_event_open(pid != 0) and (2) disable it after exec. Hmm, I think I finally get what you're after. And yes, multi-process or fork() based thingies are common and might well work too. disable_on_exec isn't quite right though, it needs to be something that kills the events entirely. I'll think about it.