Received: by 2002:a05:6a10:8c0a:0:0:0:0 with SMTP id go10csp2821569pxb; Sat, 6 Feb 2021 08:49:34 -0800 (PST) X-Google-Smtp-Source: ABdhPJxRZsPn2Z3PZY4L3JvRCq07A3tNEwIItSc3VZ93PuMYtrIxyVM6zcqY00bbIIVQHxHAXUoD X-Received: by 2002:aa7:dcc6:: with SMTP id w6mr1363175edu.19.1612630174617; Sat, 06 Feb 2021 08:49:34 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1612630174; cv=none; d=google.com; s=arc-20160816; b=edJzhvEr9jDW0CgC1qOE8V/WhRqmkRO7M7w0VoxVXkAd3hH6kbhrKx5N2rDpx+R5aW DmiuYfteVBceU4uSWT4mcThjXqrfhIge586jhkW2fEOU7I7QXgasUdiSIux3gZrguOZr agzVmFpLSOasN68I9NBkQdXFgSEZHYtub9mVqEMb04hFRrLaUNLYiT0lV0ydrk94Bs0p PY6nECFTTZlrCwGjdb12Z7/X7kGm8FneUGVggORBTPkWVe7Th8iByItauAIac8mrdyt4 iuLzmRAaDwBNUeEj2hcuaoELd56AwODlCapOS7yvNT/l/N0CyGH+3wLhO4KHvJgl3tWg htvQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:user-agent:in-reply-to:content-disposition :mime-version:references:message-id:subject:cc:to:from:date; bh=yCObhEBQ/DF4jnv7X556Wf2NswvH8a+5yKCP5PSkaiU=; b=JqUrpvs5gz8BSDye/DKTg2qkqa63qlxOxLCijVEIsNOv2vGdvlbjJAp9RuhA/xZSXl Rh5Iv/NGJ4KFUM8CH3zXL+NnlQa2f90ERhNzSIm7IqDJ7xiEwMZxYZx+F4/Cw8mXkj5J qBWdeEwhYcoi6J0PsdPpjp0sv4jeNvaRjjnN33jpg+FuavkvXayby90Dt8P80yvAIKSz wqJ72J5VCcYd9WDWKdTPz29Xhh5/u0HdM/s6en4cVA/zDvoGcB20uJ0xX0BunVP86GXi 5+DGgBD7qy6/GKA2kLQ1adKFAp5g8FFoaiEY+8v5/nOnqxOlUDjVLTE4Tv4IDgE1z1ug k2ZA== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id hp19si7477048ejc.733.2021.02.06.08.49.08; Sat, 06 Feb 2021 08:49:34 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) client-ip=23.128.96.18; Authentication-Results: mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S230027AbhBFQ0L (ORCPT + 99 others); Sat, 6 Feb 2021 11:26:11 -0500 Received: from wildebeest.demon.nl ([212.238.236.112]:47000 "EHLO gnu.wildebeest.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229522AbhBFQ0K (ORCPT ); Sat, 6 Feb 2021 11:26:10 -0500 Received: from librem (deer0x15.wildebeest.org [172.31.17.151]) (using TLSv1.2 with cipher ADH-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by gnu.wildebeest.org (Postfix) with ESMTPSA id 4216A30278CD; Sat, 6 Feb 2021 17:25:28 +0100 (CET) Received: by librem (Postfix, from userid 1000) id BD303C100B; Sat, 6 Feb 2021 17:24:19 +0100 (CET) Date: Sat, 6 Feb 2021 17:24:19 +0100 From: Mark Wieelard To: Yonghong Song Cc: sedat.dilek@gmail.com, Masahiro Yamada , Arnaldo Carvalho de Melo , Arnaldo Carvalho de Melo , dwarves@vger.kernel.org, Linux Kernel Mailing List , bpf@vger.kernel.org, Jiri Olsa , Jan Engelhardt , Domenico Andreoli , Matthias Schwarzott , Andrii Nakryiko , Paul Moore , Ondrej Mosnacek , Daniel =?iso-8859-1?Q?P=2E_Berrang=E9?= , Tom Stellard Subject: Re: ERROR: INT DW_ATE_unsigned_1 Error emitting BTF type Message-ID: <20210206162419.GC2851@wildebeest.org> References: <20210205192446.GH920417@kernel.org> <8ff11fa8-46cd-5f20-b988-20e65e122507@fb.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <8ff11fa8-46cd-5f20-b988-20e65e122507@fb.com> User-Agent: Mutt/1.10.1 (2018-07-13) X-Spam-Flag: NO X-Spam-Status: No, score=-2.9 required=5.0 tests=ALL_TRUSTED,BAYES_00 autolearn=ham autolearn_force=no version=3.4.0 X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on gnu.wildebeest.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org 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