linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Roman Gushchin <guro@fb.com>
To: <netdev@vger.kernel.org>
Cc: <kbuild-all@01.org>, <netdev@vger.kernel.org>,
	<linux-kernel@vger.kernel.org>, <kernel-team@fb.com>,
	<tj@kernel.org>, Alexei Starovoitov <ast@kernel.org>,
	Daniel Borkmann <daniel@iogearbox.net>,
	Sean Young <sean@mess.org>
Subject: Re: [PATCH v2 bpf-next 02/14] bpf: introduce cgroup storage maps
Date: Fri, 6 Jul 2018 14:52:32 -0700	[thread overview]
Message-ID: <20180706215229.GA27634@castle.DHCP.thefacebook.com> (raw)
In-Reply-To: <201807062214.O8pQxWve%fengguang.wu@intel.com>

On Fri, Jul 06, 2018 at 10:42:39PM +0800, kbuild test robot wrote:
> Hi Roman,
> 
> Thank you for the patch! Yet something to improve:
> 
> [auto build test ERROR on bpf-next/master]
> 
> url:    https://github.com/0day-ci/linux/commits/Roman-Gushchin/bpf-cgroup-local-storage/20180706-055938
> base:   https://git.kernel.org/pub/scm/linux/kernel/git/bpf/bpf-next.git master
> config: s390-performance_defconfig (attached as .config)
> compiler: s390x-linux-gnu-gcc (Debian 7.2.0-11) 7.2.0
> reproduce:
>         wget https://urldefense.proofpoint.com/v2/url?u=https-3A__raw.githubusercontent.com_intel_lkp-2Dtests_master_sbin_make.cross&d=DwIBAg&c=5VD0RTtNlTh3ycd41b3MUw&r=jJYgtDM7QT-W-Fz_d29HYQ&m=ImwiAAR6DVyf5JEcIc5VLF9xY4lfFxVuk8_4BN6I03g&s=r0S7gFQPOZVZagshsK0pL3eU8_GRpD1ywrvYfXJ4yBQ&e= -O ~/bin/make.cross
>         chmod +x ~/bin/make.cross
>         # save the attached .config to linux build tree
>         GCC_VERSION=7.2.0 make.cross ARCH=s390 
> 
> All errors (new ones prefixed by >>):
> 
>    In file included from kernel//bpf/local_storage.c:2:0:
>    include/linux/bpf-cgroup.h: In function 'cgroup_bpf_prog_attach':
> >> include/linux/bpf-cgroup.h:237:10: error: 'EINVAL' undeclared (first use in this function)
>      return -EINVAL;
>              ^~~~~~
>    include/linux/bpf-cgroup.h:237:10: note: each undeclared identifier is reported only once for each function it appears in
>    include/linux/bpf-cgroup.h: In function 'cgroup_bpf_prog_detach':
>    include/linux/bpf-cgroup.h:243:10: error: 'EINVAL' undeclared (first use in this function)
>      return -EINVAL;
>              ^~~~~~
>    include/linux/bpf-cgroup.h: In function 'cgroup_bpf_prog_query':
>    include/linux/bpf-cgroup.h:249:10: error: 'EINVAL' undeclared (first use in this function)
>      return -EINVAL;
>              ^~~~~~
> 
> vim +/EINVAL +237 include/linux/bpf-cgroup.h
> 
> 30070984 Daniel Mack 2016-11-23  232  
> fdb5c453 Sean Young  2018-06-19  233  static inline int cgroup_bpf_prog_attach(const union bpf_attr *attr,
> fdb5c453 Sean Young  2018-06-19  234  					 enum bpf_prog_type ptype,
> fdb5c453 Sean Young  2018-06-19  235  					 struct bpf_prog *prog)
> fdb5c453 Sean Young  2018-06-19  236  {
> fdb5c453 Sean Young  2018-06-19 @237  	return -EINVAL;
> fdb5c453 Sean Young  2018-06-19  238  }
> fdb5c453 Sean Young  2018-06-19  239  
> 
> :::::: The code at line 237 was first introduced by commit
> :::::: fdb5c4531c1e0e50e609df83f736b6f3a02896e2 bpf: fix attach type BPF_LIRC_MODE2 dependency wrt CONFIG_CGROUP_BPF
> 
> :::::: TO: Sean Young <sean@mess.org>
> :::::: CC: Daniel Borkmann <daniel@iogearbox.net>

These errors have nothing to do with the cgroup local storage patchset.
They do exist in the current bpf-next tree.
Here is the fix.

Thanks!

--

From c0cd59b969e060765514224e31595763213e40f9 Mon Sep 17 00:00:00 2001
From: Roman Gushchin <guro@fb.com>
Date: Fri, 6 Jul 2018 14:34:29 -0700
Subject: [PATCH bpf-next] bpf: include errno.h from bpf-cgroup.h

