Received: by 2002:a05:6358:f14:b0:e5:3b68:ec04 with SMTP id b20csp3378669rwj; Mon, 19 Dec 2022 17:49:38 -0800 (PST) X-Google-Smtp-Source: AMrXdXtUE1TKTcIiCgCb7WcuStfrbT/Dp55JAAnh4Y/7mJWMKsXvMSgQMDsT6vlZ0KZ/K9gWPWKv X-Received: by 2002:aa7:c90b:0:b0:470:362f:6ba9 with SMTP id b11-20020aa7c90b000000b00470362f6ba9mr323404edt.41.1671500978747; Mon, 19 Dec 2022 17:49:38 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1671500978; cv=none; d=google.com; s=arc-20160816; b=IkpYga3nKJnTF0XfTr2IGI+PtChhu4msx0Q2Ykv3fif/JpYdrqHJ06FiRUDTSHYrAy c5qYNZGAJgQfkYh3V5w+N4i7Awpy3ViBGkLMkSoYRnj7FNs2L6Enfk4MbhlXrCun/BRG rqXn+Oxy01KEUQ9mdWx9m5WZUrTDzb2utvvcrgwby9LM+Slu48sCJcZHlDnnD12E/fkT W9VrI5re+FSeBmOJNSr2VL/RrWTFhXayNAjsPahYZLbm4R93WB0GJ0aVgUGyfx66WWcJ I1zrFWeLs62kiDCX3Sja9I/PgtI1AgfLpHj/Zcjuarl8A+ChiqjmbpqnkKqbQQlFBE5d e68g== 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=VyFIxEgnWqnUvo2rmjS4K7Tu88OX44TFhCrJ6tX8KIo=; b=wrkhBcZ71rfoGaXinTd5T20yEPoGpm+Bgov0CLL+75utVeGso5YPnEQ3XfhUR2REQD 6JY2u5s9y/NaqKGEn9jUKWHNiwAR6V3Xji3V/YV8oQhpuVKpE2qhDOJdppG4Df3gJDdY 6yJDHXl/+67PEQ8nUDuDlwMN3NC+cr3DYlv5DEl0Viqj6yUNPnpT8R+xQUioaTN3pXWX ijG9A5IeQzbdbrjgF5Ox3j+gfvxLWVIawGEirJKyZcCt1v9QfjDn4ZXulfgqQ7Srb6f1 QE9kgRN7xOwTyvhuOq4H0V+ns/s8+NEg64nEz4GXrySzcbzmaFGiXjfInAwVfDhtnJ4O TUjA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@gmail.com header.s=20210112 header.b=pRhs1ish; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 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 out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id dz17-20020a0564021d5100b0047a00905af8si3886489edb.120.2022.12.19.17.49.22; Mon, 19 Dec 2022 17:49:38 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) client-ip=2620:137:e000::1:20; Authentication-Results: mx.google.com; dkim=pass header.i=@gmail.com header.s=20210112 header.b=pRhs1ish; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=QUARANTINE dis=NONE) header.from=gmail.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S232786AbiLTBhV (ORCPT + 70 others); Mon, 19 Dec 2022 20:37:21 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:43532 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S233106AbiLTBgi (ORCPT ); Mon, 19 Dec 2022 20:36:38 -0500 Received: from mail-pj1-x1033.google.com (mail-pj1-x1033.google.com [IPv6:2607:f8b0:4864:20::1033]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id B99A41CFDC; Mon, 19 Dec 2022 17:27:17 -0800 (PST) Received: by mail-pj1-x1033.google.com with SMTP id fy4so10918525pjb.0; Mon, 19 Dec 2022 17:27:17 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20210112; h=in-reply-to:content-disposition:mime-version:references:message-id :subject:cc:to:from:date:from:to:cc:subject:date:message-id:reply-to; bh=VyFIxEgnWqnUvo2rmjS4K7Tu88OX44TFhCrJ6tX8KIo=; b=pRhs1ishrMoO0v8GXYtYFW3V+IYFBQEmh2x+AG0gOs6cT4Uy5tiuqt4aiyOJ4DJiun qWBHDzAZRkNq82gRAyZOOKcgHg8Ynw3f6FQSMYViTs2HWZloSoO+Yg2eKt9VJNo5mZgE bCAy05R8dfxMCrw6+wP3K3n1C1OOIRc+hWNNrvOjkVqNo4ZW00A7/1ovOIO/QtULkWnB mh1q5TY54GdeYuOJvU1couiG3TPM0EDfr4UDySQFkaljr5/BuQoriv5m44ADD6bUvjbM lZYej0+R2o3mt3V8VnQFeA+soAQO3pAacWqfZeRBZVX4VZ6mZ7ERXAjCTqWEAlvD3hGd OUpA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=in-reply-to:content-disposition:mime-version:references:message-id :subject:cc:to:from:date:x-gm-message-state:from:to:cc:subject:date :message-id:reply-to; bh=VyFIxEgnWqnUvo2rmjS4K7Tu88OX44TFhCrJ6tX8KIo=; b=PKQ0H63iDmBiqQ11wLfgSeUj7o6IM7cclQZmf2uA2Q1gzPezcWEPHUUE9Fj87uTNnf 4CqFa9TYqqmNa1kkgKcpR6TXCYBpMmIIoDmBZQ66K87Wd96oQn3sARFmpa3RSxZKu/OX YxKTMyYaA7kbqxtBLZqdg7SyWOE51cy7FCP3HMXBn3nzWtNOLxBwcQS9WLdgR2Qk3L0d vreUKkNFhdILrluzoN17ystf/qQFzdbeoXhAREkDG3c4hxBzDC7uQnfSavck1cUAEuDP WJF1v5wlfWPpYxgQijSqHJrh3DG9bW9JV+5DjNVtto1su+5YXhikx2uTkg911SpyZLv7 Mzxg== X-Gm-Message-State: ANoB5plcwtY8Xwjx9aTT4ugbgnpDguwYU8j+VV4r1/bo8//WJiOlmRsb LiViE+6Md8tUDVBQj4VxZK8= X-Received: by 2002:a17:902:e5c8:b0:189:6ab3:9e75 with SMTP id u8-20020a170902e5c800b001896ab39e75mr63049706plf.15.1671499612787; Mon, 19 Dec 2022 17:26:52 -0800 (PST) Received: from mail.google.com ([103.135.102.144]) by smtp.gmail.com with ESMTPSA id l16-20020a170903121000b001745662d568sm7826467plh.278.2022.12.19.17.26.46 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 19 Dec 2022 17:26:52 -0800 (PST) Date: Tue, 20 Dec 2022 09:26:47 +0800 From: Changbin Du To: Leo Yan Cc: Changbin Du , Alexei Starovoitov , Daniel Borkmann , Andrii Nakryiko , Quentin Monnet , Peter Zijlstra , Ingo Molnar , Arnaldo Carvalho de Melo , Shuah Khan , Martin KaFai Lau , Song Liu , Yonghong Song , John Fastabend , KP Singh , Stanislav Fomichev , Hao Luo , Jiri Olsa , bpf@vger.kernel.org, linux-kernel@vger.kernel.org, Mark Rutland , Alexander Shishkin , Namhyung Kim , Mykola Lysenko , linux-perf-users@vger.kernel.org, linux-kselftest@vger.kernel.org Subject: Re: [PATCH v3 2/2] bpf: makefiles: do not generate empty vmlinux.h Message-ID: <20221220012647.oytzq7q6ahwfhdow@mail.google.com> References: <20221217223509.88254-1-changbin.du@gmail.com> <20221217223509.88254-3-changbin.du@gmail.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: X-Spam-Status: No, score=1.2 required=5.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,FREEMAIL_FROM, RCVD_IN_DNSWL_NONE,RCVD_IN_SBL_CSS,SPF_HELO_NONE,SPF_PASS autolearn=no autolearn_force=no version=3.4.6 X-Spam-Level: * 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 Mon, Dec 19, 2022 at 11:59:38AM +0800, Leo Yan wrote: > On Sun, Dec 18, 2022 at 06:35:09AM +0800, Changbin Du wrote: > > Remove the empty vmlinux.h if bpftool failed to dump btf info. > > The empty vmlinux.h can hide real error when reading output > > of make. > > > > This is done by adding .DELETE_ON_ERROR special target in related > > makefiles. > > We need to handle the same case for perf building, its makefile > linux/tools/perf/Makefile.perf also uses bpftool to generate > vmlinux.h, see: > https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git/tree/tools/perf/Makefile.perf#n1067 > > Please consider to use a separate patch to add the same change in > Makefile.perf? > It's alreay there. https://lore.kernel.org/lkml/20221217225151.90387-1-changbin.du@gmail.com/T/ > Thanks, > Leo > > > Signed-off-by: Changbin Du > > --- > > tools/bpf/bpftool/Makefile | 3 +++ > > tools/testing/selftests/bpf/Makefile | 3 +++ > > 2 files changed, 6 insertions(+) > > > > diff --git a/tools/bpf/bpftool/Makefile b/tools/bpf/bpftool/Makefile > > index 787b857d3fb5..313fd1b09189 100644 > > --- a/tools/bpf/bpftool/Makefile > > +++ b/tools/bpf/bpftool/Makefile > > @@ -289,3 +289,6 @@ FORCE: > > .PHONY: all FORCE bootstrap clean install-bin install uninstall > > .PHONY: doc doc-clean doc-install doc-uninstall > > .DEFAULT_GOAL := all > > + > > +# Delete partially updated (corrupted) files on error > > +.DELETE_ON_ERROR: > > diff --git a/tools/testing/selftests/bpf/Makefile b/tools/testing/selftests/bpf/Makefile > > index c22c43bbee19..205e8c3c346a 100644 > > --- a/tools/testing/selftests/bpf/Makefile > > +++ b/tools/testing/selftests/bpf/Makefile > > @@ -626,3 +626,6 @@ EXTRA_CLEAN := $(TEST_CUSTOM_PROGS) $(SCRATCH_DIR) $(HOST_SCRATCH_DIR) \ > > liburandom_read.so) > > > > .PHONY: docs docs-clean > > + > > +# Delete partially updated (corrupted) files on error > > +.DELETE_ON_ERROR: > > -- > > 2.37.2 > > -- Cheers, Changbin Du