Re: [PATCH/RFT] Re: ANNOUNCE: pahole v1.27 (reproducible builds, BTF kfuncs)
From: Nathan Chancellor
Date: Mon Jun 17 2024 - 17:09:02 EST
On Mon, Jun 17, 2024 at 05:02:12PM -0300, Arnaldo Carvalho de Melo wrote:
> Can you try with the one liner below? We remove it from the cus list
> unconditionally, and since we alloc space with zalloc/calloc in
> cu__new() and missed initializing that list_head (cu->node) we ended up
> hitting list_del with a zeroed 'struct list_head' :-\
>
> I'll try and get this cast_common.ko checked into a test repo for pahole
> so that this gets regression tested.
>
> Please test this patch so that we see if this is the only problem and
> your kernel build with clang completes successfully.
Thanks, I rebuilt pahole with the following diff and both my build and
the other configuration I tested for this regression successfully
complete.
Tested-by: Nathan Chancellor <nathan@xxxxxxxxxx>
> diff --git a/dwarves.c b/dwarves.c
> index 1ec259f50dbd3778..823a01524a12bb37 100644
> --- a/dwarves.c
> +++ b/dwarves.c
> @@ -739,6 +739,7 @@ struct cu *cu__new(const char *name, uint8_t addr_size,
> cu->dfops = NULL;
> INIT_LIST_HEAD(&cu->tags);
> INIT_LIST_HEAD(&cu->tool_list);
> + INIT_LIST_HEAD(&cu->node);
>
> cu->addr_size = addr_size;
> cu->extra_dbg_info = 0;