Received: by 2002:a5d:9c59:0:0:0:0:0 with SMTP id 25csp2175431iof; Tue, 7 Jun 2022 22:13:16 -0700 (PDT) X-Google-Smtp-Source: ABdhPJzZyuv55IdbWrMwhrauRgYs9a0G34lJ/XlFy1bQlWlisYKbpTrv5COQkovyNV0lJDelIFML X-Received: by 2002:a17:90b:38c4:b0:1e6:89f9:73da with SMTP id nn4-20020a17090b38c400b001e689f973damr33175806pjb.220.1654665196650; Tue, 07 Jun 2022 22:13:16 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1654665196; cv=none; d=google.com; s=arc-20160816; b=p+v6Nexy9x8rEcwRaxR5EjfxqbvtG+PawEQ4y5XSQssGYOnFed9oVDwrNM6fvZ2iNK nz7JL4XxdacsVOt78daJQk2O5YG2UQna6y5VAHnF6NJL19riWb4xcbZn1UbEhqQCIAdD tmFCBg0bdhmWqzlYsZxS+ppFcdaHy6OgZnFgn7/Cc3wwdV3hSS4WCyVj9J4FxGWd7i4i IRJklalyrfvTCbEdJFBaITrhMZfgLpPi7ijjhCm95kN+rXuG6WYgy3AQTrKYHYm5XrFZ LHXhjUdn5l9AT7HyZNDvduaYdecNqNMx3TCcgn9BJlNd8Y7cGApK0dIGm1fRLg3TXe8U nqsA== 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 :user-agent:references:in-reply-to:message-id:date:subject:cc:to :from:dkim-signature; bh=SsD2Cd5TaU1IN3pvs3sT99syyRraan82Vm/Mx1BX8M4=; b=Hs4lcHN1lDolbQAbX8Zii7a/E9nmc8v1QRsZekagF6Kw7cAWPkSV+ZQmCdwCRo2cJp estpJKtS93e3RHqeo58JSeeRkHGJjIw718CZlKww7mYmyu+RKXRcv0D538/TG9tUvEa/ cOlR0FyTg18TtlaGUMJsc9whH9VfZpe3TdYaeKuocBLYrCHdWi3wwJQ6BsmoT4/gRCbU lh4uz12pr4WfJTKg1q/+DoEe4IZ4W8gPuchHstDSwgrLnNtN0p7f0hP2yAz+iPkVlOSA +WknoTCO3k/iFjB3DZeQ2JxM59FB0jK1yb9vHY3/Ue7g3CfdlIBaNJTlChHtZkqOm1qS XrRg== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linuxfoundation.org header.s=korg header.b=2bGxB5DH; 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=NONE dis=NONE) header.from=linuxfoundation.org Return-Path: Received: from lindbergh.monkeyblade.net (lindbergh.monkeyblade.net. [23.128.96.19]) by mx.google.com with ESMTPS id k64-20020a638443000000b003fe0166ab96si4257254pgd.296.2022.06.07.22.13.16 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 07 Jun 2022 22:13:16 -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=@linuxfoundation.org header.s=korg header.b=2bGxB5DH; 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=NONE dis=NONE) header.from=linuxfoundation.org Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by lindbergh.monkeyblade.net (Postfix) with ESMTP id E70CE2C278E; Tue, 7 Jun 2022 21:43:34 -0700 (PDT) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1385490AbiFGWp6 (ORCPT + 99 others); Tue, 7 Jun 2022 18:45:58 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:53524 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1380023AbiFGVdt (ORCPT ); Tue, 7 Jun 2022 17:33:49 -0400 Received: from ams.source.kernel.org (ams.source.kernel.org [145.40.68.75]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id C43EE172C09; Tue, 7 Jun 2022 12:04:27 -0700 (PDT) Received: from smtp.kernel.org (relay.kernel.org [52.25.139.140]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by ams.source.kernel.org (Postfix) with ESMTPS id CA9B8B823B1; Tue, 7 Jun 2022 19:04:25 +0000 (UTC) Received: by smtp.kernel.org (Postfix) with ESMTPSA id 2A47DC385A5; Tue, 7 Jun 2022 19:04:24 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=linuxfoundation.org; s=korg; t=1654628664; bh=m8Sd4aYGwsiu1xHVnWzSw6BMofJn741hGJ0Xt/ZJ+tI=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=2bGxB5DHz+dE5Ix8nR36MEatYShbOUKVjdXUUaS7yWBMKSkpg86t+28Mon8Hjh4wu iMmReyD/8lIRsxsy7Hha1S8fqQGv9njHN3IZcPK0KHH13onF3W7qqBkwFB7h3mm++Y 2clmwA0N3BP6E99sh8uvlZ8Pq+oVU+cY8PI+qVhY= From: Greg Kroah-Hartman To: linux-kernel@vger.kernel.org Cc: Greg Kroah-Hartman , stable@vger.kernel.org, CKI Project , Veronika Kabatova , Jerome Marchand , Andrii Nakryiko , Sasha Levin Subject: [PATCH 5.18 409/879] samples: bpf: Dont fail for a missing VMLINUX_BTF when VMLINUX_H is provided Date: Tue, 7 Jun 2022 18:58:47 +0200 Message-Id: <20220607165014.733939008@linuxfoundation.org> X-Mailer: git-send-email 2.36.1 In-Reply-To: <20220607165002.659942637@linuxfoundation.org> References: <20220607165002.659942637@linuxfoundation.org> User-Agent: quilt/0.66 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-Spam-Status: No, score=-3.1 required=5.0 tests=BAYES_00,DKIMWL_WL_HIGH, DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,HEADER_FROM_DIFFERENT_DOMAINS, MAILING_LIST_MULTI,RDNS_NONE,SPF_HELO_NONE,T_SCC_BODY_TEXT_LINE autolearn=unavailable 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 From: Jerome Marchand [ Upstream commit ec24704492d8791a52a75a39e3ad762b6e017bc6 ] samples/bpf build currently always fails if it can't generate vmlinux.h from vmlinux, even when vmlinux.h is directly provided by VMLINUX_H variable, which makes VMLINUX_H pointless. Only fails when neither method works. Fixes: 384b6b3bbf0d ("samples: bpf: Add vmlinux.h generation support") Reported-by: CKI Project Reported-by: Veronika Kabatova Signed-off-by: Jerome Marchand Signed-off-by: Andrii Nakryiko Link: https://lore.kernel.org/bpf/20220507161635.2219052-1-jmarchan@redhat.com Signed-off-by: Sasha Levin --- samples/bpf/Makefile | 9 ++++----- 1 file changed, 4 insertions(+), 5 deletions(-) diff --git a/samples/bpf/Makefile b/samples/bpf/Makefile index 38638845db9d..72bb85c18804 100644 --- a/samples/bpf/Makefile +++ b/samples/bpf/Makefile @@ -368,16 +368,15 @@ VMLINUX_BTF ?= $(abspath $(firstword $(wildcard $(VMLINUX_BTF_PATHS)))) $(obj)/vmlinux.h: $(VMLINUX_BTF) $(BPFTOOL) ifeq ($(VMLINUX_H),) +ifeq ($(VMLINUX_BTF),) + $(error Cannot find a vmlinux for VMLINUX_BTF at any of "$(VMLINUX_BTF_PATHS)",\ + build the kernel or set VMLINUX_BTF or VMLINUX_H variable) +endif $(Q)$(BPFTOOL) btf dump file $(VMLINUX_BTF) format c > $@ else $(Q)cp "$(VMLINUX_H)" $@ endif -ifeq ($(VMLINUX_BTF),) - $(error Cannot find a vmlinux for VMLINUX_BTF at any of "$(VMLINUX_BTF_PATHS)",\ - build the kernel or set VMLINUX_BTF variable) -endif - clean-files += vmlinux.h # Get Clang's default includes on this system, as opposed to those seen by -- 2.35.1