Received: by 2002:a05:6a10:f347:0:0:0:0 with SMTP id d7csp10582264pxu; Wed, 30 Dec 2020 06:21:58 -0800 (PST) X-Google-Smtp-Source: ABdhPJwTxIKmAOIL7511Y9Bzkd1/8+OHvsEaUFz045hIp2aE4MILB7qTJuBJv1IuR7i4eMF4Ze9h X-Received: by 2002:a17:906:74d9:: with SMTP id z25mr49308531ejl.217.1609338118778; Wed, 30 Dec 2020 06:21:58 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1609338118; cv=none; d=google.com; s=arc-20160816; b=0XsFdvoZABBq1A5csiX1vIucYY1l/Trt3PMPm0pH3J3L2JQ4ltJ1OKlT48MgtCaIOg 3IodkZN+NkG5X1/m58c3GzMZWA8VnvmnKFuanFbl9d+DmuUmmi+PpRljriixKik1EDQm CsE629bKpQiOYOVAUcNspxHfiGQQEsE7ysEILC8y0eIhZLwPOUdvqiIR1+WgqK26mB6k jaIGDeozv5i2twVPKIyMvKi25Lzz7scUdzXCcBZ6w6q1ISMkAz4NvlepCT3a3V4VzJy4 XlRQsyKShFT8J5n+Xr+IPqulzdCshTuS4xJJRR2pjQlskZbiki6zIoEe9rBfxGm2GT4o Kkbg== 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=75OqznKQoLz7kTSu89W3w4bq1t3qA+34iYCPp5u9oXo=; b=Pvey3qrxoNshuoHar3JwUfNwXJFe5eTVUHCzZvwNEY2W4UR146i9ZZ0c28VipLfMm2 BTw5YV8SoxO53VgTouhHdBOiN+a6LHIcjeoNI2+yQgt0qdTPfLmuf+eF+lj6olC7w36o RSwJmkFiKf9FFEB3UTSmGUffJbm4XskAQg7JF0SDvU23gInAGGhSYSZYJKC2TxA5lMOM 84dXjzKJ3K+n4UCVC0bOrEmDERkkNG7R3d3ULSm4XB3Aim1u0o6o+0Qdj/Y5lrplODiJ /OnSzVO76NNRfZpkHkU73MLD5cQubEFkV/+a0C6xBuF3+Z9XaTEXA1RbBkBsJ9UimpmF OVYA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@kernel.org header.s=k20201202 header.b=XI3Jmhfx; 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=kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id t6si24668645edt.513.2020.12.30.06.21.36; Wed, 30 Dec 2020 06:21:58 -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=@kernel.org header.s=k20201202 header.b=XI3Jmhfx; 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=kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1726486AbgL3OUA (ORCPT + 99 others); Wed, 30 Dec 2020 09:20:00 -0500 Received: from mail.kernel.org ([198.145.29.99]:36888 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1725814AbgL3OT7 (ORCPT ); Wed, 30 Dec 2020 09:19:59 -0500 Received: by mail.kernel.org (Postfix) with ESMTPSA id 53330221F8; Wed, 30 Dec 2020 14:19:18 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1609337958; bh=KBi2W58R6qvqkkg5K1iO6NP9wQHrKZv2rkO1csO1FZg=; h=Date:From:To:Cc:Subject:References:In-Reply-To:From; b=XI3JmhfxexRfEQJbHLRTB4nAgkncyR1nFnE3HTSUPRxh3C3JhOXq4Bh94d3zQHj3I EvYH5I0U2+0GHznCMrhSPG/ANXbjAVG5Kc1BIikj+O6G46fVT7OZVYbwHtx6/uh8xV 2oLU0/TJGzLxQF/qijSCAVzXi9Cmieb42d3h6tAP87pWfMLtmQDU8/Jad7qMzxaIEP Fe5NvEfd2cHdvobgIl2XxViIeQeE0pmAX8/5XtZFCCGzbekwlxwIz4IM+cEweddapl dOKeRzqE3WE1Sem6BcY8Pizplrq9Kep2vfhJMPW73q/SBDb7LqNkG0qcodsBEfknqi t0qnBUyw3pZzQ== Received: by quaco.ghostprotocols.net (Postfix, from userid 1000) id D2BB0411E9; Wed, 30 Dec 2020 11:19:36 -0300 (-03) Date: Wed, 30 Dec 2020 11:19:36 -0300 From: Arnaldo Carvalho de Melo To: Jiri Olsa Cc: Qais Yousef , Alexei Starovoitov , Daniel Borkmann , Andrii Nakryiko , Jiri Olsa , netdev@vger.kernel.org, bpf@vger.kernel.org, linux-kernel@vger.kernel.org Subject: Re: BTFIDS: FAILED unresolved symbol udp6_sock Message-ID: <20201230141936.GA3922432@kernel.org> References: <20201229151352.6hzmjvu3qh6p2qgg@e107158-lin> <20201229173401.GH450923@krava> <20201229232835.cbyfmja3bu3lx7we@e107158-lin> <20201230090333.GA577428@krava> <20201230132759.GB577428@krava> <20201230132852.GC577428@krava> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20201230132852.GC577428@krava> X-Url: http://acmel.wordpress.com Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Em Wed, Dec 30, 2020 at 02:28:52PM +0100, Jiri Olsa escreveu: > 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. There are some changes post v1.19 in the git repo: [acme@five pahole]$ git log --oneline v1.19.. b688e35970600c15 (HEAD -> master) btf_encoder: fix skipping per-CPU variables at offset 0 8c009d6ce762dfc9 btf_encoder: fix BTF variable generation for kernel modules b94e97e015a94e6b dwarves: Fix compilation on 32-bit architectures 17df51c700248f02 btf_encoder: Detect kernel module ftrace addresses 06ca639505fc56c6 btf_encoder: Use address size based on ELF's class aff60970d16b909e btf_encoder: Factor filter_functions function 1e6a3fed6e52d365 (quaco/master) rpm: Fix changelog date [acme@five pahole]$ But I think these won't matter in this case :-\ - Arnaldo > > > 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 > -- - Arnaldo