From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-5.5 required=3.0 tests=BAYES_00,DKIMWL_WL_HIGH, DKIM_SIGNED,DKIM_VALID,HEADER_FROM_DIFFERENT_DOMAINS,MAILING_LIST_MULTI, SPF_HELO_NONE,SPF_PASS,URIBL_BLOCKED,USER_AGENT_SANE_1 autolearn=no autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id B6D80C433DF for ; Fri, 7 Aug 2020 19:05:16 +0000 (UTC) Received: from merlin.infradead.org (merlin.infradead.org [205.233.59.134]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPS id 7EED12086A for ; Fri, 7 Aug 2020 19:05:16 +0000 (UTC) Authentication-Results: mail.kernel.org; dkim=pass (2048-bit key) header.d=lists.infradead.org header.i=@lists.infradead.org header.b="UvSpgOmm"; dkim=fail reason="signature verification failed" (2048-bit key) header.d=armlinux.org.uk header.i=@armlinux.org.uk header.b="ImkaFR86" DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org 7EED12086A Authentication-Results: mail.kernel.org; dmarc=fail (p=none dis=none) header.from=armlinux.org.uk Authentication-Results: mail.kernel.org; spf=none smtp.mailfrom=linux-arm-kernel-bounces+linux-arm-kernel=archiver.kernel.org@lists.infradead.org DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=merlin.20170209; h=Sender:Content-Transfer-Encoding: Content-Type:Cc:List-Subscribe:List-Help:List-Post:List-Archive: List-Unsubscribe:List-Id:In-Reply-To:MIME-Version:References:Message-ID: Subject:To:From:Date:Reply-To:Content-ID:Content-Description:Resent-Date: Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID:List-Owner; bh=TxUFPCZGQe3Tf5GXOu0DJMY7eKzg7BxQcTjHK/ANOEE=; b=UvSpgOmmF7V/xnaQZUHxHrsIY ZoeQw8IajVA+U3OWrvG9jXGcUb6Jp3TkoJm8kQSKwHmp7T2qHUzsthp0jPEr3qmnFvjil/JwcXvmC 3/3Nj2+ZSJWcIJTWJVJcziUygtA1ZeXmZD52aG6PMynpbgEcF5Fywy94if+mEcG8wMC1bViNK4n8C 3KpoPP+a8LSb5wbUXHN9OP/OAz997MDaBRTuqyKcvnaa+xiHJAOu9pShngwpIIG2jmrwooJA26TGN OkP08GwyYaET3lEzQ1vWiAwbC5ElDTre6tFK+xCAWKFhiyiZu4J9pJP8CV5nEy8llW7I2uS2Q0w23 Q9O0iXT5Q==; Received: from localhost ([::1] helo=merlin.infradead.org) by merlin.infradead.org with esmtp (Exim 4.92.3 #3 (Red Hat Linux)) id 1k47eX-0003Ew-PE; Fri, 07 Aug 2020 19:03:41 +0000 Received: from pandora.armlinux.org.uk ([2001:4d48:ad52:32c8:5054:ff:fe00:142]) by merlin.infradead.org with esmtps (Exim 4.92.3 #3 (Red Hat Linux)) id 1k47eU-0003AP-VI for linux-arm-kernel@lists.infradead.org; Fri, 07 Aug 2020 19:03:39 +0000 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=armlinux.org.uk; s=pandora-2019; h=Sender:In-Reply-To:Content-Type: MIME-Version:References:Message-ID:Subject:Cc:To:From:Date:Reply-To: Content-Transfer-Encoding:Content-ID:Content-Description:Resent-Date: Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID:List-Id: List-Help:List-Unsubscribe:List-Subscribe:List-Post:List-Owner:List-Archive; bh=nzfDWUgjvBp5zcnrjMzmPF4/F3qvqe3B+Ykejy/5sj0=; b=ImkaFR86XdiR0ArscNGPb4yzm ORBXUbmp24rMgPUneiipLLVZzcl7ZvFCMllSVZquZGa5bGMzGwUU4B7lgGz2/jS1C0NEK4/YpPz33 dotrPfTXw1PcqS5upywuvc4x1yKTQV7bSHLd8Ynxz+2hB+dOSrf/h7zbAfKbj4Uc5XOC/uXSeWM1f ONYUfkBQYFL32/3A+3Qi2Ed0kn0zQZYzOdoOQjpdfAkzf8O+0OuYk+g92C7wxtriQDzzX1VIbfJC5 lHSUYSYBx3lL6Vg6ng17wWBeQwSoRvX79lWVPZY+9OQpfrJFmv/yZ675jokwtZC/6eXNZqTlLxbyX 7bFuK+djQ==; Received: from shell.armlinux.org.uk ([fd8f:7570:feb6:1:5054:ff:fe00:4ec]:49596) by pandora.armlinux.org.uk with esmtpsa (TLS1.3:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1k47bT-00069w-4R; Fri, 07 Aug 2020 20:00:31 +0100 Received: from linux by shell.armlinux.org.uk with local (Exim 4.92) (envelope-from ) id 1k47bR-0007Ql-Jg; Fri, 07 Aug 2020 20:00:29 +0100 Date: Fri, 7 Aug 2020 20:00:29 +0100 From: Russell King - ARM Linux admin To: Jean-Philippe Brucker Subject: Re: eBPF CO-RE cross-compilation for 32-bit ARM platforms Message-ID: <20200807190029.GI1551@shell.armlinux.org.uk> References: <20200807172353.GA624812@myrica> MIME-Version: 1.0 Content-Disposition: inline In-Reply-To: <20200807172353.GA624812@myrica> User-Agent: Mutt/1.10.1 (2018-07-13) X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20200807_150339_028272_C553E8D0 X-CRM114-Status: GOOD ( 22.52 ) X-BeenThere: linux-arm-kernel@lists.infradead.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: Luka Perkov , Jakov Petrina , Juraj Vijtiuk , Jakov Smolic , bpf@vger.kernel.org, Andrii Nakryiko , Andrii Nakryiko , linux-arm-kernel@lists.infradead.org Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Sender: "linux-arm-kernel" Errors-To: linux-arm-kernel-bounces+linux-arm-kernel=archiver.kernel.org@lists.infradead.org On Fri, Aug 07, 2020 at 07:23:53PM +0200, Jean-Philippe Brucker wrote: > On Fri, Aug 07, 2020 at 04:20:58PM +0200, Jakov Petrina wrote: > > Hi everyone, > > > > recently we have begun extensive research into eBPF and related > > technologies. Seeking an easier development process, we have switched over > > to using the eBPF CO-RE [0] approach internally which has enabled us to > > simplify most aspects of eBPF development, especially those related to > > cross-compilation. For those of us not familiar with what CO-RE is, this doesn't help. I assume the [0] was a reference to something that explained it, but that isn't included. > > However, as part of these efforts we have stumbled upon several problems > > that we feel would benefit from a community discussion where we may share > > our solutions and discuss alternatives moving forward. > > > > As a reference point, we have started researching and modifying several eBPF > > CO-RE samples that have been developed or migrated from existing `bcc` > > tooling. Most notable examples are those present in `bcc`'s `libbpf-tools` > > directory [1]. Some of these samples have just recently been converted to > > respective eBPF CO-RE variants, of which the `tcpconnect` tracing sample has > > proven to be very interesting. > > > > First showstopper for cross-compiling aforementioned example on the ARM > > 32-bit platform has been with regards to generation of the required > > `vmlinux.h` kernel header from the BTF information. More specifically, our > > initial approach to have e.g. a compilation target dependency which would > > invoke `bpftool` at configure time was not appropriate due to several > > issues: a) CO-RE requires host kernel to have been compiled in such a way to > > expose BTF information which may not available, and b) the generated What is "BTF information"? Google suggests it's something to do with the British Thyroid Foundation. Please don't use three letter abbreviations unless they are widely understood, or if you wish to, please ensure that you explain them. TLAs otherwise are an exclusion mechanism. > > `vmlinux.h` was actually architecture-specific. What is this "vmlinux.h" ? It isn't something that the kernel provides afaics. It doesn't seem to be present on my existing x86 Debian system. I've seen it on Fedora systems in the dim and distant past. Where do you think it comes from? Where are you finding it? -- RMK's Patch system: https://www.armlinux.org.uk/developer/patches/ FTTP is here! 40Mbps down 10Mbps up. Decent connectivity at last! _______________________________________________ linux-arm-kernel mailing list linux-arm-kernel@lists.infradead.org http://lists.infradead.org/mailman/listinfo/linux-arm-kernel