Received: by 2002:a05:7412:8d10:b0:f3:1519:9f41 with SMTP id bj16csp440123rdb; Tue, 5 Dec 2023 09:25:10 -0800 (PST) X-Google-Smtp-Source: AGHT+IEiYMo780I93sc2oilzgBZy07xQip1ULnyrxdk/q2budcKXGBn/kbACLMGuvn/zKOdgaRZs X-Received: by 2002:a05:6a00:1405:b0:6ce:3f6:5e44 with SMTP id l5-20020a056a00140500b006ce03f65e44mr1575608pfu.28.1701797110387; Tue, 05 Dec 2023 09:25:10 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1701797110; cv=none; d=google.com; s=arc-20160816; b=i0KdBQRHy+0bGhv77+xetdVOYa936Zn7tpZjH0zZeWKhna7r6jjyQNHDwxdxEVRGuG gOlbR192mvKk0SUi3en94u0qp4AAhy/jVfvzkWMHK5fxhxR9yHuPa5brXwqO4PSWYYz2 Le1jihr27OkDFai/pSQD8cuUZ8dg9zKKSq7BRsKYKqO4dxTKeKcgTrJxGCu3N1yR+hYr CCThm2bUq5hSnSFA2tku59VDr2h7aRZo8tOVqidg31E7IeMyo7hrA8+Gd/pVOls6CZ1+ CYS2ii26uvqcl6tZDlaDwwHpCgKg9fw++UU4pIt7uacovZqPlMSMh71lGUldRJXMCVUG HXkQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:cc:to:subject :message-id:date:from:in-reply-to:references:mime-version; bh=2wTUmZABTvvOMWmqe6UsXj9l14DwDsLpoG6HyG3n9fk=; fh=fMnWOjU4lC6LjhVB6K4GQOWrm2WDrN6FsgE9i2qtFLU=; b=YgQvDMkh1/VNrYGZsLxP9SyhQH5CCknQoZ//8lHqdRATaHNr63lSPe9Mvfc5ZcyxgX 7X5LFJ9ywwauRqxQMny6XzWyUGSkPVQKoZJSNNrKt9xc/N3Na3rmqJXNrMHWz5QBdYb1 TIDHyxSNyh+lvgQlmxxQ5AOS7joRrCdgCt4upFypIoyhjo2JQRwF+7aMOjH0z9rr4i7D v+Rv4RE/xDbQmVPkTgCeLOXh2EFRuEYerS/bajVT/P8jbOK3pOsmUmcozURNmR4Rnqr1 1dVLZOBHlRUkw5MBKokL7Mr32wfDtJYs3YSw92PIZmEih6JGWxS+rzSrxDNbQcguEVL0 rttg== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.36 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org Return-Path: Received: from pete.vger.email (pete.vger.email. [23.128.96.36]) by mx.google.com with ESMTPS id n10-20020aa78a4a000000b006ce52bb999fsi1362367pfa.273.2023.12.05.09.25.09 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 05 Dec 2023 09:25:10 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.36 as permitted sender) client-ip=23.128.96.36; Authentication-Results: mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.36 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org Received: from out1.vger.email (depot.vger.email [IPv6:2620:137:e000::3:0]) by pete.vger.email (Postfix) with ESMTP id D37B681829DC; Tue, 5 Dec 2023 09:25:04 -0800 (PST) X-Virus-Status: Clean X-Virus-Scanned: clamav-milter 0.103.11 at pete.vger.email Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1345550AbjLERYt convert rfc822-to-8bit (ORCPT + 99 others); Tue, 5 Dec 2023 12:24:49 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:58760 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229569AbjLERYs (ORCPT ); Tue, 5 Dec 2023 12:24:48 -0500 Received: from mail-pj1-f46.google.com (mail-pj1-f46.google.com [209.85.216.46]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 1DE9A196; Tue, 5 Dec 2023 09:24:55 -0800 (PST) Received: by mail-pj1-f46.google.com with SMTP id 98e67ed59e1d1-286bba96e94so1786604a91.1; Tue, 05 Dec 2023 09:24:55 -0800 (PST) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1701797094; x=1702401894; h=content-transfer-encoding:cc:to:subject:message-id:date:from :in-reply-to:references:mime-version:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=IFVQTC1s169ecyWHJH7Eki7EkWCVJgaihSXzOtW52Qk=; b=IQ6QW81W+btWJ4CuWapgToo8617vyESK+A3kffvwmtCme1Ib9gpGgpC7P/KHskyodr fmDoAWlVoqROFvHr979T2n8eI0hK/+w+Yk4a7qi2NYbzJHOwk4t/A90wPFOCq0jAquTX LDLt3QnR08oTzWpIpI5nN+biT58si5WjtIYNcDendnwBCvhzXzsxBmRAGabWy5Mo51rX S3hijp098Q2nNqNYWgSiVmmCLwrBlYog4f+1J0c3mxyN0TdDEwkv0S27OUNM1GnWOu+v aR4wsuPeN5y7/wG0SaBP1NxXPT5z1UKSXryO/D4SqzhllCzJE18V4qtaCow1WxxDTkTt 8JsA== X-Gm-Message-State: AOJu0Yyxbd4JQknhvqQkXtDM1Lq8Ly0xO/yqyRhd7bKQ07asgB+atz50 nyQvyetRZciegzu7yVIC/KTbN968zlZVQD2qv1g= X-Received: by 2002:a17:90a:f00a:b0:286:6cc1:8653 with SMTP id bt10-20020a17090af00a00b002866cc18653mr1371402pjb.56.1701797094150; Tue, 05 Dec 2023 09:24:54 -0800 (PST) MIME-Version: 1.0 References: <20231204182330.654255-1-irogers@google.com> In-Reply-To: From: Namhyung Kim Date: Tue, 5 Dec 2023 09:24:42 -0800 Message-ID: Subject: Re: [PATCH v1 1/2] perf metrics: Avoid segv if default metricgroup isn't set To: Arnaldo Carvalho de Melo Cc: Ilkka Koskinen , Ian Rogers , John Garry , Will Deacon , James Clark , Mike Leach , Leo Yan , Peter Zijlstra , Ingo Molnar , Mark Rutland , Alexander Shishkin , Jiri Olsa , Adrian Hunter , Kan Liang , Kajol Jain , linux-arm-kernel@lists.infradead.org, linux-perf-users@vger.kernel.org, linux-kernel@vger.kernel.org Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: 8BIT X-Spam-Status: No, score=-1.0 required=5.0 tests=MAILING_LIST_MULTI, SPF_HELO_NONE,SPF_PASS,T_SCC_BODY_TEXT_LINE autolearn=unavailable autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on pete.vger.email Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org X-Greylist: Sender passed SPF test, not delayed by milter-greylist-4.6.4 (pete.vger.email [0.0.0.0]); Tue, 05 Dec 2023 09:25:05 -0800 (PST) Hi Arnaldo, On Tue, Dec 5, 2023 at 7:51 AM Arnaldo Carvalho de Melo wrote: > > Em Mon, Dec 04, 2023 at 07:33:18PM -0800, Namhyung Kim escreveu: > > On Mon, Dec 4, 2023 at 2:45 PM Ilkka Koskinen wrote: > > > On Mon, 4 Dec 2023, Ian Rogers wrote: > > > > A metric is default by having "Default" within its groups. The default > > > > metricgroup name needn't be set and this can result in segv in > > > > default_metricgroup_cmp and perf_stat__print_shadow_stats_metricgroup > > > > that assume it has a value when there is a Default metric group. To > > > > avoid the segv initialize the value to "". > > > > > Fixes: 1c0e47956a8e ("perf metrics: Sort the Default metricgroup") > > > > Signed-off-by: Ian Rogers > > > > Thanks! I was going to look for the bug but got pulled to other > > > tasks. The patch looks good to me and I tested it successfully on > > > AmpereOne. > > > > Reviewed-and-tested-by: Ilkka Koskinen > > > Looks like it needs to go through perf-tools for v6.7. > > Ian, do you think this one is enough? > > So I had this on my local perf-tools-next, removed now, I also have some > other fixes by Ian on the tmp.perf-tools-next, please let me know what > you guys decide to have in perf-tools for v6.7 so that I can remove it > from there. I think we need this one and the Ampere default-metric-group fix. https://lore.kernel.org/r/20231201021550.1109196-2-ilkka@os.amperecomputing.com/ Also perf list JSON fix can go to v6.7. https://lore.kernel.org/r/20231129213428.2227448-2-irogers@google.com/ Thanks, Namhyung