Received: by 2002:a05:6a10:8c0a:0:0:0:0 with SMTP id go10csp1541428pxb; Thu, 4 Feb 2021 16:12:40 -0800 (PST) X-Google-Smtp-Source: ABdhPJyGjrZ7p4jCP1HPHvBMLpGSypIan15rTXwuTzdSedby1tLILopgZOyxALuIOlgH/p+Rq4Zr X-Received: by 2002:a17:907:1181:: with SMTP id uz1mr1592372ejb.60.1612483960338; Thu, 04 Feb 2021 16:12:40 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1612483960; cv=none; d=google.com; s=arc-20160816; b=Uk3nv9ucTjRkcZveeK+YSP6uIt4/CawYWOSAKBeNAe6csY53Fj7XBgaiDecCJ4RnZ1 V0e21yLJ7rmZlNn0Kw7+GO7n0yUwO2FVqbFoXjRndGAg9sOXXvpKEVgkWknpx89OHQlS oLpuadzh7m0JvYciZFsoEfxQ7qT7+txWcReEpYKsWl4G4T5O0F9eHMw9iN7U70yWfjD1 gyO9gDbuchCBWoMMO+y0GosdN+eeNsnpzPPUABuUErgp41WZv05kSFn65Odl0AOxPXPs 9zwymoo4i4387Eb1eFj7Y33oH5Un0n6pt9DftILgUQkCouhA6PH50aY7H+ikEp2eciMs k0fw== 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=UZgksNxm6SOw/gXdBnvP4EnQzkpmeiBlC2lCiXVt8AE=; b=WemHfArS2NwxL2+nCTgBzQNX9+u0FnMPZ96PsghOGcQz0qgz4GAZVMGvly1nnB8kUj HjwVKHLlMboPl888ohBN9FJ1lSwbW6Q/REpGDRDip3rVZJbaEupneywNhjqAbnHTVrNW OZ7eISXDgXtK6VQZd1GomT0vx4vg9V6EjDyKpQcUGUnM9K16yerKZIaPafi+OUMGXeSZ SPXWGSHH6CFQShoeG9Jd2PahFAEjkRR2evvuQjqR7pfdzQ5hbofE5eirFaDZo9GOQNyu 3Vn7Pg14HisvnwGIOvGAW4O2CwsXiH/+PTry5jY4PQ9HHlvsVWl8I8qM1461+WCo4Aht aRPA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@infradead.org header.s=merlin.20170209 header.b=oXS9HxGi; 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 w24si3782245eje.339.2021.02.04.16.12.15; Thu, 04 Feb 2021 16:12:40 -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=oXS9HxGi; 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 S236237AbhBDNL3 (ORCPT + 99 others); Thu, 4 Feb 2021 08:11:29 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:37320 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S236187AbhBDNLZ (ORCPT ); Thu, 4 Feb 2021 08:11:25 -0500 Received: from merlin.infradead.org (merlin.infradead.org [IPv6:2001:8b0:10b:1231::1]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 64265C061573 for ; Thu, 4 Feb 2021 05:10:45 -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=UZgksNxm6SOw/gXdBnvP4EnQzkpmeiBlC2lCiXVt8AE=; b=oXS9HxGii1LL4ZtEbzJwHNBxCq DG4gZ1VgPF0D02+0H/rUyE3sgE/THb6wbRmK7XNOwCPLmUY7Mxf7vD2auu5Uj9Md3GCN/VIrT5Ows /Sii0vPxK7OYoOCb21hQ6IHvOTteyMPLX87GzZWcqnzR8fw3XFydS+IX7s4AnXiT/09trjXz/HeX7 R7CFR4uaKFid3xMHzNxIHXJedu5hbv4InmofWR+Ikw1sh1xRwZAlO2jxDDh+wS33Lkehp1W/i/7te WLdJofKGmDPPgr8Rtw/uAnbvpU3TnPUHHeyFVGDKFIbh9zWo8JprUn5dciCE/Je9J4Sx44YneVBVX 1xtk5mGQ==; 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 1l7eP8-0005WU-My; Thu, 04 Feb 2021 13:10:38 +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 425073003D8; Thu, 4 Feb 2021 14:10:36 +0100 (CET) Received: by hirez.programming.kicks-ass.net (Postfix, from userid 1000) id 27616213D2E27; Thu, 4 Feb 2021 14:10:36 +0100 (CET) Date: Thu, 4 Feb 2021 14:10:36 +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 01:53:59PM +0100, Dmitry Vyukov wrote: > Humm... I was thinking of perf_event_open(pid == 0). > It does not make sense to send SIGTRAP in a remote process, because it > does not necessarily cooperate with us. > > But is there any problem with clone w/o CLONE_THREAD? Assuming the > current process has setup the signal handler, the child will have the > same handler and the same code/address space. So delivery of SIGTRAP > should work the same way in the child. Nothing should be doing CLONE_VM without CLONE_THREAD. Yes, it's possible, but if you do so, you get to keep the pieces IMO. Current libc either does a full clone (fork) or pthread_create, pthread_create does CLONE_THREAD.