Received: by 2002:a89:413:0:b0:1fd:dba5:e537 with SMTP id m19csp434541lqs; Thu, 13 Jun 2024 14:45:48 -0700 (PDT) X-Forwarded-Encrypted: i=3; AJvYcCX9bcW8dbIoleHoynvYOEvN/jfi4WT0ziogGoruBnf5O4vUJ/N4SecTptP4RmPzZXMbUAVUNI2rrnR6GEQRJl39kJX91Lg4l2fHK0ziGg== X-Google-Smtp-Source: AGHT+IEWcfjLwixLXLtuR9cJzMgoK2oA5XGyRrI5pJkdSEcbAIN1Wj3qyRHAV6U8SSGU9gTUN9Vq X-Received: by 2002:a17:903:2308:b0:1f4:8b81:9889 with SMTP id d9443c01a7336-1f8625d50d2mr11382515ad.7.1718315148370; Thu, 13 Jun 2024 14:45:48 -0700 (PDT) ARC-Seal: i=2; a=rsa-sha256; t=1718315148; cv=pass; d=google.com; s=arc-20160816; b=QnzkOIfkKiUuNiZSqew/JIbNwb538s+dPAO3wRltEGSvsvXqmFmKdE77wKRTS06gNm VOHMqgvjDZF8dP11MkamQYpL/omNinBP/cnJxp2vJ8Xarg30q4ICZZtr6hzr0/mht0vG dZZZN/g5dLw4pifq92AIgN+8qCURUj9D2oKUHEYK76GwH9PaNc+l5tZaIxJxyBz7Tdn7 G9G5CqjZQ52T6251WcMMOIqclz/TYgSK78xAezHaMsvf2WR76UwheXvRCDMW6Bgg3qtR VC4AEVYOY6t2pS0uYUFGFneUU94L+FNYDY+YZYx3ghXijZH0u2JpawrpO7M8xXg5RuyE SREw== ARC-Message-Signature: i=2; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=in-reply-to:content-disposition:mime-version:list-unsubscribe :list-subscribe:list-id:precedence:references:message-id:subject:cc :to:from:date:dkim-signature; bh=BTGQp6fYyqUHgya81g5Rb1btygUPn+yXK70rT0h9/Pc=; fh=Dm7VtKoaTiBIU+NXWXe03P2PJrNTtGzmLo7x4mK7oqM=; b=pUaylXRMRDwoz4zPhEq3dCFy49M+ZpQ/w1UlHV4EbCV2nRxhGU9N8Vqb2kD5zjRFBn QDjutZbOXAdM9W8Z5ijGOo49H3YeMjoCwHULhiGn5gvP4Hnqm1FAMxDD3kawqze3TSj7 dFsu5D4L47d/t+qDVMEKGLdV/4m85zNUSHZyfPiUY7WIHT2RCi1IWBkzlfP79tTuQJoF /TLjLgZvgqqHFg4mwxfxFZNd3yT/8tSYsrIjTvvxlOWm06LoN1R6Rs+QrJdQ1a7C3Kcl MAOSkQOFSef8ma9YxpyIPDDHZV0b7OE96JC9qdXidEQKAf4nv4GsL1nDMaM91OuZmXHU LKMw==; dara=google.com ARC-Authentication-Results: i=2; mx.google.com; dkim=pass header.i=@kernel.org header.s=k20201202 header.b=msosOGth; arc=pass (i=1 dkim=pass dkdomain=kernel.org); spf=pass (google.com: domain of linux-kernel+bounces-214036-linux.lists.archive=gmail.com@vger.kernel.org designates 147.75.48.161 as permitted sender) smtp.mailfrom="linux-kernel+bounces-214036-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org Return-Path: Received: from sy.mirrors.kernel.org (sy.mirrors.kernel.org. [147.75.48.161]) by mx.google.com with ESMTPS id d9443c01a7336-1f855e3ac28si21055855ad.75.2024.06.13.14.45.47 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 13 Jun 2024 14:45:48 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel+bounces-214036-linux.lists.archive=gmail.com@vger.kernel.org designates 147.75.48.161 as permitted sender) client-ip=147.75.48.161; Authentication-Results: mx.google.com; dkim=pass header.i=@kernel.org header.s=k20201202 header.b=msosOGth; arc=pass (i=1 dkim=pass dkdomain=kernel.org); spf=pass (google.com: domain of linux-kernel+bounces-214036-linux.lists.archive=gmail.com@vger.kernel.org designates 147.75.48.161 as permitted sender) smtp.mailfrom="linux-kernel+bounces-214036-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org Received: from smtp.subspace.kernel.org (wormhole.subspace.kernel.org [52.25.139.140]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by sy.mirrors.kernel.org (Postfix) with ESMTPS id DECA3B26C5C for ; Thu, 13 Jun 2024 21:40:32 +0000 (UTC) Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id 41CB214830F; Thu, 13 Jun 2024 21:40:23 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=kernel.org header.i=@kernel.org header.b="msosOGth" Received: from smtp.kernel.org (aws-us-west-2-korg-mail-1.web.codeaurora.org [10.30.226.201]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id 56FC671747; Thu, 13 Jun 2024 21:40:21 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=10.30.226.201 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1718314822; cv=none; b=PRhp1bElNsqkVcP/LY/BqOgnV5zu+JndiuWTVZyK4LyfbtKZnYUjPgTPmyb9Np90CsoN0E3QpvSop3vgCHrY5zFIB8W3T/jGeWkTvjhvXHpOUOtcO3AHXf84oijfxMQ5QoDum0ZK1yGSwJ2nyh4lKadhY4R/u62hCPQ4gNoWIqI= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1718314822; c=relaxed/simple; bh=q+yRfUm4ZJKgJ+oDFldXAPnhT6dMYw/cyPge3ciy1sA=; h=Date:From:To:Cc:Subject:Message-ID:References:MIME-Version: Content-Type:Content-Disposition:In-Reply-To; b=X4d0/ZD9w5W3tgN77WdZvEPpQXRSu1T0XjAFe2eQMgG7EY/AF/Tj/pfysC8MvSRhhLJoT185xihIfeEsXD8Zd1cmCaqMJ0+BSAbawwLW0mIlf2ldAGeJKTR0FDDR0bEpOffQ1CPnJyuh9kdcgEvmhbMowsVVzmMIT6gcWk9ek+g= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=kernel.org header.i=@kernel.org header.b=msosOGth; arc=none smtp.client-ip=10.30.226.201 Received: by smtp.kernel.org (Postfix) with ESMTPSA id DF892C2BBFC; Thu, 13 Jun 2024 21:40:20 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1718314821; bh=q+yRfUm4ZJKgJ+oDFldXAPnhT6dMYw/cyPge3ciy1sA=; h=Date:From:To:Cc:Subject:References:In-Reply-To:From; b=msosOGthX/ZaxkCU22Nz753vSrVuiW7w78ubG6pAKgYeXt1kVsu1JffstQexv9gNq 5Qs3VMb7mn6OKy7u8RabikVuxcGm1dpon7/GBLOtpmxkjZubbqFbTovl0wkoZRCIJD +MadUFrtUqqzYhUm+g2ayXeNu1G74rlYmBGJbL9ICE3zk3huB1n8PxrjdiPhpHwVe7 FEC1SmB0awSdGPUkOk8+zIyhSYzeq+hRDrCLN3YgMItDDz4y2Xv6pB6k0T6HVlXYB1 R8P7syBsUuVfl+qfZuGQ0uNcUPj2MbTxDaxAZ6XuvHj2FsvfnKRzF0XrlYYobW5P7F s7kNUQIabsOeg== Date: Thu, 13 Jun 2024 14:40:19 -0700 From: Nathan Chancellor To: Arnaldo Carvalho de Melo Cc: dwarves@vger.kernel.org, Linux Kernel Mailing List , bpf@vger.kernel.org, Alan Maguire , Jiri Olsa , Jan Engelhardt , Matthias Schwarzott , Viktor Malik , Eduard Zingerman , Jan Alexander Steffens , Domenico Andreoli , Dominique Leuenberger , Daniel Xu , Yonghong Song , llvm@lists.linux.dev Subject: Re: ANNOUNCE: pahole v1.27 (reproducible builds, BTF kfuncs) Message-ID: <20240613214019.GA1423015@thelio-3990X> References: Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: Hi Arnaldo, On Tue, Jun 11, 2024 at 06:26:53PM -0300, Arnaldo Carvalho de Melo wrote: > The v1.27 release of pahole and its friends is out, supporting > parallel reproducible builds and encoding kernel kfuncs in BTF, allowing > tools such as bpftrace to enumerate the available kfuncs and obtain its > function signatures and return types. After commit f632e75 ("dwarf_loader: Add the cu to the cus list early, remove on LSK_DELETE"), I (and others[1]) notice a crash when running pahole on modules built with Clang when CONFIG_LTO_CLANG is enabled: $ curl -LSso .config https://gitlab.archlinux.org/archlinux/packaging/packages/linux/-/raw/main/config $ scripts/config -d LTO_NONE -e LTO_CLANG_THIN $ make -skj"$(nproc)" ARCH=x86_64 LLVM=1 olddefconfig vmlinux crypto/cast_common.ko make[3]: *** [scripts/Makefile.modfinal:59: crypto/cast_common.ko] Error 139 I've isolated this to the following commands using the files available at [2] (these were built with LLVM 18 but I could reproduce it with LLVM 17 and LLVM 19, so it appears to impact a number of versions): $ tar -tf clang-lto-pahole-1.27-crash.tar.zst clang-lto-pahole-1.27-crash/ clang-lto-pahole-1.27-crash/cast_common.mod.o clang-lto-pahole-1.27-crash/module.lds clang-lto-pahole-1.27-crash/cast_common.o clang-lto-pahole-1.27-crash/cast_common.ko.bak clang-lto-pahole-1.27-crash/vmlinux clang-lto-pahole-1.27-crash/cast_common.ko $ tar -axf clang-lto-pahole-1.27-crash.tar.zst $ cd clang-lto-pahole-1.27-crash $ LLVM_OBJCOPY="llvm-objcopy" pahole-1.26 -J -j --btf_features=encode_force,var,float,enum64,decl_tag,type_tag,optimized_func,consistent_func --lang_exclude=rust --btf_base vmlinux cast_common.ko $ cp cast_common.ko{.bak,} $ LLVM_OBJCOPY="llvm-objcopy" pahole-1.27 -J -j --btf_features=encode_force,var,float,enum64,decl_tag,type_tag,optimized_func,consistent_func --lang_exclude=rust --btf_base vmlinux cast_common.ko fish: Job 1, '...' terminated by signal SIGSEGV (Address boundary error) If there is any more information I can provide or patches I can test, I am more than happy to do so. [1]: https://gitlab.archlinux.org/archlinux/packaging/packages/pahole/-/issues/1 [2]: https://1drv.ms/u/s!AsQNYeB-IEbqqC2F28JuLy__Q7Vd?e=KsraMU Cheers, Nathan