Re: [PATCH dwarves] btf_encoder: ensure elf function representation is fully initialized

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



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@xxxxxxxxxx/
> > 
> > Suggested-by: Jiri Olsa <jolsa@xxxxxxxxxx>
> > Signed-off-by: Alan Maguire <alan.maguire@xxxxxxxxxx>
> 
> Acked-by: Jiri Olsa <jolsa@xxxxxxxxxx>

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



[Index of Archives]     [Linux Samsung SoC]     [Linux Rockchip SoC]     [Linux Actions SoC]     [Linux for Synopsys ARC Processors]     [Linux NFS]     [Linux NILFS]     [Linux USB Devel]     [Video for Linux]     [Linux Audio Users]     [Yosemite News]     [Linux Kernel]     [Linux SCSI]


  Powered by Linux