Received: by 2002:a05:7412:8d10:b0:f3:1519:9f41 with SMTP id bj16csp39203rdb; Mon, 4 Dec 2023 19:33:41 -0800 (PST) X-Google-Smtp-Source: AGHT+IFqbW05sX4yFkn38DiDGPOwFpJSsFpTGyV6+7krAO40F6cv2QXOXw+WLmKUYLZjxZCwq2wr X-Received: by 2002:a05:6a20:9f49:b0:18f:354f:58c1 with SMTP id ml9-20020a056a209f4900b0018f354f58c1mr1055653pzb.10.1701747220984; Mon, 04 Dec 2023 19:33:40 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1701747220; cv=none; d=google.com; s=arc-20160816; b=fQSly5U79lv6+ybdlzqvBeu3GFjmB0YAKxsMKwHI/y+8Wvfga8K5G6IFmZsV3oWZvB lVeO9CSAIVqVEkClJIYysPzAdUbZu6QW71C7Wm44f6Fr/+gIiYjIVIrdzpW7fJVCXIUX lal8IDN0wHJENIpJdewH2Gqz1skJcDgzHHIXwcOeKWAGUMhlvdELMgDdYfYO1ZVSXw7R pb7gdM24P8u+Sd5BiR23z3eMnxviT0ktlz6NNbay3Mkg33ceZy4rFhDPAarVWFqaeB5O B5kzH4zBeHhX/TTvHE2s/saGHNcYspEcNtVPOpPTtNIVJuQ5WP5C2inzCTmuv8jmOJaL RaaA== 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=wShesbJv+F2u5j+Zg0UnY5TsKZ93gqhtlrkCDIERAQ8=; fh=uY+N9ncKC2JwhMY/QZO86IT/2abX/p6+f1wYaL+JbsQ=; b=ne2AbqM/RV4gO+gkjQynNLrq+8dv6Q3Xp978jnwL7zPB0ykFcdVS7zJGAzmw0P8oF8 0hr7oMu+3rCkl46Dpk0av0BkkyHytjTRve4NQh3aMXWSlWGcriOrpofMhrqw5C+HqQG7 69Aq6x3XIh950/n0OfEuPNbbCnXAHgBYyevo7ft9Y7XZkg9QAnX/TtyPIX2POzMztmkc UHFyZyyc2pZuJJQrDsMZYPmB7GuQBt6IYFOb1TthiG9lJ6nBDRmYk6FnKb2Y3q5sOQ3a LPxU/OZRdRC+1S9l8YxPepmMjrX5Fy0UnEzrhKCQgFsolJUApOX7chqU8Eb2I/v2Mbzv t0Hg== ARC-Authentication-Results: i=1; mx.google.com; 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 h3-20020a636c03000000b005c1f51c706bsi8471568pgc.599.2023.12.04.19.33.40 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 04 Dec 2023 19:33:40 -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; 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 8505C8057DB2; Mon, 4 Dec 2023 19:33:38 -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 S1344187AbjLEDdZ convert rfc822-to-8bit (ORCPT + 99 others); Mon, 4 Dec 2023 22:33:25 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:50544 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S231624AbjLEDdY (ORCPT ); Mon, 4 Dec 2023 22:33:24 -0500 Received: from mail-pj1-f51.google.com (mail-pj1-f51.google.com [209.85.216.51]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 6AB7BB4; Mon, 4 Dec 2023 19:33:31 -0800 (PST) Received: by mail-pj1-f51.google.com with SMTP id 98e67ed59e1d1-286d8dae2dbso380468a91.1; Mon, 04 Dec 2023 19:33:31 -0800 (PST) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1701747211; x=1702352011; 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=nMw9Nvv8QLfxV8cCUDbNc+UabXDMv0YVSrH/IrafvLo=; b=tD676X0MztpgP2n4kIQ3RrK7VWabXgvrewrGP5MRb11tOR8ulgcGL2wTaGxZZ6SbsM mn46HkrV1rboXGrwNqehmcUaLXH0P5XHTAatZd1u+nCJjZq0Ompu4bKTkgbQQTBJvy1X QyxrrbaIH+83vh2rIfQ1kAL0JcwF3PU1Cu8tDQZnQKoA5Loxr4yq3WVjYXYhS8IvQnwC DsCYuNLQl6j1uExXubL9sUdYaxskXpJT/vmmiAyiD/eBH8M8uTZTk/Uv3PTq75qt0mnu c+TwC9gSSgTkG/9kYQxxg6LUGF0y7szmoUlCESpd7PczwXa87IiS6iekdOLy08gDlGqV Lr0Q== X-Gm-Message-State: AOJu0YzLo2+ZYJwmMmjV7GZnrimfDhicIRqKDEYvKCM09IlISwMeE7BR 9nfS8w6XokyOz9kaTqGx+8GNkFxUi3ojn2zLfZs= X-Received: by 2002:a17:90a:d801:b0:286:79b7:e86b with SMTP id a1-20020a17090ad80100b0028679b7e86bmr661326pjv.14.1701747210743; Mon, 04 Dec 2023 19:33:30 -0800 (PST) MIME-Version: 1.0 References: <20231204182330.654255-1-irogers@google.com> In-Reply-To: From: Namhyung Kim Date: Mon, 4 Dec 2023 19:33:18 -0800 Message-ID: Subject: Re: [PATCH v1 1/2] perf metrics: Avoid segv if default metricgroup isn't set To: Ilkka Koskinen Cc: Ian Rogers , John Garry , Will Deacon , James Clark , Mike Leach , Leo Yan , Peter Zijlstra , Ingo Molnar , Arnaldo Carvalho de Melo , 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 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]); Mon, 04 Dec 2023 19:33:38 -0800 (PST) Hello, 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? Thanks, Namhyung