lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Date:   Sat, 6 Feb 2021 17:24:19 +0100
From:   Mark Wieelard <mark@...mp.org>
To:     Yonghong Song <yhs@...com>
Cc:     sedat.dilek@...il.com, Masahiro Yamada <masahiroy@...nel.org>,
        Arnaldo Carvalho de Melo <acme@...nel.org>,
        Arnaldo Carvalho de Melo <arnaldo.melo@...il.com>,
        dwarves@...r.kernel.org,
        Linux Kernel Mailing List <linux-kernel@...r.kernel.org>,
        bpf@...r.kernel.org, Jiri Olsa <jolsa@...nel.org>,
        Jan Engelhardt <jengelh@...i.de>,
        Domenico Andreoli <cavok@...ian.org>,
        Matthias Schwarzott <zzam@...too.org>,
        Andrii Nakryiko <andriin@...com>,
        Paul Moore <paul@...l-moore.com>,
        Ondrej Mosnacek <omosnace@...hat.com>,
        Daniel P. Berrangé <berrange@...hat.com>,
        Tom Stellard <tstellar@...hat.com>
Subject: Re: ERROR: INT DW_ATE_unsigned_1 Error emitting BTF type

Hi,

On Sat, Feb 06, 2021 at 12:26:44AM -0800, Yonghong Song wrote:
> With the above vmlinux, the issue appears to be handling
> DW_ATE_signed_1, DW_ATE_unsigned_{1,24,40}.
> 
> The following patch should fix the issue:

That doesn't really make sense to me. Why is the compiler emitting a
DW_TAG_base_type that needs to be interpreted according to the
DW_AT_name attribute?

If the issue is that the size of the base type cannot be expressed in
bytes then the DWARF spec provides the following option:

    If the value of an object of the given type does not fully occupy
    the storage described by a byte size attribute, the base type
    entry may also have a DW_AT_bit_size and a DW_AT_data_bit_offset
    attribute, both of whose values are integer constant values (see
    Section 2.19 on page 55). The bit size attribute describes the
    actual size in bits used to represent values of the given
    type. The data bit offset attribute is the offset in bits from the
    beginning of the containing storage to the beginning of the
    value. Bits that are part of the offset are padding.  If this
    attribute is omitted a default data bit offset of zero is assumed.

Would it be possible to use that encoding of those special types?  If
not, can we try to come up with some extension that doesn't require
consumers to match magic names?

Thanks,

Mark

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