Received: by 2002:a25:8b12:0:0:0:0:0 with SMTP id i18csp562612ybl; Wed, 14 Aug 2019 02:25:19 -0700 (PDT) X-Google-Smtp-Source: APXvYqya7RbDgA0L6scrRO6wMqPHU2ACKn5aYu42iMcqWN1g9Wwa9qbIM5JUmGVAlOaFCfhNfNeg X-Received: by 2002:a17:902:28a2:: with SMTP id f31mr20894786plb.92.1565774719561; Wed, 14 Aug 2019 02:25:19 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1565774719; cv=none; d=google.com; s=arc-20160816; b=zCQ2SPC1IMoTm1DxsAImn632/LP1CS997q4Ri78/WWrJdsQiXcchUS9k4XnmDkZFxq x6MTPhCf7bMWRRsxFf0o4vSHOPfzzUbEUsLWcMbfJQ9INHIDsJt3wB00eJXiCb+8tdbi kADVaDAj+Ra/9YHiwJ3kL2BWEIw6ce26FnI329R98dw8v+Kv9u4LWbwZRAFnr35u6qPQ rM71n6VcUPnxkSBWVytFx2cR42S30nuDaqgsFMV0cmUOjC9Gpi2GM02+VHE1+WojYeUH xOnaNI/X5/Ee8n+eq0fIEMKoS3IMmEr3CmayzVZwZyyUThE8bXXYOxrTEp7bp6qzROy+ KrBA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:user-agent:in-reply-to :content-disposition:mime-version:references:mail-followup-to :message-id:subject:cc:to:from:date:dkim-signature; bh=aubLn8waLrcyH8GiaZ4/P2Bxuaos2txwyKIGB9Gh2j4=; b=pi8u6bC2y+XVpBmrrGBTFU9EzmmVFzpNsGkj2O5CX6pvbGxb9Fo9kPuoMRHwzavaBu aHnwKV6ZTwCqO6+iSpDOVzKVo87OJo5+ks8HX+V2TrGD6NvX5PoohZ+sQMgBlIHrLUT0 a+O+knxliFvyyStn2IoysapumX6OCkzWPVht4mAWKL+DTk/psA84Wa2qlmyPO2vVXCq/ DYE/STCc4hYkr5csXuR0Ci8LY1CO8pVhOpA1MX8y5VWnAO4zykiq9va4y/rzooxJfs4n EycbwnpSU5ZOqEqQMM6BRTwlhZ36eRijmpnANj8msTBgXTOF3UYgWAaAKaKfJ2bI9/sj fCkA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=Ul21S1li; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linaro.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id b11si59181520plz.307.2019.08.14.02.25.04; Wed, 14 Aug 2019 02:25:19 -0700 (PDT) Received-SPF: pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=Ul21S1li; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linaro.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1726760AbfHNJYK (ORCPT + 99 others); Wed, 14 Aug 2019 05:24:10 -0400 Received: from mail-lf1-f65.google.com ([209.85.167.65]:35515 "EHLO mail-lf1-f65.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1725828AbfHNJYK (ORCPT ); Wed, 14 Aug 2019 05:24:10 -0400 Received: by mail-lf1-f65.google.com with SMTP id p197so78783768lfa.2 for ; Wed, 14 Aug 2019 02:24:09 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; h=date:from:to:cc:subject:message-id:mail-followup-to:references :mime-version:content-disposition:in-reply-to:user-agent; bh=aubLn8waLrcyH8GiaZ4/P2Bxuaos2txwyKIGB9Gh2j4=; b=Ul21S1lis1op8IKkes8RTEHlbkQVCappEErZbRKZ/80yD1dIJHnrjhrJnVl4ZjcgQH rErzc0XkGd3wrTdwfUdIqtGvVaKXlsAL1m25p/glBIDFtz01bh1s/XQsqo/IyGGEj5kP RSxwcnLmToLQfB2ZKWBlOqKh0IPrXdJi5KrOiDyC+8W95WCPep6e3aHN44Zbuq2CcccP f9Wd/C4An7+1P9XofbNvxTIhq317PFTTEav1onpxaVYmC8HJj+Zi6gHx+48H17X2Jhso JeveMcqq/+MMTR/VleApLzuBEw8Z2wlSbWOQLjtVwogWboOdh3cwse5vyml1MlxjXGi4 ZDkg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:date:from:to:cc:subject:message-id :mail-followup-to:references:mime-version:content-disposition :in-reply-to:user-agent; bh=aubLn8waLrcyH8GiaZ4/P2Bxuaos2txwyKIGB9Gh2j4=; b=coAi8geGX9oYAwooMK03il9hyNgPCUnJPz/x2aYNuhNh2bCyryueRAKFcEd5BnDv+Q kkB7UzA3ZhvyffFIivzWxS7Tn/CrvOtXoUhvO+dL0dbUlf4qf4IANbG5H5X4H4RiUX8t 8shgfaHUrKrf39plJMKzkmeSbNjOjdRjm5zInu2lx1TIg4OCHCQxAangJPWRtOPYnkMV tlZ4oVa21bSfrwFyuuzMwLfRBb1cxeCczYarEDFtMLsTtblvWTEOUHeQLWhdh1kXvbSs 8oYIeXXCXdlyIyBwZ+yx0ssx+MMUFyhvJOc1WWVUFoAHvJcJVkePvXsoQhAXniWQIrVq WQJQ== X-Gm-Message-State: APjAAAXZ1JnFjiobuL8kj6i+7y8c6vnnUVTw+Sf9wfdYBxhG7dw/DLtW so0oez8X4uR/1z+tKezImV47V2JECh8= X-Received: by 2002:a19:6d02:: with SMTP id i2mr24317533lfc.191.1565774648121; Wed, 14 Aug 2019 02:24:08 -0700 (PDT) Received: from khorivan (168-200-94-178.pool.ukrtel.net. [178.94.200.168]) by smtp.gmail.com with ESMTPSA id r23sm228169ljm.59.2019.08.14.02.24.06 (version=TLS1_2 cipher=ECDHE-RSA-CHACHA20-POLY1305 bits=256/256); Wed, 14 Aug 2019 02:24:07 -0700 (PDT) Date: Wed, 14 Aug 2019 12:24:05 +0300 From: Ivan Khoronzhuk To: Andrii Nakryiko Cc: Magnus Karlsson , =?iso-8859-1?Q?Bj=F6rn_T=F6pel?= , "David S. Miller" , Jesper Dangaard Brouer , john fastabend , Jakub Kicinski , Daniel Borkmann , Networking , bpf , xdp-newbies@vger.kernel.org, open list Subject: Re: [PATCH bpf-next 1/3] libbpf: add asm/unistd.h to xsk to get __NR_mmap2 Message-ID: <20190814092403.GA4142@khorivan> Mail-Followup-To: Andrii Nakryiko , Magnus Karlsson , =?iso-8859-1?Q?Bj=F6rn_T=F6pel?= , "David S. Miller" , Jesper Dangaard Brouer , john fastabend , Jakub Kicinski , Daniel Borkmann , Networking , bpf , xdp-newbies@vger.kernel.org, open list References: <20190813102318.5521-1-ivan.khoronzhuk@linaro.org> <20190813102318.5521-2-ivan.khoronzhuk@linaro.org> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii; format=flowed Content-Disposition: inline In-Reply-To: User-Agent: Mutt/1.9.4 (2018-02-28) Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Tue, Aug 13, 2019 at 04:38:13PM -0700, Andrii Nakryiko wrote: Hi, Andrii >On Tue, Aug 13, 2019 at 3:24 AM Ivan Khoronzhuk > wrote: >> >> That's needed to get __NR_mmap2 when mmap2 syscall is used. >> >> Signed-off-by: Ivan Khoronzhuk >> --- >> tools/lib/bpf/xsk.c | 1 + >> 1 file changed, 1 insertion(+) >> >> diff --git a/tools/lib/bpf/xsk.c b/tools/lib/bpf/xsk.c >> index 5007b5d4fd2c..f2fc40f9804c 100644 >> --- a/tools/lib/bpf/xsk.c >> +++ b/tools/lib/bpf/xsk.c >> @@ -12,6 +12,7 @@ >> #include >> #include >> #include >> +#include > >asm/unistd.h is not present in Github libbpf projection. Is there any Look on includes from tools/lib/bpf/libpf.c tools/lib/bpf/bpf.c That's how it's done... Copping headers to arch/arm will not solve this, it includes both of them anyway, and anyway it needs asm/unistd.h inclusion here, only because xsk.c needs __NR_* >way to avoid including this header? Generally, libbpf can't easily use >all of kernel headers, we need to re-implemented all the extra used >stuff for Github version of libbpf, so we try to minimize usage of new >headers that are not just plain uapi headers from include/uapi. Yes I know, it's far away from real number of changes needed. I faced enough about this already and kernel headers, especially for arm32 it's a bit decency problem. But this patch it's part of normal one. I have couple issues despite this normally fixed mmap2 that is the same even if uapi includes are coppied to tools/arch/arm. In continuation of kernel headers inclusion and arm build: For instance, what about this rough "kernel headers" hack: https://github.com/ikhorn/af_xdp_stuff/commit/aa645ccca4d844f404ec3c2b27402d4d7848d1b5 or this one related for arm32 only: https://github.com/ikhorn/af_xdp_stuff/commit/2c6c6d538605aac39600dcb3c9b66de11c70b963 I have more... > >> #include >> #include >> #include >> -- >> 2.17.1 >> -- Regards, Ivan Khoronzhuk