Received: by 2002:ac0:cd04:0:0:0:0:0 with SMTP id w4csp759109imn; Sat, 2 Jul 2022 05:46:26 -0700 (PDT) X-Google-Smtp-Source: AGRyM1umVCOB+tdpQQ1fDhGiHURjxAdCDnS1Q7uUTc/XkOaNWoOo1wccOO/3+VBLmG27avUkLyKL X-Received: by 2002:a17:907:7678:b0:726:9fca:8106 with SMTP id kk24-20020a170907767800b007269fca8106mr19611550ejc.640.1656765986669; Sat, 02 Jul 2022 05:46:26 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1656765986; cv=none; d=google.com; s=arc-20160816; b=EQ294fGt5so65wKp3ak0J060jUMagl4WzyNc0bFRF2UtfSS2LfT77QCn7+JROZ9WXa wkdcfjg9fu25TdcD1Ud2QL/ZBjZ+i5G3w0xxBUoZxI23sVLtyUzx2shq/PFQzyjNFDFK xi3kFQ38hnpBo3p5CBPiThYPRfGUV4U2NHBFWMzHA2++mY7QxohuMwjE76XmKmkFswlO DyOZZRBrpqgXzt+dH6rv9IdZ1OZszzaTO+eNkLRQQh+Gv5Yh4Ga3YfNnXWK6nHDZ4mdT imYAeUajln0IiBlZZLgmeQYhN5TSWGDopmeSvMrEYv+DqWoDKhruOlWAHEcPzBkK4S0p WUoQ== 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=JhNdrnjxqmdogotj0CLVU/05kbFEpMpJr7aDsR5i3Lg=; b=l+ynoFXqJ/6SQewNIjbltz2ukUX3RAcx/cEOD+P9cfKNVEAB38roxh0NSu+h5Ae8XI QzDi3stsoCGJe4i+YwRPEtkw7f20MEQDbW9qm6L25vHuoaJQgbcXBdkKusPM7Tohz9fV pmL2SpuKfATBPfuCnvhrDyekWAOkQXC7wLC/onupYUbMnW/k5jjuPyVjsLHV+Ep1PZDi eMaST+vxEyHEWmtlKdqzdmc8ux9g9dZ4qOzIQULR8MSPePiQN1HXulOjc/p9lonxTXwv vtI4C15jQFM7EYY8KZCqbIj63xvvIfk3S00hmiqXT9u1h3WnnaIyZqidcCjWq5FBJB0A 0s2A== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@kernel.org header.s=k20201202 header.b="on/8bBA/"; 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; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org Return-Path: Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id f20-20020a0564021e9400b00435712ee0e5si12905261edf.629.2022.07.02.05.45.31; Sat, 02 Jul 2022 05:46:26 -0700 (PDT) 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=@kernel.org header.s=k20201202 header.b="on/8bBA/"; 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; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S232222AbiGBMSq (ORCPT + 99 others); Sat, 2 Jul 2022 08:18:46 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:52302 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229644AbiGBMSn (ORCPT ); Sat, 2 Jul 2022 08:18:43 -0400 Received: from dfw.source.kernel.org (dfw.source.kernel.org [139.178.84.217]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id CB3B79FC6; Sat, 2 Jul 2022 05:18:42 -0700 (PDT) Received: from smtp.kernel.org (relay.kernel.org [52.25.139.140]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by dfw.source.kernel.org (Postfix) with ESMTPS id 5B09A60B70; Sat, 2 Jul 2022 12:18:42 +0000 (UTC) Received: by smtp.kernel.org (Postfix) with ESMTPSA id 87A95C34114; Sat, 2 Jul 2022 12:18:41 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1656764321; bh=vHkVr3Xnp9/13ksrVIueC09gqM5BYMAMpr8ToNmwTKc=; h=Date:From:To:Cc:Subject:References:In-Reply-To:From; b=on/8bBA/BwTaAjAspsO8q7/J5LprnogcGVcpACo1kv0Y7UZFHD01cJjbpv1YBmiTF u9xiqp5H2TBcRGH8PTdo2QFZ7iO9ENotnp5Dfmj2WARNJF12XrhOllhNcKlXZxFtRf CjA3oTBkfhwXlvJmpyBRdQ+Sb+ksA5mS5Zi+YbpaFWcAcaCjdVgWwUE2WFNtaZDf7p LXkn4WF+HTFItJXJzqQrOPrFtQr4V9fCtWRyb6KsClGaTbMhbkuVbQk6sJzWnIj6Rz UxNGrWDzJxY6QUyXdlOdfO+fpq4elof7l7574PjhmqUgbMHcGa0p++iEwX09h6EErG kykWANvV7KE6g== Received: by quaco.ghostprotocols.net (Postfix, from userid 1000) id 7B3564096F; Sat, 2 Jul 2022 09:18:38 -0300 (-03) Date: Sat, 2 Jul 2022 09:18:38 -0300 From: Arnaldo Carvalho de Melo To: Ivan Babrou Cc: linux-perf-users@vger.kernel.org, linux-kernel@vger.kernel.org, kernel-team@cloudflare.com, Peter Zijlstra , Ingo Molnar , Mark Rutland , Alexander Shishkin , Jiri Olsa , Namhyung Kim , James Clark , Ian Rogers , Fangrui Song Subject: Re: [PATCH] perf unwind: fix unitialized offset on aarch64 Message-ID: References: <20220701182046.12589-1-ivan@cloudflare.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20220701182046.12589-1-ivan@cloudflare.com> X-Url: http://acmel.wordpress.com X-Spam-Status: No, score=-7.5 required=5.0 tests=BAYES_00,DKIMWL_WL_HIGH, DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,RCVD_IN_DNSWL_HI, SPF_HELO_NONE,SPF_PASS,T_SCC_BODY_TEXT_LINE autolearn=ham autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on lindbergh.monkeyblade.net Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Em Fri, Jul 01, 2022 at 11:20:46AM -0700, Ivan Babrou escreveu: > Commit dc2cf4ca866f uncovered the following issue on aarch64: > > util/unwind-libunwind-local.c: In function 'find_proc_info': > util/unwind-libunwind-local.c:386:28: error: 'offset' may be used uninitialized in this function [-Werror=maybe-uninitialized] > 386 | if (ofs > 0) { > | ^ > util/unwind-libunwind-local.c:199:22: note: 'offset' was declared here > 199 | u64 address, offset; > | ^~~~~~ > util/unwind-libunwind-local.c:371:20: error: 'offset' may be used uninitialized in this function [-Werror=maybe-uninitialized] > 371 | if (ofs <= 0) { > | ^ > util/unwind-libunwind-local.c:199:22: note: 'offset' was declared here > 199 | u64 address, offset; > | ^~~~~~ > util/unwind-libunwind-local.c:363:20: error: 'offset' may be used uninitialized in this function [-Werror=maybe-uninitialized] > 363 | if (ofs <= 0) { > | ^ > util/unwind-libunwind-local.c:199:22: note: 'offset' was declared here > 199 | u64 address, offset; > | ^~~~~~ > In file included from util/libunwind/arm64.c:37: Thanks, applied. - Arnaldo > Signed-off-by: Ivan Babrou > Fixes: dc2cf4ca866f > --- > tools/perf/util/unwind-libunwind-local.c | 2 +- > 1 file changed, 1 insertion(+), 1 deletion(-) > > diff --git a/tools/perf/util/unwind-libunwind-local.c b/tools/perf/util/unwind-libunwind-local.c > index 37622699c91a..eaa8fa4b34f3 100644 > --- a/tools/perf/util/unwind-libunwind-local.c > +++ b/tools/perf/util/unwind-libunwind-local.c > @@ -197,7 +197,7 @@ static int elf_section_address_and_offset(int fd, const char *name, u64 *address > #ifndef NO_LIBUNWIND_DEBUG_FRAME > static u64 elf_section_offset(int fd, const char *name) > { > - u64 address, offset; > + u64 address, offset = 0; > > if (elf_section_address_and_offset(fd, name, &address, &offset)) > return 0; > -- > 2.36.1 -- - Arnaldo