Re: [PATCH RFC] btf_encoder: skip functions consuming structs passed by value on stack

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

 



On Wed, Jun 18, 2025 at 8:02 AM Alexis Lothoré
<alexis.lothore@xxxxxxxxxxx> wrote:
>
> - those attributes are not reliably encoded by compilers in DWARF info

What would be an example of unreliability?
Maybe they're reliable enough for cases we're concerned about ?

> +
> +               if (param_idx >= cu->nr_register_params) {
> +                       if(dwarf_attr(die, DW_AT_type, &attr)){
> +                               Dwarf_Die type_die;
> +                               if (dwarf_formref_die(&attr, &type_die) &&
> +                                               dwarf_tag(&type_die) == DW_TAG_structure_type) {
> +                                       parm->uncertain_loc = 1;
> +                               }
> +                       }
> +                       return parm;

This is too pessimistic.
In
bpf_testmod_test_struct_arg_9(u64 a, void *b, short c, int d, void *e, char f,
                              short g, struct bpf_testmod_struct_arg_5
h, long i)

struct bpf_testmod_struct_arg_5 {
        char a;
        short b;
        int c;
        long d;
};

though it's passed on the stack it fits into normal calling convention.
It doesn't have align or packed attributes, so no need to exclude it ?





[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