From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from bombadil.infradead.org (bombadil.infradead.org [198.137.202.133]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.lore.kernel.org (Postfix) with ESMTPS id B2CA0C27C79 for ; Thu, 20 Jun 2024 11:31:57 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=bombadil.20210309; h=Sender:List-Subscribe:List-Help :List-Post:List-Archive:List-Unsubscribe:List-Id:Content-Transfer-Encoding: Content-Type:In-Reply-To:From:References:Cc:To:Subject:MIME-Version:Date: Message-ID:Reply-To:Content-ID:Content-Description:Resent-Date:Resent-From: Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID:List-Owner; bh=NAZEul52IaWuWVPD+c9D5qSALeIeTbhe6Nd4CEmFH9U=; b=rQB68cBqxMj5419c7laRLxmbYy lxD7wKlNKvdOEJATIft/qxV+2XkU07x/Vcl8F8lRpKaqU3DMdGxEV3xWxmf7/PnuPGt371xNSvymg V28Id+/1kiDKO1VCeN1L+QVpWmZy6hnQhU6ioh2ndhjJEKyf2ZG0GQCFXFe7MPioxJ4GV1/8em9Np 1voVzrUoSQwXvck4zQzLBtnv9CNtL65E1aQ2/JBr/vNvO4TLKKBQfktLbKvaIWujx4pnAl8bkDkeU x3sFQuuCE9QC4CvnbO5VEjZw0frAeQbn5JBgS7klXgmKmYhv//VO0l/bpUpYJEBhpKnu+uh03nHlO fiWlObAw==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.97.1 #2 (Red Hat Linux)) id 1sKG12-00000004l8L-1aG1; Thu, 20 Jun 2024 11:31:44 +0000 Received: from foss.arm.com ([217.140.110.172]) by bombadil.infradead.org with esmtp (Exim 4.97.1 #2 (Red Hat Linux)) id 1sKG0y-00000004l7C-3i37 for linux-arm-kernel@lists.infradead.org; Thu, 20 Jun 2024 11:31:42 +0000 Received: from usa-sjc-imap-foss1.foss.arm.com (unknown [10.121.207.14]) by usa-sjc-mx-foss1.foss.arm.com (Postfix) with ESMTP id 95142DA7; Thu, 20 Jun 2024 04:32:03 -0700 (PDT) Received: from [192.168.1.100] (usa-sjc-mx-foss1.foss.arm.com [172.31.20.19]) by usa-sjc-imap-foss1.foss.arm.com (Postfix) with ESMTPSA id 65CDC3F6A8; Thu, 20 Jun 2024 04:31:37 -0700 (PDT) Message-ID: <3ab8410a-6c74-4dc1-997d-7b1a00fba877@arm.com> Date: Thu, 20 Jun 2024 12:31:36 +0100 MIME-Version: 1.0 User-Agent: Mozilla Thunderbird Subject: Re: [PATCH] arm64: hw_breakpoint: Save privilege of access control via ptrace To: Oleg Nesterov , Tiezhu Yang Cc: Will Deacon , Mark Rutland , Catalin Marinas , Peter Zijlstra , Ingo Molnar , Arnaldo Carvalho de Melo , Namhyung Kim , linux-arm-kernel@lists.infradead.org, linux-perf-users@vger.kernel.org, linux-kernel@vger.kernel.org References: <20240618071010.11214-1-yangtiezhu@loongson.cn> <20240619151524.GB24240@redhat.com> <9cc6d314-2431-c1b5-3d46-63c0ac80ed4d@loongson.cn> <20240620090807.GC30070@redhat.com> <93d96e55-c180-444a-9b3f-f96db5f9e37d@loongson.cn> <20240620103600.GD30070@redhat.com> Content-Language: en-US From: James Clark In-Reply-To: <20240620103600.GD30070@redhat.com> Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 7bit X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20240620_043141_136938_EE096FD1 X-CRM114-Status: GOOD ( 15.91 ) X-BeenThere: linux-arm-kernel@lists.infradead.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: "linux-arm-kernel" Errors-To: linux-arm-kernel-bounces+linux-arm-kernel=archiver.kernel.org@lists.infradead.org On 20/06/2024 11:36, Oleg Nesterov wrote: > Again, I can't really comment, I know almost nothing about perf, but > > On 06/20, Tiezhu Yang wrote: >> >> On 06/20/2024 05:08 PM, Oleg Nesterov wrote: >>> >>> But to me the very idea of arm64-specific and "kernel only" member in >>> perf_event_attr looks a bit strange. >> >> I noticed that there is a similar arm64-specific change in >> commit 09519ec3b19e ("perf: Add perf_event_attr::config3") > > but this is another thing even if I have no idea what .config3 means. > > If nothing else, what do you think, say, tools/perf can do with ->bp_priv? Yeah, including the tools side change in the same series might help to explain. It's not obvious what the end goal is from the commit message. Thanks James > > What should sys_perf_event_open() do if bp_priv != 0 comes from user space? > > Nevermind, please forget, I leave this to you and maintainers. > > Oleg. > >