Received: by 2002:a05:6a10:6744:0:0:0:0 with SMTP id w4csp556471pxu; Fri, 23 Oct 2020 07:49:53 -0700 (PDT) X-Google-Smtp-Source: ABdhPJwlVfGwxu7KCc+0pJU/l7pN5Moa4T/xLeRPA/32cP3cTEwmx+4dZIwfl16Y9xAfdImqJW4C X-Received: by 2002:a17:906:a195:: with SMTP id s21mr2243491ejy.146.1603464593432; Fri, 23 Oct 2020 07:49:53 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1603464593; cv=none; d=google.com; s=arc-20160816; b=jQslkAiN8DCNbCR6JvFIt/JW0rlpZT/7yqYXp+VXlLNiMsAHniPcVq4GhW80s956b1 Xfy0+xCCozpN/CjWWA4QL+6fo8UQNPKqbypISZ3SMe1+H1yrZnyIyGg9tovsts7AXiez RiZhwSBa9wGZcP06Aksy84+BqioQDUWFpTg4vwqlAegR0czk1O3JLoXjrj2AulDw5n2p 1BsRzb14icImAjNshfRGa3zeOx7nsfoZO3miBLFtBFoprPpIiHnkPhvmBx5ZJMmn3AnF lYccNzRhYSr6pyERh4C9vEBfAj2DP10qGHO/XLdx6PFe5WvE2aSxlkmuosBKlFWijYEh tNXQ== 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=RXNgU3L9RTsqVTDZZkFay4Z6bQp0YxTtqnGNIWT18iA=; b=mwVS6nyAiCIjLvf3eQYoGykT5lCioI6TtB7dcTJQoJ6PbCwoM6cBaEAtSCLGyD98+u Mypz/P9PZTugJ66kPFeYn/9dKLxfRZXUoGtC4oetv5CtK4Bz0y4HSnRuZB+KRhFSZtRR zzdd2hXYl8kDtYapjwASbzfiIpXJah7zrurg9fxoAPm94+ZpcxzjhCGIAIFhUn0oR8BV 3Dc1zzD06AX5HjV6pIhCRRe3qJJvWwn9Z36iTqTdm2WJd9gXKjndsON0c6iKCaFNcZuR orCNlxcL4w87K4HkUh5IQq4Wjh4hgIigLbu2MkQRsms1iFsQceIAUzxMa++z4EoFDl5D 694A== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@infradead.org header.s=casper.20170209 header.b=NHEaYBPp; 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 d19si931901ejr.473.2020.10.23.07.49.31; Fri, 23 Oct 2020 07:49:53 -0700 (PDT) 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=casper.20170209 header.b=NHEaYBPp; 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 S375740AbgJWHj0 (ORCPT + 99 others); Fri, 23 Oct 2020 03:39:26 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:50580 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S375710AbgJWHjZ (ORCPT ); Fri, 23 Oct 2020 03:39:25 -0400 Received: from casper.infradead.org (casper.infradead.org [IPv6:2001:8b0:10b:1236::1]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id B6128C0613CE; Fri, 23 Oct 2020 00:39:25 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=infradead.org; s=casper.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=RXNgU3L9RTsqVTDZZkFay4Z6bQp0YxTtqnGNIWT18iA=; b=NHEaYBPpV812q/mi9oSzKLZJIb QJuGCecPTZLH6PR2aYdRQojMukbFrpIVXLhpdfHqQN6KSXkM2gmECc0EjKU8hMXeeDi6CkhzknUM3 ZN0k/zQtof+u7l5pP9zds+/Oq3jVYdtJJctX6B1BqI8HuBJaDrPVpVTFgnjKEBSaqlhuzed+xbSvd uZSrhBqerCDSHn1UgWljK7CcWh3hUp7Np4RefJrQFqBuMmOmFCXM5dFMfPY4fgKazyavW8dfhZJ60 TJuR1qzlLWDcTBfwbyD2sXmBlmH3Fyczv5PPozizGwAyVYDz+Ah/uh6ubGXP6VlaaSmpldFsjRhLW Wqd5Xr6g==; Received: from j217100.upc-j.chello.nl ([24.132.217.100] helo=noisy.programming.kicks-ass.net) by casper.infradead.org with esmtpsa (Exim 4.92.3 #3 (Red Hat Linux)) id 1kVrfG-0000sp-ME; Fri, 23 Oct 2020 07:39:07 +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 85AB9304D2B; Fri, 23 Oct 2020 09:39:05 +0200 (CEST) Received: by hirez.programming.kicks-ass.net (Postfix, from userid 1000) id 6D6FF203D09CB; Fri, 23 Oct 2020 09:39:05 +0200 (CEST) Date: Fri, 23 Oct 2020 09:39:05 +0200 From: Peter Zijlstra To: Mathieu Poirier Cc: Suzuki Poulose , Sai Prakash Ranjan , Mike Leach , Ingo Molnar , Arnaldo Carvalho de Melo , Mark Rutland , Alexander Shishkin , Jiri Olsa , Namhyung Kim , coresight@lists.linaro.org, Stephen Boyd , linux-arm-msm@vger.kernel.org, linux-kernel@vger.kernel.org, linux-arm-kernel@lists.infradead.org Subject: Re: [PATCHv2 2/4] coresight: tmc-etf: Fix NULL ptr dereference in tmc_enable_etf_sink_perf() Message-ID: <20201023073905.GM2611@hirez.programming.kicks-ass.net> References: <20201022113214.GD2611@hirez.programming.kicks-ass.net> <20201022150609.GI2611@hirez.programming.kicks-ass.net> <788706f2-0670-b7b6-a153-3ec6f16e0f2e@arm.com> <20201022212033.GA646497@xps15> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20201022212033.GA646497@xps15> Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Thu, Oct 22, 2020 at 03:20:33PM -0600, Mathieu Poirier wrote: > Suzuki's depiction of the usecase is accurate. Using the pid of the process > that created the events comes out of a discussion you and I had in the common > area by the Intel booth at ELC in Edinburgh in the fall of 2018. At the time I > exposed the problem of having multiple events sharing the same HW resources and > you advised to proceed this way. Bah, I was afraid of that. I desperately tried to find correspondence on it, but alas, verbal crap doesn't end up in the Sent folder :-/ > That being said it is plausible that I did not expressed myself clearly enough > for you to understand the full extend of the problem. If that is the case we > are more than willing to revisit that solution. Do you see a better option than > what has currently been implemented? Moo... that really could've done with a comment I suppose. So then I don't understand the !->owner issue, that only happens when the task dies, which cannot be concurrent with event creation. Are you somehow accessing ->owner later? As for the kernel events.. why do you care about the actual task_struct * in there? I see you're using it to grab the task-pid, but how is that useful?