Received: by 2002:a19:f614:0:0:0:0:0 with SMTP id x20csp24650lfe; Fri, 15 Apr 2022 17:43:25 -0700 (PDT) X-Google-Smtp-Source: ABdhPJzwt1BmPXZqLyUiLCjxs4zQ4UD7OhqxrZxxCMHM8oyVS+Cy3vZFreFhNb/LVOKiyCtYRCbV X-Received: by 2002:a63:5d1c:0:b0:39c:c5d7:ebbb with SMTP id r28-20020a635d1c000000b0039cc5d7ebbbmr1167060pgb.54.1650069805026; Fri, 15 Apr 2022 17:43:25 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1650069805; cv=none; d=google.com; s=arc-20160816; b=XbuTq2eC15viElao0h3tdpZ8GepcoU3nswPXTD04hNyCLV2gkt5H0mdDF5spdCFJEP LkiT+elVsnhGfdT1hcix3ZxqG4Yj6QHJHh4tE7gUjen1RFufe6LreT6apbtx37HT2ddE rBfci8gtKsiatjQhJ31k1U185wt5xqoyApHgAvdrQWvRs39QC3QXcy7YfrGrtyFkctc4 VqAjIErI/JHhtEYhvgFh0SCKfRlirPNc1knl+oc/Z+mfr7HkqqxnwDF90XVjKKi+1WAM 0E+tZ+EYUzQ/mJbOu6TNNB5B74OWIOJcaq+4G5gKqEYvOCVH/LtkpCQa5kQqV3FZgSL5 3nug== 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=M9rx3SpLFg0yQGkL9rFlw3lXIc0eurp55pdhU3Cwimk=; b=RNwVboYwGigsejRMf2XwTQttS4iVTzV1DqjXTGoLRz3KF83IGhwsGVRmmXvex2wQfe mJvjA0Z2wgZJzhK3SmKTfrpKJ0mY2ZZU8uDFR3NjVPJQX9bFul50FT50fw5b5ZZr/fIQ 1OqhZUWRIZ0g1ITG5YBb45OK/bmSs8BxsS1A49CqkA46OFf3sCXcfacKJahJnT+oxvSF UUVx9bbBgFA2g5Xd9wADbAgqPWCb59QmghF3+XZUsYLa1ferxSa/gIrkXdDEnYk7N+tg 4uKHlB5f8H6bEm/DruyJTC5cVCE9GAZmNctrQNW8EjNiK6ZHO4+4Za8G6XGMmRgTTYhb HRdg== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@gmail.com header.s=20210112 header.b=RGBADwoD; spf=softfail (google.com: domain of transitioning linux-kernel-owner@vger.kernel.org does not designate 23.128.96.19 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=QUARANTINE dis=NONE) header.from=gmail.com Return-Path: Received: from lindbergh.monkeyblade.net (lindbergh.monkeyblade.net. [23.128.96.19]) by mx.google.com with ESMTPS id e7-20020a63db07000000b0039d74310d24si2812697pgg.375.2022.04.15.17.43.24 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 15 Apr 2022 17:43:25 -0700 (PDT) Received-SPF: softfail (google.com: domain of transitioning linux-kernel-owner@vger.kernel.org does not designate 23.128.96.19 as permitted sender) client-ip=23.128.96.19; Authentication-Results: mx.google.com; dkim=pass header.i=@gmail.com header.s=20210112 header.b=RGBADwoD; spf=softfail (google.com: domain of transitioning linux-kernel-owner@vger.kernel.org does not designate 23.128.96.19 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=QUARANTINE dis=NONE) header.from=gmail.com Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by lindbergh.monkeyblade.net (Postfix) with ESMTP id F2432369F0; Fri, 15 Apr 2022 17:35:11 -0700 (PDT) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1354063AbiDONlH (ORCPT + 99 others); Fri, 15 Apr 2022 09:41:07 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:48416 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1347472AbiDONlF (ORCPT ); Fri, 15 Apr 2022 09:41:05 -0400 Received: from mail-pl1-x643.google.com (mail-pl1-x643.google.com [IPv6:2607:f8b0:4864:20::643]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 2F6875DA7E; Fri, 15 Apr 2022 06:38:37 -0700 (PDT) Received: by mail-pl1-x643.google.com with SMTP id t12so7143165pll.7; Fri, 15 Apr 2022 06:38:37 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20210112; h=date:from:to:cc:subject:message-id:references:mime-version :content-disposition:in-reply-to; bh=M9rx3SpLFg0yQGkL9rFlw3lXIc0eurp55pdhU3Cwimk=; b=RGBADwoDDLTNmBXMbPPibrgnThWpZsdF4Cg8GMAch+oDuOUbSPOHihCnEyOCg+oy/Y DkhRQVGkJcFdrCPm09lm8TOAZNvcZGQkPX4n8dBT06wr1vADFyC21HiPtFn2hTL1HnES abU1Ko956Xlvvz9jLdsPEtbJ/SU6jX1dh6iKCFyTdrIs3v/HbNKH+cFPIRSf2zZRa24O ZEfC4RMNurOZGJb/r/+ef84a2La0Q+s2Np/TlM4/0hlOntv4+bmeRSBOoEM3ETbm2fwW mZjkgkhHM2P2XWPVo0pqdgJD5xLGEApWRtVrzKbTNkND31RQKuCO8ulQZxqR698yl0a3 N29w== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=x-gm-message-state:date:from:to:cc:subject:message-id:references :mime-version:content-disposition:in-reply-to; bh=M9rx3SpLFg0yQGkL9rFlw3lXIc0eurp55pdhU3Cwimk=; b=QPAYUiP21C3vp18Jl3voAsHSGJA9RgWV/mjc4Zge7R/eJ0JCnRqyN46oSpgWIOtJ5W GAHhjs9eY0UY3OfOhgB0Uv8BjNYmcIKKM96Wc6hSfKqTENvEwuigOOHyg9AWJA4zOoZg HZQ1PERw+RB4gEr9ljyy4vgSqTBCLhEuLOrb+0ZPRSqzcrjRAeA7unminiVT5HDKFERs Mj4r7KyW+rPz32NXw7YE1dXyvwzZ9uNtksSz9SguRB1aNjUwoUQIheo9ankmw6W3ixsy EHPnan0Ry7I0QXBjuywRxHLguj9lbtfUyW+g0jWLKS678fJUP7NVDSISO/7OvE6JMUfi oO8g== X-Gm-Message-State: AOAM531bgYQuUOTvfqAGnoBb8wKfetu6SiJrGHWeR25jxqlWY6HAS4Pz qAInzwEUFx58mLPCCab5G58= X-Received: by 2002:a17:902:7298:b0:158:3a08:3163 with SMTP id d24-20020a170902729800b001583a083163mr30186108pll.133.1650029916593; Fri, 15 Apr 2022 06:38:36 -0700 (PDT) Received: from localhost ([112.79.142.104]) by smtp.gmail.com with ESMTPSA id 35-20020a631763000000b0039d93f8c2f0sm4541611pgx.24.2022.04.15.06.38.35 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 15 Apr 2022 06:38:36 -0700 (PDT) Date: Fri, 15 Apr 2022 19:08:39 +0530 From: Kumar Kartikeya Dwivedi To: Alexander Lobakin Cc: Alexei Starovoitov , Daniel Borkmann , Andrii Nakryiko , Peter Zijlstra , Ingo Molnar , Arnaldo Carvalho de Melo , Mark Rutland , Alexander Shishkin , Jiri Olsa , Namhyung Kim , Martin KaFai Lau , Song Liu , Yonghong Song , John Fastabend , KP Singh , "David S. Miller" , Jakub Kicinski , Jesper Dangaard Brouer , =?utf-8?B?QmrDtnJuIFTDtnBlbA==?= , Magnus Karlsson , Jonathan Lemon , Nathan Chancellor , Nick Desaulniers , Dmitrii Dolgov <9erthalion6@gmail.com>, Quentin Monnet , Tiezhu Yang , Chenbo Feng , Willem de Bruijn , Daniel Wagner , Thomas Graf , Ong Boon Leong , linux-perf-users@vger.kernel.org, linux-kernel@vger.kernel.org, netdev@vger.kernel.org, bpf@vger.kernel.org, llvm@lists.linux.dev Subject: Re: [PATCH bpf-next 05/11] samples: bpf: use host bpftool to generate vmlinux.h, not target Message-ID: <20220415133839.y6tjf3ymbvbrntx4@apollo.legion> References: <20220414223704.341028-1-alobakin@pm.me> <20220414223704.341028-6-alobakin@pm.me> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20220414223704.341028-6-alobakin@pm.me> X-Spam-Status: No, score=-1.7 required=5.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,FREEMAIL_FORGED_FROMDOMAIN,FREEMAIL_FROM, HEADER_FROM_DIFFERENT_DOMAINS,MAILING_LIST_MULTI,RDNS_NONE, SPF_HELO_NONE,T_SCC_BODY_TEXT_LINE autolearn=no autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on lindbergh.monkeyblade.net Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Fri, Apr 15, 2022 at 04:15:50AM IST, Alexander Lobakin wrote: > Use the host build of bpftool (bootstrap) instead of the target one > to generate vmlinux.h/skeletons for the BPF samples. Otherwise, when > host != target, samples compilation fails with: > > /bin/sh: line 1: samples/bpf/bpftool/bpftool: failed to exec: Exec > format error > > Fixes: 384b6b3bbf0d ("samples: bpf: Add vmlinux.h generation support") > Signed-off-by: Alexander Lobakin > --- Acked-by: Kumar Kartikeya Dwivedi > samples/bpf/Makefile | 5 +++-- > 1 file changed, 3 insertions(+), 2 deletions(-) > > diff --git a/samples/bpf/Makefile b/samples/bpf/Makefile > index 97203c0de252..02f999a8ef84 100644 > --- a/samples/bpf/Makefile > +++ b/samples/bpf/Makefile > @@ -291,12 +291,13 @@ $(LIBBPF): $(wildcard $(LIBBPF_SRC)/*.[ch] $(LIBBPF_SRC)/Makefile) | $(LIBBPF_OU > > BPFTOOLDIR := $(TOOLS_PATH)/bpf/bpftool > BPFTOOL_OUTPUT := $(abspath $(BPF_SAMPLES_PATH))/bpftool > -BPFTOOL := $(BPFTOOL_OUTPUT)/bpftool > +BPFTOOL := $(BPFTOOL_OUTPUT)/bootstrap/bpftool > $(BPFTOOL): $(LIBBPF) $(wildcard $(BPFTOOLDIR)/*.[ch] $(BPFTOOLDIR)/Makefile) | $(BPFTOOL_OUTPUT) > $(MAKE) -C $(BPFTOOLDIR) srctree=$(BPF_SAMPLES_PATH)/../../ \ > OUTPUT=$(BPFTOOL_OUTPUT)/ \ > LIBBPF_OUTPUT=$(LIBBPF_OUTPUT)/ \ > - LIBBPF_DESTDIR=$(LIBBPF_DESTDIR)/ > + LIBBPF_DESTDIR=$(LIBBPF_DESTDIR)/ \ > + bootstrap > > $(LIBBPF_OUTPUT) $(BPFTOOL_OUTPUT): > $(call msg,MKDIR,$@) > -- > 2.35.2 > > -- Kartikeya