From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-4.1 required=3.0 tests=DKIM_SIGNED,DKIM_VALID, DKIM_VALID_AU,FREEMAIL_FORGED_FROMDOMAIN,FREEMAIL_FROM, HEADER_FROM_DIFFERENT_DOMAINS,MAILING_LIST_MULTI,SIGNED_OFF_BY,SPF_HELO_NONE, SPF_PASS,URIBL_BLOCKED autolearn=no autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id D2949C433E0 for ; Wed, 1 Jul 2020 16:39:02 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by mail.kernel.org (Postfix) with ESMTP id AD02920781 for ; Wed, 1 Jul 2020 16:39:02 +0000 (UTC) Authentication-Results: mail.kernel.org; dkim=pass (2048-bit key) header.d=gmail.com header.i=@gmail.com header.b="XZM+72gc" Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1732486AbgGAQjA (ORCPT ); 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-Google-Smtp-Source: ABdhPJzhx/RMYa6L4vtQ0mrLwEP+eiVOtfSbexChh9nnu3NLhEZwqxpST5gp2Olwx3jPShY2dcl1VBrf6CxD/I+pfWE= 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 From mboxrd@z Thu Jan 1 00:00:00 1970 From: Alexei Starovoitov Subject: Re: [PATCH 01/18] tools: bpf: Use local copy of headers including uapi/linux/filter.h Date: Wed, 1 Jul 2020 09:38:46 -0700 Message-ID: References: <20200630173734.14057-1-will@kernel.org> <20200630173734.14057-2-will@kernel.org> Mime-Version: 1.0 Content-Type: text/plain; charset="UTF-8" Return-path: In-Reply-To: <20200630173734.14057-2-will@kernel.org> Sender: linux-alpha-owner@vger.kernel.org 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 List-Id: virtualization@lists.linuxfoundation.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 From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-4.0 required=3.0 tests=DKIM_ADSP_CUSTOM_MED, DKIM_SIGNED,DKIM_VALID,FREEMAIL_FORGED_FROMDOMAIN,FREEMAIL_FROM, HEADER_FROM_DIFFERENT_DOMAINS,MAILING_LIST_MULTI,SIGNED_OFF_BY,SPF_HELO_NONE, SPF_PASS,URIBL_BLOCKED autolearn=no autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id D195AC433E0 for ; Wed, 1 Jul 2020 16:40:36 +0000 (UTC) Received: from merlin.infradead.org (merlin.infradead.org [205.233.59.134]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPS id 9973520853 for ; Wed, 1 Jul 2020 16:40:36 +0000 (UTC) Authentication-Results: mail.kernel.org; dkim=pass (2048-bit key) header.d=lists.infradead.org header.i=@lists.infradead.org header.b="oKYcTgXV"; dkim=fail reason="signature verification failed" (2048-bit key) header.d=gmail.com header.i=@gmail.com header.b="XZM+72gc" DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org 9973520853 Authentication-Results: mail.kernel.org; dmarc=fail (p=none dis=none) header.from=gmail.com Authentication-Results: mail.kernel.org; spf=none smtp.mailfrom=linux-arm-kernel-bounces+linux-arm-kernel=archiver.kernel.org@lists.infradead.org DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=merlin.20170209; h=Sender:Content-Transfer-Encoding: Content-Type:Cc:List-Subscribe:List-Help:List-Post:List-Archive: List-Unsubscribe:List-Id:To:Subject:Message-ID:Date:From:In-Reply-To: References:MIME-Version:Reply-To:Content-ID:Content-Description:Resent-Date: Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID:List-Owner; bh=SVz/FbisR5Ko4XrOnxlK2mKqx63Nymk+U8o0u34Mtc8=; b=oKYcTgXVFWZvEArIz2iTOlXVT gtFDoewd9htA1LNOaawnFoJtigJQVqUECOd4m8Lcdop/dTR0TaHKBxs9SWM4FPAuhadlRCV1QXkL3 hQ8AifV3YODiLeUcDmZckVH+dUOBA8kxL1pshMmV7l7Dl1Ax6HNhTLmxcgpReneSHBgPYXLcPw7s9 TNp+sWRLUkvmtRJd/84kMfbNWyl0akahCj0FTbK9Ffx3iNsWFYSMDfqYwifWQECeYIRDoTT+ZbYAJ WXK+Y31WIGitG+f9ZqwLDEsiABK6szYaPaQCuFeS1B0q22TeK9+50HZakWPkNU9yDXLi8fDVtTzpv EAJKA2Tyw==; Received: from localhost ([::1] helo=merlin.infradead.org) by merlin.infradead.org with esmtp (Exim 4.92.3 #3 (Red Hat Linux)) id 1jqflF-0002QX-VH; Wed, 01 Jul 2020 16:39:01 +0000 Received: from mail-lf1-x144.google.com ([2a00:1450:4864:20::144]) by merlin.infradead.org with esmtps (Exim 4.92.3 #3 (Red Hat Linux)) id 1jqflE-0002Pk-Eu for linux-arm-kernel@lists.infradead.org; Wed, 01 Jul 2020 16:39:01 +0000 Received: by mail-lf1-x144.google.com with SMTP id c11so14063207lfh.8 for ; 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=cjquV+WBR3mPMaL5RJx02Iuk2RzFF2uTn6DuHEbvWebnc+KBBYZPVDkCznOCZo81Nf J5zcU1fELblsM/XjMHJ5v3WyiG1SGvzIRvcuI4AWMYaJL3LPsMokNY3f1jWVb5DRu93q dHtthEnawgA8LUq4rsc6L/UR14RGKJwU2hCGQZ5JddCBj5JbNBkE9h8+0v2si+7w1cwn RHlgihtDUsk4TkNouhOR4nI5BCfZqEz07jLT7Mth5ZdtkIBsUG3ROJqq+cJ/vNgf1lyC m3bncMH5BXlasb9AwqXvdR2zDnHANtXZSRsIuUz0GIgHhDUl0iGm/zJs0N9gymIPI80W S3zw== X-Gm-Message-State: AOAM533GLk4wlkFBnVV8W2GmJsXmpoTObkIEwx0mb1Qz+JUe/ixdwS+m SxvfQL65oCgst3T5WL5QYGLnJqsdNJ0Q3ysvrlI= X-Google-Smtp-Source: ABdhPJzhx/RMYa6L4vtQ0mrLwEP+eiVOtfSbexChh9nnu3NLhEZwqxpST5gp2Olwx3jPShY2dcl1VBrf6CxD/I+pfWE= 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 X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20200701_123900_526970_2ED676E0 X-CRM114-Status: GOOD ( 18.35 ) X-BeenThere: linux-arm-kernel@lists.infradead.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: Mark Rutland , "Michael S. Tsirkin" , Peter Zijlstra , Catalin Marinas , Jason Wang , Xiao Yang , Alexei Starovoitov , virtualization@lists.linux-foundation.org, Masahiro Yamada , Arnd Bergmann , Daniel Borkmann , Alan Stern , Sami Tolvanen , Matt Turner , Android Kernel Team , Marco Elver , Kees Cook , "Paul E. McKenney" , Boqun Feng , Josh Triplett , Ivan Kokshaysky , linux-arm-kernel , Richard Henderson , Nick Desaulniers , LKML , linux-alpha@vger.kernel.org Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Sender: "linux-arm-kernel" Errors-To: linux-arm-kernel-bounces+linux-arm-kernel=archiver.kernel.org@lists.infradead.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 _______________________________________________ linux-arm-kernel mailing list linux-arm-kernel@lists.infradead.org http://lists.infradead.org/mailman/listinfo/linux-arm-kernel From mboxrd@z Thu Jan 1 00:00:00 1970 From: Alexei Starovoitov Subject: Re: [PATCH 01/18] tools: bpf: Use local copy of headers including uapi/linux/filter.h Date: Wed, 1 Jul 2020 09:38:46 -0700 Message-ID: References: <20200630173734.14057-1-will@kernel.org> <20200630173734.14057-2-will@kernel.org> Mime-Version: 1.0 Return-path: 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== In-Reply-To: <20200630173734.14057-2-will@kernel.org> Sender: linux-alpha-owner@vger.kernel.org List-ID: Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit 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 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