Received: by 2002:a05:7412:8d10:b0:f3:1519:9f41 with SMTP id bj16csp356379rdb; Tue, 5 Dec 2023 07:20:16 -0800 (PST) X-Google-Smtp-Source: AGHT+IGsnqk309bKsRAW+vmz3+ZFJW+sh1MiESWH/OX37YwwXda6jFOzxCVJeEMLxnJF037qe/8k X-Received: by 2002:a17:902:f68d:b0:1cf:b55d:a12c with SMTP id l13-20020a170902f68d00b001cfb55da12cmr6269642plg.2.1701789615717; Tue, 05 Dec 2023 07:20:15 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1701789615; cv=none; d=google.com; s=arc-20160816; b=NAhAohpxeOKjwfVm7JkaBh3BwkRl0ipyaa4ToI3BCJhUJwgWd1ye8tujbLy1NXZi86 OoOR0N0V4/bKe5uamD5f5d6y4BcWKcS5h8kQD3bY7c8bWodvZu+twm7ymR+0mWEwTUMk Ps1YeSIZv0DSZykQf0uznB7qt+vUcdwczQXdDpUXBpJnBh+i3KzSGko29hXFn6P4ssjr DiAOWA+AXa75gab5u/l8HdHD2QIjCRKBoYZF2zM3uliTnJXfx/mEXFUSjQen39z7dSYu r+UxOmrZaMkfTF5ANJRc5kGW7rqXbTVwYtEoeWWCvHpME/WGwBv/FFD6T+u464EmChp1 e5BQ== 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=3z3tWztniLGX0ds1zumNOrkA6r4QjuVe2YdBjMFj+Q0=; fh=Zajq03Qi3b6Vjp1Lz+Hg9raFeTtxLN9zpewcneA7At4=; b=rcnDeVw0u2ZX4UyeqrExStC5HVbTKBv7kXt5ilOYu0Bip8XiLZsVYNDjaEorPgWQQy 3rs00Su6KJ6SyOilf8GMtN3tNXySzKoJbeCTA8s5RojAIzHPgBjZmZjho5xpxW9KKc1g 8peLtX9zvpjal6UZawFskyZVdtIIOu5AekVhVUy+yQRvpQBmG5WB555rCd1mI4S3EVbV nikV45CdEVHGvh9nhWRwS/9WtVmtKGJcly1BygfnCLHaSiVkqwkp3NKcFv5Jd6BNKxpx Q9CwvTIMZUX35/s1T3BfRyccSoZa6K9q8MAHVhVcm5jqAfdIIK5n9f1iSLWSN7EJErZR Vb2Q== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@kernel.org header.s=k20201202 header.b=kBjvUUsE; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.35 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 groat.vger.email (groat.vger.email. [23.128.96.35]) by mx.google.com with ESMTPS id v11-20020a1709028d8b00b001c589ba4a0bsi9787372plo.195.2023.12.05.07.20.15 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 05 Dec 2023 07:20:15 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.35 as permitted sender) client-ip=23.128.96.35; Authentication-Results: mx.google.com; dkim=pass header.i=@kernel.org header.s=k20201202 header.b=kBjvUUsE; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.35 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 groat.vger.email (Postfix) with ESMTP id 5C12F8076C89; Tue, 5 Dec 2023 07:20:13 -0800 (PST) X-Virus-Status: Clean X-Virus-Scanned: clamav-milter 0.103.11 at groat.vger.email Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1346157AbjLEPT5 (ORCPT + 99 others); Tue, 5 Dec 2023 10:19:57 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:49560 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1346848AbjLEPTx (ORCPT ); Tue, 5 Dec 2023 10:19:53 -0500 Received: from smtp.kernel.org (relay.kernel.org [52.25.139.140]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 4DB381A4 for ; Tue, 5 Dec 2023 07:19:57 -0800 (PST) Received: by smtp.kernel.org (Postfix) with ESMTPSA id 54631C433C8; Tue, 5 Dec 2023 15:19:56 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1701789596; bh=ESDuP7NVVlvgAJpmS9L3L4ji0KgGi7hT55Q57KBxzu4=; h=Date:From:To:Cc:Subject:References:In-Reply-To:From; b=kBjvUUsE0hmw9JI2Ft9sn5J2xziqoli8xPJp2mIjjibv4EGtM8TNNevzF/QZDuHwa MK5XVsaRAnGzogU77hYHgf64XoL5NwjdCYWf5J/akr+8Kw0rcaQ44+wGy8Y9Is47ef QTOjutmydzGoGsTwdwR6w5UF0MafyFAdUb/2qRsLEtZ6fNlwGebfdzhChV/aOdppGx t9hHxD+OS+FEux5L6ZVKXL++0XBUfoMvb64etlUWp/RwCqeelUnxYKwYXY7dahKlMP Uvy3lzFLIANxKb7/+naCjER9wYcDAVPUt0g24vUAvaL8oy9CyIXB9d33iaboFJJxaB oKvwb5gpw1zZw== Received: by quaco.ghostprotocols.net (Postfix, from userid 1000) id B953740094; Tue, 5 Dec 2023 12:19:53 -0300 (-03) Date: Tue, 5 Dec 2023 12:19:53 -0300 From: Arnaldo Carvalho de Melo To: Ilkka Koskinen Cc: Ian Rogers , John Garry , Will Deacon , James Clark , Mike Leach , Leo Yan , Peter Zijlstra , Ingo Molnar , Mark Rutland , Alexander Shishkin , Jiri Olsa , Namhyung Kim , Adrian Hunter , Kan Liang , Kajol Jain , linux-arm-kernel@lists.infradead.org, linux-perf-users@vger.kernel.org, linux-kernel@vger.kernel.org Subject: Re: [PATCH v1 1/2] perf metrics: Avoid segv if default metricgroup isn't set Message-ID: References: <20231204182330.654255-1-irogers@google.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: X-Url: http://acmel.wordpress.com X-Spam-Status: No, score=-1.2 required=5.0 tests=DKIMWL_WL_HIGH,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,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 groat.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 (groat.vger.email [0.0.0.0]); Tue, 05 Dec 2023 07:20:13 -0800 (PST) Em Mon, Dec 04, 2023 at 02:44:54PM -0800, Ilkka Koskinen escreveu: > > > 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 Thanks, applied to perf-tools-next. - Arnaldo