Re: pahole and gcc-14 issues

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

 



Alexei Starovoitov <alexei.starovoitov@xxxxxxxxx> writes:

[...]

>> $ diff -pruN ~/tmp/task_struct.ko.c ~/tmp/task_struct.vmlinux.c
>> --- /home/ezingerman/tmp/task_struct.ko.c       2025-04-25 12:37:48.312480603 -0700
>> +++ /home/ezingerman/tmp/task_struct.vmlinux.c  2025-04-25 12:38:03.096644654 -0700
>> @@ -18,7 +18,6 @@ struct task_struct {
>>         int static_prio;
>>         int normal_prio;
>>         unsigned int rt_priority;
>> -       long: 0;
>>         struct sched_entity se;
>
> I reproed this issue with default .ko build that includes:
> --btf_features=distilled_base
>
> Once I disabled it and did
> bpftool btf dump file ./bpf_testmod.ko --base-btf .../vmlinux format c
> the task_struct from vmlinux.h and from testmod.h became exactly the same.
> So it sounds like the 3rd issue :)
> bpftool dump of distilled btf needs work.

Mystery upon mystery.
Here is a continuation of the last one.
This is raw BTF for .ko:

  [509] STRUCT 'task_struct' size=10496 vlen=268
          ...
          'rt_priority' type_id=3 bits_offset=960
          ...

And this is raw BTF for vmlinux:

  [1] INT 'long unsigned int' size=8 bits_offset=0 nr_bits=64 encoding=(none)
  [2] CONST '(anon)' type_id=1
  [3] VOLATILE '(anon)' type_id=2
  ...
  [9] INT 'unsigned int' size=4 bits_offset=0 nr_bits=32 encoding=(none)
  ...
  [111] STRUCT 'task_struct' size=10496 vlen=268
          ...
          'rt_priority' type_id=9 bits_offset=960
          ...

Note type conflict 'volatile const long' vs 'unsigned int'.
Either something is very broken or I completely messed up the build.




[Index of Archives]     [Linux USB Devel]     [Linux Audio Users]     [Yosemite News]     [Linux Kernel]     [Linux SCSI]

  Powered by Linux