Received: by 2002:a05:6a10:6d10:0:0:0:0 with SMTP id gq16csp846186pxb; Fri, 22 Apr 2022 12:27:21 -0700 (PDT) X-Google-Smtp-Source: ABdhPJzq6gKz7ifC+l2GATchghFXRKeQTIXMWhQYEiD85A72+tnyW+t8Rb7xSLu4ScR1AhHsCd30 X-Received: by 2002:a65:5c81:0:b0:3aa:494c:6668 with SMTP id a1-20020a655c81000000b003aa494c6668mr5215305pgt.603.1650655641489; Fri, 22 Apr 2022 12:27:21 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1650655641; cv=none; d=google.com; s=arc-20160816; b=ote89untci23OxOvaAwJJ+iED7ywEUCPkWZT9r/GvN3bqP8vRrFrp686ZfgOvyGEIm xqIQY2xIEC/xO+NR6LhdUE4srMDi0Ssc28dMPgDLYuyK57E3NXrCyBUwFDl4qL4Lc4La YXo5keNJ55EgS9bMTruNkWRsQOT0QRNUcS+zx0i2GYgczZkuP78siM/4flOojCirEDKE NYqOoVkWDGw7Sc4PRw6za/Li+6nWX3ozcLZegBaC3cceRq7hr3bJxzJiohu1aN4l42La e7tdR0rd2Dy64AqBx9Ez03ddfE/ejx5rY/6+TkRcDaSym/Pg7z55l/KKqDDr7jyRnYhf YH0g== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:mime-version :feedback-id:references:in-reply-to:message-id:subject:reply-to:cc :from:to:dkim-signature:date; bh=v6gaFkC1lQ5OvOGA5jP895MtmOBP8Tdf6LrASizShuo=; b=mutta08w3VchmYK8WXe8ZjGisgg59bHjEniSlpGgkotd8l0C7/5gi33OmP8Kez6ZnY 99c6+VJoJvoRFda9G2jN9DTxeAA4NLm2NFqQ2a9Kk5eEM4+67B0lzA7KbZGJKs7b/EJe c1F9ZG6X57DXy6InmsfHq+/4gP2s40CLO/E3JDtIQIKoYJEJBSJa8BaDK6nUBFWd7/Lw Md91Xo23itiegyfnM5o4LWQnfGiZLG1mzx+uvoLrSyavsuwgUThpemqvIDJ+peXzZDZb iHMU9xS5IRvf8jO4hhx13ZzWhtW+X+hEu+7cZITEtwFbHbjIm4mFJhuO+hgK+PG168V4 Ff3A== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@pm.me header.s=protonmail2 header.b=PFdTuOoC; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=QUARANTINE sp=QUARANTINE dis=NONE) header.from=pm.me Return-Path: Received: from lindbergh.monkeyblade.net (lindbergh.monkeyblade.net. [2620:137:e000::1:18]) by mx.google.com with ESMTPS id a2-20020a17090a854200b001bf6913eb4bsi10883917pjw.155.2022.04.22.12.27.21 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 22 Apr 2022 12:27:21 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:18 as permitted sender) client-ip=2620:137:e000::1:18; Authentication-Results: mx.google.com; dkim=pass header.i=@pm.me header.s=protonmail2 header.b=PFdTuOoC; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=QUARANTINE sp=QUARANTINE dis=NONE) header.from=pm.me Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by lindbergh.monkeyblade.net (Postfix) with ESMTP id BDFD315C392; Fri, 22 Apr 2022 11:38:23 -0700 (PDT) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1383479AbiDUAob (ORCPT + 99 others); Wed, 20 Apr 2022 20:44:31 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:38434 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1383512AbiDUAmW (ORCPT ); Wed, 20 Apr 2022 20:42:22 -0400 Received: from mail-4316.protonmail.ch (mail-4316.protonmail.ch [185.70.43.16]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 4FC0627B23; Wed, 20 Apr 2022 17:39:34 -0700 (PDT) Date: Thu, 21 Apr 2022 00:39:27 +0000 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=pm.me; s=protonmail2; t=1650501572; bh=v6gaFkC1lQ5OvOGA5jP895MtmOBP8Tdf6LrASizShuo=; h=Date:To:From:Cc:Reply-To:Subject:Message-ID:In-Reply-To: References:Feedback-ID:From:To:Cc:Date:Subject:Reply-To: Feedback-ID:Message-ID; b=PFdTuOoCFpxSp4uLdYHgSLDaZVZwi7hatwlWmCfdP56Da7ptv/UBE8hO/VLSl1xAn lOkh92ooqW1lM/YySkpa4nxE/nsmnRPHmkW/Rhd1ZuDTDvT2o5k0hmI+E1/DsA+O7O TDyzviRTM4/nByU25Ar99spr1lC7wo7phHzCAeKvcKcgpNBojGFUJqhalRb0WyzN6l oIRGiLBv5xH0tkPZJxCTDur070BWsA3iRt0dAYOOwnHlItFmjiGlkAbG5h7KcS05nB zkV9ViBIHO//ZKcyS+V2Q7NsHosR/zRyXrk/0VNx9rggxhcHxfwXC6BRowRIcFARbS mezfQjhZThggg== To: Alexei Starovoitov , Daniel Borkmann , Andrii Nakryiko From: Alexander Lobakin Cc: Alexander Lobakin , Maciej Fijalkowski , Song Liu , Kumar Kartikeya Dwivedi , bpf@vger.kernel.org, netdev@vger.kernel.org, linux-kernel@vger.kernel.org Reply-To: Alexander Lobakin Subject: [PATCH v2 bpf 06/11] samples/bpf: use host bpftool to generate vmlinux.h, not target Message-ID: <20220421003152.339542-7-alobakin@pm.me> In-Reply-To: <20220421003152.339542-1-alobakin@pm.me> References: <20220421003152.339542-1-alobakin@pm.me> Feedback-ID: 22809121:user:proton MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable X-Spam-Status: No, score=-2.0 required=5.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,HEADER_FROM_DIFFERENT_DOMAINS, MAILING_LIST_MULTI,RDNS_NONE,SPF_HELO_NONE 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 Use the host build of bpftool (bootstrap) instead of the target one to generate vmlinux.h/skeletons for the BPF samples. Otherwise, when host !=3D 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") Acked-by: Kumar Kartikeya Dwivedi Acked-by: Song Liu Signed-off-by: Alexander Lobakin --- samples/bpf/Makefile | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/samples/bpf/Makefile b/samples/bpf/Makefile index 70323ac1114f..2bb9088a8d91 100644 --- a/samples/bpf/Makefile +++ b/samples/bpf/Makefile @@ -291,12 +291,13 @@ $(LIBBPF): $(wildcard $(LIBBPF_SRC)/*.[ch] $(LIBBPF_S= RC)/Makefile) | $(LIBBPF_OU BPFTOOLDIR :=3D $(TOOLS_PATH)/bpf/bpftool BPFTOOL_OUTPUT :=3D $(abspath $(BPF_SAMPLES_PATH))/bpftool -BPFTOOL :=3D $(BPFTOOL_OUTPUT)/bpftool +BPFTOOL :=3D $(BPFTOOL_OUTPUT)/bootstrap/bpftool $(BPFTOOL): $(LIBBPF) $(wildcard $(BPFTOOLDIR)/*.[ch] $(BPFTOOLDIR)/Makefi= le) | $(BPFTOOL_OUTPUT) =09 $(MAKE) -C $(BPFTOOLDIR) srctree=3D$(BPF_SAMPLES_PATH)/../../ \ =09=09OUTPUT=3D$(BPFTOOL_OUTPUT)/ \ =09=09LIBBPF_OUTPUT=3D$(LIBBPF_OUTPUT)/ \ -=09=09LIBBPF_DESTDIR=3D$(LIBBPF_DESTDIR)/ +=09=09LIBBPF_DESTDIR=3D$(LIBBPF_DESTDIR)/ \ +=09=09bootstrap $(LIBBPF_OUTPUT) $(BPFTOOL_OUTPUT): =09$(call msg,MKDIR,$@) -- 2.36.0