Received: by 2002:a05:7412:8d10:b0:f3:1519:9f41 with SMTP id bj16csp377046rdb; Tue, 5 Dec 2023 07:51:56 -0800 (PST) X-Google-Smtp-Source: AGHT+IHo00FfvBJ4DZ80Xhcou5awL+G85DU2kxgPa26t5SY+7hnjfQ7SHuYm+jyAJQDL8qRXbvLf X-Received: by 2002:a05:6870:961f:b0:1fb:5e42:5094 with SMTP id d31-20020a056870961f00b001fb5e425094mr1788155oaq.41.1701791516655; Tue, 05 Dec 2023 07:51:56 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1701791516; cv=none; d=google.com; s=arc-20160816; b=EsS9OXrcWUxOQS6rrgw4TMzHwqofnqQ9/hgea02oNthWXJLLjGkcW+khyQF0zK1kDz nlFaSf+QOZ65rQKJFjAC2KcX2A/JzaJSreTB/RnV033rI/pfLs+xVpsrZ6HDD6rcCaDq Tcf5ve7n2XbqePz1vtktEXl4aEEsDGevsRd0lUO4GumThkHtteof2eUdslbBi8CYeZDl KySwhsbfRDZ8Q6YyFvxsTD6HOZBc8JX384JhHbQwFYmLfHVKf5qBp5sUA7GZ3C49BRtB F1RqTT3LXkVscIZicYhbnz73Ac0f8F5o16UE7WTiFoYtl/irX+pUJSLmaog5+kweGJKl taOg== 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-transfer-encoding :content-disposition:mime-version:references:message-id:subject:cc :to:from:date:dkim-signature; bh=ZDotk90CexayQPSnBMckA120iMd9UxQLNu+ClvXLgNc=; fh=roOqM4aIY3b32sbg6qAL/Wfwhz5a+sf3irNvD7D56W4=; b=X18OnQiCsn/21281SHzWMmLd6SGEhkQnIGkmNvc8WthYJo1FNdkKjOvpf220wgJYRD OloHOGmYK9i11uoooddRX0RUZG22siAlFNDQCT0oKCGVO+cT/xkTyYKEMS6Y46EenMck 7DUAlkMVIxqtN14BMANa8Lgx/uneJzy0ydKRGBt1kOKD22fihEL3Xdl7YQxjngYn1ZO6 cFs5/TFWm0qb0him6ga+Bz2vMzyZP6Fua5zciEwvEsEcp9IMDo3Aw5VSXrhAsNGoSvoy FQOfYMQJuAgveYHr3/iFdPwn1TC2d4Tdnl2PKqbcHLcHCI4r1m0K2r/t290bjExZBDNn okUQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@kernel.org header.s=k20201202 header.b=n6KocxkD; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::3:5 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. [2620:137:e000::3:5]) by mx.google.com with ESMTPS id j25-20020a056870169900b001faf9271562si2739086oae.330.2023.12.05.07.51.56 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 05 Dec 2023 07:51:56 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::3:5 as permitted sender) client-ip=2620:137:e000::3:5; Authentication-Results: mx.google.com; dkim=pass header.i=@kernel.org header.s=k20201202 header.b=n6KocxkD; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::3:5 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 D135980965AD; Tue, 5 Dec 2023 07:51:36 -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 S1442573AbjLEPvL (ORCPT + 99 others); Tue, 5 Dec 2023 10:51:11 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:54816 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1442575AbjLEPvJ (ORCPT ); Tue, 5 Dec 2023 10:51:09 -0500 Received: from smtp.kernel.org (relay.kernel.org [52.25.139.140]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 432BE196 for ; Tue, 5 Dec 2023 07:51:15 -0800 (PST) Received: by smtp.kernel.org (Postfix) with ESMTPSA id A0A3DC433C8; Tue, 5 Dec 2023 15:51:14 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1701791474; bh=Qg5ESRd5FBfKW+n1IMVwA9nXFoeDUKVN3mRCnzAwGNg=; h=Date:From:To:Cc:Subject:References:In-Reply-To:From; b=n6KocxkDs7zs6xJqEs1RwbNasZrkNYn/OOPqK2h6Zar0nQQ/ZiGIKcsRNdxFHOi/s mMmf4IV0SNrfOEQ54GRoNeA5i1oS1sMqNRp3TcKHV6h2tD5A3Go4hqvdxmuKRqokXw 6GOtJWx/JqcrTepMgWkn4TmYYGs0Xs/VqACqr6j3zri8JcycBlrsu6XPd/1ZpZ1UVA l8BKBp1zNmuNfRIqa/QUDNg0oFjLI96mWjuOYINVQ+PIdGi0ZgXl/k+4ufq5mc3V1s hPli+d7MB8sVLC8RKvdyu/ah+9ps2K3yDZkX8Kyq5Q3V5rYa+emDnK10N/Z0V2XDv6 bFh5MNrkk2I2A== Received: by quaco.ghostprotocols.net (Postfix, from userid 1000) id 1882540094; Tue, 5 Dec 2023 12:51:12 -0300 (-03) Date: Tue, 5 Dec 2023 12:51:12 -0300 From: Arnaldo Carvalho de Melo To: Namhyung Kim 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 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=utf-8 Content-Disposition: inline Content-Transfer-Encoding: 8bit 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:51:37 -0800 (PST) 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. - Arnaldo