Commit fdb5c4531c1e ("bpf: fix attach type BPF_LIRC_MODE2 dependency
wrt CONFIG_CGROUP_BPF") caused some build issues, detected by 0-DAY
kernel test infrastructure.

The problem is that cgroup_bpf_prog_attach/detach/query() functions
can return -EINVAL error code, which is not defined. Fix this adding
errno.h to includes.

Fixes: fdb5c4531c1e ("bpf: fix attach type BPF_LIRC_MODE2 dependency
wrt CONFIG_CGROUP_BPF")
Signed-off-by: Roman Gushchin <guro@fb.com>
Cc: Sean Young <sean@mess.org>
Cc: Daniel Borkmann <daniel@iogearbox.net>
Cc: Alexei Starovoitov <ast@kernel.org>
---
 include/linux/bpf-cgroup.h | 1 +
 1 file changed, 1 insertion(+)

diff --git a/include/linux/bpf-cgroup.h b/include/linux/bpf-cgroup.h
index 79795c5fa7c3..d50c2f0a655a 100644
--- a/include/linux/bpf-cgroup.h
+++ b/include/linux/bpf-cgroup.h
@@ -2,6 +2,7 @@
 #ifndef _BPF_CGROUP_H
 #define _BPF_CGROUP_H
 
+#include <linux/errno.h>
 #include <linux/jump_label.h>
 #include <uapi/linux/bpf.h>
 
-- 
2.14.4


  reply	other threads:[~2018-07-06 21:53 UTC|newest]

Thread overview: 23+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2018-07-05 20:51 [PATCH v2 bpf-next 00/14] bpf: cgroup local storage Roman Gushchin
2018-07-05 20:51 ` [PATCH v2 bpf-next 01/14] bpf: add ability to charge bpf maps memory dynamically Roman Gushchin
2018-07-05 20:51 ` [PATCH v2 bpf-next 02/14] bpf: introduce cgroup storage maps Roman Gushchin
2018-07-06 14:42   ` kbuild test robot
2018-07-06 21:52     ` Roman Gushchin [this message]
2018-07-07 22:35       ` Alexei Starovoitov
2018-07-09  8:37         ` Daniel Borkmann
2018-07-09 18:53           ` Roman Gushchin
2018-07-05 20:51 ` [PATCH v2 bpf-next 03/14] bpf: pass a pointer to a cgroup storage using pcpu variable Roman Gushchin
2018-07-06  7:50   ` kbuild test robot
2018-07-06  9:25   ` kbuild test robot
2018-07-05 20:51 ` [PATCH v2 bpf-next 04/14] bpf: allocate cgroup storage entries on attaching bpf programs Roman Gushchin
2018-07-05 20:51 ` [PATCH v2 bpf-next 05/14] bpf: extend bpf_prog_array to store pointers to the cgroup storage Roman Gushchin
2018-07-06  7:50   ` kbuild test robot
2018-07-05 20:51 ` [PATCH v2 bpf-next 06/14] bpf/verifier: introduce BPF_PTR_TO_MAP_VALUE Roman Gushchin
2018-07-05 20:51 ` [PATCH v2 bpf-next 07/14] bpf: don't allow create maps of cgroup local storages Roman Gushchin
2018-07-05 20:51 ` [PATCH v2 bpf-next 08/14] bpf: introduce the bpf_get_local_storage() helper function Roman Gushchin
2018-07-05 20:51 ` [PATCH v2 bpf-next 09/14] bpf: sync bpf.h to tools/ Roman Gushchin
2018-07-05 20:51 ` [PATCH v2 bpf-next 10/14] bpftool: add support for CGROUP_STORAGE maps Roman Gushchin
2018-07-05 20:51 ` [PATCH v2 bpf-next 11/14] bpf/test_run: support cgroup local storage Roman Gushchin
2018-07-05 20:51 ` [PATCH v2 bpf-next 12/14] selftests/bpf: add verifier cgroup storage tests Roman Gushchin
2018-07-05 20:51 ` [PATCH v2 bpf-next 13/14] selftests/bpf: add a cgroup storage test Roman Gushchin
2018-07-05 20:51 ` [PATCH v2 bpf-next 14/14] samples/bpf: extend test_cgrp2_attach2 test to use cgroup storage Roman Gushchin

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20180706215229.GA27634@castle.DHCP.thefacebook.com \
    --to=guro@fb.com \
    --cc=ast@kernel.org \
    --cc=daniel@iogearbox.net \
    --cc=kbuild-all@01.org \
    --cc=kernel-team@fb.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=netdev@vger.kernel.org \
    --cc=sean@mess.org \
    --cc=tj@kernel.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).