From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by smtp.lore.kernel.org (Postfix) with ESMTP id 45594C61DA4 for ; Thu, 9 Feb 2023 12:08:34 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S230317AbjBIMIc (ORCPT ); Thu, 9 Feb 2023 07:08:32 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:49564 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S230007AbjBIMIU (ORCPT ); Thu, 9 Feb 2023 07:08:20 -0500 Received: from ams.source.kernel.org (ams.source.kernel.org [IPv6:2604:1380:4601:e00::1]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 84B5F6F22F for ; Thu, 9 Feb 2023 04:00:22 -0800 (PST) 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 ams.source.kernel.org (Postfix) with ESMTPS id 657B3B82108 for ; Thu, 9 Feb 2023 11:59:50 +0000 (UTC) Received: by smtp.kernel.org (Postfix) with ESMTPSA id CE855C433D2; Thu, 9 Feb 2023 11:59:48 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1675943989; bh=oXWvt9ikQIdybvm5fghQw40e9FhoWGUho7ULGneVAbo=; h=Date:From:To:Cc:Subject:References:In-Reply-To:From; b=T+GGFWFn5EvAH1tb/mI/mA5LZZpsN254Mx/QSMgDuo6wtd136+hyoQXtFBpU1ti08 /9XwjvmwLBzfv6rP+uF29AGrm3n/qmbYuUxaFT+guHHIEbkSJKoxuuhwlBXwPCqt7s ZiH1hXnh+ORpTcFK81JpE3wpVbvmrRpOMiDpIf+sZbsKiACqb4Dx1aXrQXxFMKTQlE s+ls9oCNDN3ntWKVK7lxd9nNLT9AmkI4OHcXCRFxbb0ebYCaQClPAGD8lVqgaBy5CP 6RZIlwkCp+tQi6YLqvCH4z0/+suuHXjSxJKIZi1Byb2gI45fS6BUUzJ1OF8dQJ9oNT Z5yjY6wetnDfg== Received: by quaco.ghostprotocols.net (Postfix, from userid 1000) id 7E105405BE; Thu, 9 Feb 2023 08:59:45 -0300 (-03) Date: Thu, 9 Feb 2023 08:59:45 -0300 From: Arnaldo Carvalho de Melo To: Jiri Olsa Cc: Alan Maguire , ast@kernel.org, andrii@kernel.org, daniel@iogearbox.net, eddyz87@gmail.com, haoluo@google.com, john.fastabend@gmail.com, kpsingh@chromium.org, sinquersw@gmail.com, martin.lau@kernel.org, songliubraving@fb.com, sdf@google.com, timo@incline.eu, yhs@fb.com, bpf@vger.kernel.org Subject: Re: [PATCH dwarves] btf_encoder: ensure elf function representation is fully initialized Message-ID: References: <1675896868-26339-1-git-send-email-alan.maguire@oracle.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: X-Url: http://acmel.wordpress.com Precedence: bulk List-ID: X-Mailing-List: bpf@vger.kernel.org Em Thu, Feb 09, 2023 at 10:36:39AM +0100, Jiri Olsa escreveu: > On Wed, Feb 08, 2023 at 10:54:28PM +0000, Alan Maguire wrote: > > new fields in BTF encoder state (used to support save and later > > addition of function) of ELF function representation need to > > be initialized. No need to set parameter names to NULL as > > got_parameter_names guards their use. > > > > A follow-on patch intended to be applied after the series [1]. > > > > [1] https://lore.kernel.org/bpf/1675790102-23037-1-git-send-email-alan.maguire@oracle.com/ > > > > Suggested-by: Jiri Olsa > > Signed-off-by: Alan Maguire > > Acked-by: Jiri Olsa Thanks, applied. - Arnaldo > thanks, > jirka > > > --- > > btf_encoder.c | 2 ++ > > 1 file changed, 2 insertions(+) > > > > diff --git a/btf_encoder.c b/btf_encoder.c > > index 35fb60a..ea5b47b 100644 > > --- a/btf_encoder.c > > +++ b/btf_encoder.c > > @@ -1020,6 +1020,8 @@ static int btf_encoder__collect_function(struct btf_encoder *encoder, GElf_Sym * > > } > > encoder->functions.entries[encoder->functions.cnt].generated = false; > > encoder->functions.entries[encoder->functions.cnt].function = NULL; > > + encoder->functions.entries[encoder->functions.cnt].state.got_parameter_names = false; > > + encoder->functions.entries[encoder->functions.cnt].state.type_id_off = 0; > > encoder->functions.cnt++; > > return 0; > > } > > -- > > 1.8.3.1 > > -- - Arnaldo