Received: by 2002:a05:6902:102b:0:0:0:0 with SMTP id x11csp775263ybt; Wed, 1 Jul 2020 09:40:01 -0700 (PDT) X-Google-Smtp-Source: ABdhPJxHLWAMjjO3AG8eSQY+dYPI6igNo59kLVnK83ib4orNej0pdh9zvYDIfccF+MyFxAcnPzZG X-Received: by 2002:a17:906:a449:: with SMTP id cb9mr4651349ejb.115.1593621601297; Wed, 01 Jul 2020 09:40:01 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1593621601; cv=none; d=google.com; s=arc-20160816; b=cTAKll/uUaL5bC9EcJkexmHdJRfK0keltENM8rzHH8UnU7oNmwupq9moZfGY+9hpF3 wPtYEf4mRkSG0EFh4h+vVLA3w1aW11sweccYNlf4cw2HDVBIrCuniDAQYkSmE+JccQ3/ 3kc5rZWOhFBsyK+P2/Z943yWU+WBKeuca8/faXsKfSXLRP7kGl8DarcDA66cuhzxKO1E exFLALMyyPOhVxsHYJRUbd8Rlbyvj3DXVvdcZL2ei/5LR5nzrvzV9c3a87CT7B3rTAUk Xu8hw+Rfkq+3+F8fEQYW8OQyaCkkzmX4WdbDLtDv+k1d7zOkrePc7YhxaAXoHj0SZu5q rw0w== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:cc:to:subject:message-id:date:from :in-reply-to:references:mime-version:dkim-signature; bh=fS8Kbbr6u+Qt+wSwfOlztvSKvUpRcBAxdtJAIiraa8k=; b=n+ICMG9j7TPUpI83XaM6x9ivfocONl9KxR941ufiVc7DNxDKoIvnWH31gI1ULCqgY3 b+sxHq2uakX1PT2ZapUIGeqkTGniKDueKVxJl97lWIlCpStX+IKfP5rL6sa3rq5V3XE5 2GWLnYbmowkK7v3ut7GEtYtVfQ9GB3xmcQXdLQzPrvYQXebpCkQbjLN+oA6CBEswXEGt T7xH+shfxMsIHWSIAwtxlyactJxjJggIQGIjX7fgpjJtmgu/o7CK0JiFwYke30RsQAc7 xSfBS0REMEhFZLydZiNOn9cIHoVrUHHm8CB+JruDxrgniwLOdGKuKSifLnypJwClZJc6 Wyyw== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@gmail.com header.s=20161025 header.b=XZM+72gc; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 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 vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id t12si4108981ejr.551.2020.07.01.09.39.37; Wed, 01 Jul 2020 09:40:01 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) client-ip=23.128.96.18; Authentication-Results: mx.google.com; dkim=pass header.i=@gmail.com header.s=20161025 header.b=XZM+72gc; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 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 S1732479AbgGAQjA (ORCPT + 99 others); Wed, 1 Jul 2020 12:39:00 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:42900 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726621AbgGAQi7 (ORCPT ); Wed, 1 Jul 2020 12:38:59 -0400 Received: from mail-lf1-x141.google.com (mail-lf1-x141.google.com [IPv6:2a00:1450:4864:20::141]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 910FFC08C5C1; Wed, 1 Jul 2020 09:38:59 -0700 (PDT) Received: by mail-lf1-x141.google.com with SMTP id k15so14055236lfc.4; Wed, 01 Jul 2020 09:38:59 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=mime-version:references:in-reply-to:from:date:message-id:subject:to :cc; bh=fS8Kbbr6u+Qt+wSwfOlztvSKvUpRcBAxdtJAIiraa8k=; b=XZM+72gciw9nF4OsUTlGCo821BFfCQbfWMzTG2s4XnB101NtlMstykJPODwJQkbk95 ulAI4EpcU7fehmEn2OJ4hmH8jDQ3XUNp6wW631Zg/hLtnJKYYL3+untAdAvh1/2h4CHE Lh9Bbm1CmxMLsT/L4DDWco0F6ND+AFm+pljhj1WkhvSFKl/D82mKul+DFdHfQLZgsW/y tVXDXcRv5gLENn581TARIKvIeyvWyxbAYDXimInWetyiF1Q3I10t2k7nuQwrqWDIAfCH 2FXDP4ok4ms1Zb2j1UZZbjokcvm5RNJEcKmP/XvftY1TPqLWeJtapVke08xVAMuAaW5X 2Gyg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:references:in-reply-to:from:date :message-id:subject:to:cc; bh=fS8Kbbr6u+Qt+wSwfOlztvSKvUpRcBAxdtJAIiraa8k=; b=KlhZSUdmkQXDS+h6VwLHour9kknDEjG/c8uKw/CFR12YUbMt0YRT0ea0gjH/ppiAT4 AVjpNIgDe/hKa1SguqgpyUpiBw3+wXGk6QRPLGzPgrHFtjdR0WtINjXiQV8YF3OPN1GH TRNAP1Jl8JWWyLqzriu/LNg52z1u+aVtkCAfncxktjKiQNgZXV4FMjxmdp3QayJORUxl Hu7TSxAw+ph+kUD5Av00MLfGa7XrPLscmTMrQCoxs131mlpmyemuNHu829jspDX1K9EQ I4sFMrEt9Gi16ozA6seRT6GHn7lxOHISFKsiFZx6j0yF+Q6sCH4aHCUaidB7YsWKKMS3 kyVg== X-Gm-Message-State: AOAM531SYukelTA6FvXI5/4v5V0fplHS+dlmZNbMjjTQnMWJFCSvLh4F zoNwpc7odjg79B7H5uDgqhPbWQmVxgdkB+gtzLVK5A== X-Received: by 2002:ac2:5e29:: with SMTP id o9mr15143828lfg.196.1593621538016; Wed, 01 Jul 2020 09:38:58 -0700 (PDT) MIME-Version: 1.0 References: <20200630173734.14057-1-will@kernel.org> <20200630173734.14057-2-will@kernel.org> In-Reply-To: <20200630173734.14057-2-will@kernel.org> From: Alexei Starovoitov Date: Wed, 1 Jul 2020 09:38:46 -0700 Message-ID: Subject: Re: [PATCH 01/18] tools: bpf: Use local copy of headers including uapi/linux/filter.h To: Will Deacon Cc: LKML , Sami Tolvanen , Nick Desaulniers , Kees Cook , Marco Elver , "Paul E. McKenney" , Josh Triplett , Matt Turner , Ivan Kokshaysky , Richard Henderson , Peter Zijlstra , Alan Stern , "Michael S. Tsirkin" , Jason Wang , Arnd Bergmann , Boqun Feng , Catalin Marinas , Mark Rutland , linux-arm-kernel , linux-alpha@vger.kernel.org, virtualization@lists.linux-foundation.org, Android Kernel Team , Alexei Starovoitov , Masahiro Yamada , Daniel Borkmann , Xiao Yang Content-Type: text/plain; charset="UTF-8" Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Tue, Jun 30, 2020 at 10:37 AM Will Deacon wrote: > > Pulling header files directly out of the kernel sources for inclusion in > userspace programs is highly error prone, not least because it bypasses > the kbuild infrastructure entirely and so may end up referencing other > header files that have not been generated. > > Subsequent patches will cause compiler.h to pull in the ungenerated > asm/rwonce.h file via filter.h, breaking the build for tools/bpf: > > | $ make -C tools/bpf > | make: Entering directory '/linux/tools/bpf' > | CC bpf_jit_disasm.o > | LINK bpf_jit_disasm > | CC bpf_dbg.o > | In file included from /linux/include/uapi/linux/filter.h:9, > | from /linux/tools/bpf/bpf_dbg.c:41: > | /linux/include/linux/compiler.h:247:10: fatal error: asm/rwonce.h: No such file or directory > | #include > | ^~~~~~~~~~~~~~ > | compilation terminated. > | make: *** [Makefile:61: bpf_dbg.o] Error 1 > | make: Leaving directory '/linux/tools/bpf' > > Take a copy of the installed version of linux/filter.h (i.e. the one > created by the 'headers_install' target) into tools/include/uapi/linux/ > and adjust the BPF tool Makefile to reference the local include > directories instead of those in the main source tree. > > Cc: Alexei Starovoitov > Cc: Masahiro Yamada > Suggested-by: Daniel Borkmann > Reported-by: Xiao Yang > Signed-off-by: Will Deacon Acked-by: Alexei Starovoitov