Received: by 2002:a05:6a10:f347:0:0:0:0 with SMTP id d7csp10538357pxu; Wed, 30 Dec 2020 05:32:17 -0800 (PST) X-Google-Smtp-Source: ABdhPJw8rX4ALcgUuAGVXt7UFyhaxbfDf6r7eu0ejhMY0oNXXCmMTNzLxiRzeIQFDwam0SN4oAkS X-Received: by 2002:a50:d50a:: with SMTP id u10mr49867369edi.58.1609335136565; Wed, 30 Dec 2020 05:32:16 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1609335136; cv=none; d=google.com; s=arc-20160816; b=wAP4AhE8Rtw90t9VeDxR2Za+kIPhXbIR/Fua7aXRwot2X0PrXBeobjzjVQA27U7/5M 4ZAos01qQknShhS4PLD2NwJZ9cP+P8+iweYEYIUk540HnL44Rd4RQFlnVggPjrzS0oht rhE6Jxn6He+1tEJ0lOiI++FCS/GkoxznwRuCY+PaMqUSWfYc32AQMtLALWAhtBY9429U IWD8nRbTdXDkrWFNh2npHUXDEm2H2gxbZkP1AKSamAJ0nFkaY7vbycLiGTckWBQNIMjU AzdZaof2GdxmonKfwhbNeSbEnPtP5OMFqw3XXCJPYuVEHSfjAggNqQdEfaa4Npv3wRux 1mfw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:in-reply-to:content-disposition:mime-version :references:message-id:subject:cc:to:from:date:dkim-signature; bh=tRSc7sq5Dg0Q3HCfyMcMQGHnajfmpPOySohf9FwY6XM=; b=gwpWnY98pRMXBFK0sQQQbr6+KxKlXjmdQ8H3sHne+NQA3c1PyRuSwelHQecOVCGt0/ bE9AiNSWRyYub6zMc2FaI1q8niK7L0qGBDFp09pW2v1YmaOFCnX0mhi2gwWDvhv5mm7h LOOzYZxkIDOGWcjG5WGWd7rJotcrmL9g010ZvLt8OP/Bvs+ETLA6Suph4QsssCQ2sXGD iZq9pQRBPMpsAC/L46Tfh4pyt/BoaJPEjmu3MctwAVgU9UoB7bV8vcL3z8E0Sz3zA69l /s+zWXqhta17fgbAKLvZlFL21GPmAhpFAVBXHTCMBW4zGkxeQIVDVUy/ASAZnoSGj2tU H6dQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@redhat.com header.s=mimecast20190719 header.b=Mg4C4Nun; 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; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=redhat.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id gb36si21635618ejc.696.2020.12.30.05.31.54; Wed, 30 Dec 2020 05:32:16 -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; dkim=pass header.i=@redhat.com header.s=mimecast20190719 header.b=Mg4C4Nun; 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; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=redhat.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1726731AbgL3Na0 (ORCPT + 99 others); Wed, 30 Dec 2020 08:30:26 -0500 Received: from us-smtp-delivery-124.mimecast.com ([216.205.24.124]:24534 "EHLO us-smtp-delivery-124.mimecast.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726230AbgL3Na0 (ORCPT ); Wed, 30 Dec 2020 08:30:26 -0500 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1609334939; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version:content-type:content-type: in-reply-to:in-reply-to:references:references; bh=tRSc7sq5Dg0Q3HCfyMcMQGHnajfmpPOySohf9FwY6XM=; b=Mg4C4NunqcE+jEmHqMmRf+/77YnB9QNsOS9rhosLTZGMdEdDdj0TJ+gKc0h56pvRHNABZg 4BgIxVr6To2nqAPFuSW6U8ueRmnV7AY8jyt4luayDj40ysN6RLXYtcbE76SGyGtN7tEuDp G3kWizEXIXDsq0MT19G3HsnTPdfWwEc= Received: from mimecast-mx01.redhat.com (mimecast-mx01.redhat.com [209.132.183.4]) (Using TLS) by relay.mimecast.com with ESMTP id us-mta-433-8lLkK23FMAiWkvqeQIIBOA-1; Wed, 30 Dec 2020 08:28:57 -0500 X-MC-Unique: 8lLkK23FMAiWkvqeQIIBOA-1 Received: from smtp.corp.redhat.com (int-mx01.intmail.prod.int.phx2.redhat.com [10.5.11.11]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mimecast-mx01.redhat.com (Postfix) with ESMTPS id 2A3CA879500; Wed, 30 Dec 2020 13:28:55 +0000 (UTC) Received: from krava (unknown [10.40.192.129]) by smtp.corp.redhat.com (Postfix) with SMTP id 4602317C5F; Wed, 30 Dec 2020 13:28:53 +0000 (UTC) Date: Wed, 30 Dec 2020 14:28:52 +0100 From: Jiri Olsa To: Qais Yousef Cc: Alexei Starovoitov , Daniel Borkmann , Andrii Nakryiko , Jiri Olsa , netdev@vger.kernel.org, bpf@vger.kernel.org, linux-kernel@vger.kernel.org, Arnaldo Carvalho de Melo Subject: Re: BTFIDS: FAILED unresolved symbol udp6_sock Message-ID: <20201230132852.GC577428@krava> References: <20201229151352.6hzmjvu3qh6p2qgg@e107158-lin> <20201229173401.GH450923@krava> <20201229232835.cbyfmja3bu3lx7we@e107158-lin> <20201230090333.GA577428@krava> <20201230132759.GB577428@krava> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20201230132759.GB577428@krava> X-Scanned-By: MIMEDefang 2.79 on 10.5.11.11 Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Wed, Dec 30, 2020 at 02:28:02PM +0100, Jiri Olsa wrote: > On Wed, Dec 30, 2020 at 10:03:37AM +0100, Jiri Olsa wrote: > > On Tue, Dec 29, 2020 at 11:28:35PM +0000, Qais Yousef wrote: > > > Hi Jiri > > > > > > On 12/29/20 18:34, Jiri Olsa wrote: > > > > On Tue, Dec 29, 2020 at 03:13:52PM +0000, Qais Yousef wrote: > > > > > Hi > > > > > > > > > > When I enable CONFIG_DEBUG_INFO_BTF I get the following error in the BTFIDS > > > > > stage > > > > > > > > > > FAILED unresolved symbol udp6_sock > > > > > > > > > > I cross compile for arm64. My .config is attached. > > > > > > > > > > I managed to reproduce the problem on v5.9 and v5.10. Plus 5.11-rc1. > > > > > > > > > > Have you seen this before? I couldn't find a specific report about this > > > > > problem. > > > > > > > > > > Let me know if you need more info. > > > > > > > > hi, > > > > this looks like symptom of the gcc DWARF bug we were > > > > dealing with recently: > > > > > > > > https://gcc.gnu.org/bugzilla/show_bug.cgi?id=97060 > > > > https://lore.kernel.org/lkml/CAE1WUT75gu9G62Q9uAALGN6vLX=o7vZ9uhqtVWnbUV81DgmFPw@mail.gmail.com/#r > > > > > > > > what pahole/gcc version are you using? > > > > > > I'm on gcc 9.3.0 > > > > > > aarch64-linux-gnu-gcc (Ubuntu 9.3.0-17ubuntu1~20.04) 9.3.0 > > > > > > I was on pahole v1.17. I moved to v1.19 but I still see the same problem. > > > > I can reproduce with your .config, but make 'defconfig' works, > > so I guess it's some config option issue, I'll check later today > > so your .config has > CONFIG_CRYPTO_DEV_BCM_SPU=y > > and that defines 'struct device_private' which > clashes with the same struct defined in drivers/base/base.h > > so several networking structs will be doubled, like net_device: > > $ bpftool btf dump file ../vmlinux.config | grep net_device\' | grep STRUCT > [2731] STRUCT 'net_device' size=2240 vlen=133 > [113981] STRUCT 'net_device' size=2240 vlen=133 > > each is using different 'struct device_private' when it's unwinded > > and that will confuse BTFIDS logic, becase we have multiple structs > with the same name, and we can't be sure which one to pick > > perhaps we should check on this in pahole and warn earlier with > better error message.. I'll check, but I'm not sure if pahole can > survive another hastab ;-) > > Andrii, any ideas on this? ;-) > > easy fix is the patch below that renames the bcm's structs, > it makes the kernel to compile.. but of course the new name > is probably wrong and we should push this through that code > authors also another quick fix is to switch it to module jirka