Received: by 2002:a05:6a10:1a4d:0:0:0:0 with SMTP id nk13csp1482010pxb; Wed, 2 Feb 2022 06:04:13 -0800 (PST) X-Google-Smtp-Source: ABdhPJxVxbsUoes0fWBxDXu/JtuHqH2+bwZiCMth5+4UcgTU8eJ33lfRMAksArLsx5kjITtuNzk8 X-Received: by 2002:aa7:800a:: with SMTP id j10mr30074216pfi.28.1643810652979; Wed, 02 Feb 2022 06:04:12 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1643810652; cv=none; d=google.com; s=arc-20160816; b=dCXpUkRLVyZCnTvUstAx6Tq4EuBfbKRxxRFPOQpzRot/f/qdGZoO86CamSjAM4nQTd hnkRtNa96Yb/Z1CrmHX6ykfkCcV/91vl6QE0aB4PlmdZy6hhvX8ceqMQFm4cLdCxwqqB TJ4ltbCi0zYfdkdM/nhoapSoueh2zdKJYrf94PYW+0DkCbmLODC8XLauuOr/zRhJDKBV cs6O2F110VL6Q3+7JGjz7EOCQNkfN54ZzrO8xVd6/HQv+rOJFEUXV4NiJDeR/+tzOnHK VCQx8tDcWk7hQcJYRQRKpSCElIjxaZhjDPEnEiejSxyD5pSPxgm6fvLA+1MYI/iTQ5S/ BwNA== 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=uLsDcxgkLM505bQLLfPdUrEH+ZZAWYgX9Yuu49ayqz0=; b=qikyepAodbhHZpsJUdNiKoNMpGaY83z4wrEPmEn9kHAnhIy60hrtS+7cs9uaAQZEbu 5Gd6kS7X1p45K5Ynbfe6t18GIWQfU9TGyBrsKtIA1Rg0bslWMaKgt1Y8PFaBD5Td+Va1 NBdJnEgqy1h48D+l3HSj2Fg2ees/gIwD73imnBotgbM9Yd7WLFL3DGpOtKDAMN4pd+IA /7+xNCypsVhHQ3QdZoZVyK+nuVNId+1ZXj5BdI12O0IcOuehOfUSo95DvOimk1WW4WWR YT/OdT2oQLfU1YBHpaAploY4RQi3SKWmI4qIXkr/TwOgi0XgJa+5UoVHyp0wmuqO1MVR jLHg== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@infradead.org header.s=casper.20170209 header.b=bGv32kes; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Return-Path: Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id w9si18083908plp.280.2022.02.02.06.03.59; Wed, 02 Feb 2022 06:04:12 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) client-ip=2620:137:e000::1:20; Authentication-Results: mx.google.com; dkim=pass header.i=@infradead.org header.s=casper.20170209 header.b=bGv32kes; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S237099AbiBALHd (ORCPT + 99 others); Tue, 1 Feb 2022 06:07:33 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:35446 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S236958AbiBALHc (ORCPT ); Tue, 1 Feb 2022 06:07:32 -0500 Received: from casper.infradead.org (casper.infradead.org [IPv6:2001:8b0:10b:1236::1]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 5BC4DC061714; Tue, 1 Feb 2022 03:07:32 -0800 (PST) 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=uLsDcxgkLM505bQLLfPdUrEH+ZZAWYgX9Yuu49ayqz0=; b=bGv32kesZbIyjhfnFra05FTj66 aM5/UxXvuhlDWIf74twvb2SOrlyURwhda/InqRpU8CBPfiK+lL5GlZjSZ935X4IZTVHozGWSeRt1e M6e1GZb7Z86AATzXTaJQo93SWTFggI1dgmHqCa16K0mTmq3GqrvxiQPixwXuZIMQnDTH4rF960EqR NA+imUPqf97+SDWIZzf7BSQsDZawaO6QN80dkVCSt9HWoVQ3siXpBeM+xywbD/NJSG8WXQVIkmt4q c7vHzSv1WpW3Pcf+KS2y975B2rTGje73lVlPNEamPGSJMtrGfj7eCDnCRjxMEt8QL1dlzYSfF1B4X nkXI8BPA==; Received: from j217100.upc-j.chello.nl ([24.132.217.100] helo=worktop.programming.kicks-ass.net) by casper.infradead.org with esmtpsa (Exim 4.94.2 #2 (Red Hat Linux)) id 1nEr0L-00C2ht-Gs; Tue, 01 Feb 2022 11:07:21 +0000 Received: by worktop.programming.kicks-ass.net (Postfix, from userid 1000) id CA91398623E; Tue, 1 Feb 2022 12:07:20 +0100 (CET) Date: Tue, 1 Feb 2022 12:07:20 +0100 From: Peter Zijlstra To: Dmitry Vyukov Cc: Marco Elver , Ingo Molnar , Arnaldo Carvalho de Melo , Mark Rutland , Alexander Shishkin , Jiri Olsa , Namhyung Kim , linux-perf-users@vger.kernel.org, kasan-dev@googlegroups.com, linux-kernel@vger.kernel.org Subject: Re: [PATCH 1/3] perf: Copy perf_event_attr::sig_data on modification Message-ID: <20220201110720.GU20638@worktop.programming.kicks-ass.net> References: <20220131103407.1971678-1-elver@google.com> 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 Tue, Feb 01, 2022 at 08:32:45AM +0100, Dmitry Vyukov wrote: > On Mon, 31 Jan 2022 at 11:34, Marco Elver wrote: > > > > The intent has always been that perf_event_attr::sig_data should also be > > modifiable along with PERF_EVENT_IOC_MODIFY_ATTRIBUTES, because it is > > observable by user space if SIGTRAP on events is requested. > > > > Currently only PERF_TYPE_BREAKPOINT is modifiable, and explicitly copies > > relevant breakpoint-related attributes in hw_breakpoint_copy_attr(). > > This misses copying perf_event_attr::sig_data. > > > > Since sig_data is not specific to PERF_TYPE_BREAKPOINT, introduce a > > helper to copy generic event-type-independent attributes on > > modification. > > > > Fixes: 97ba62b27867 ("perf: Add support for SIGTRAP on perf events") > > Reported-by: Dmitry Vyukov > > Signed-off-by: Marco Elver > > Reviewed-by: Dmitry Vyukov Thanks guys! Queued for perf/urgent