lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <201806290939.6SYdVIQ8%fengguang.wu@intel.com>
Date:   Fri, 29 Jun 2018 10:08:05 +0800
From:   kbuild test robot <lkp@...el.com>
To:     Roman Gushchin <guro@...com>
Cc:     kbuild-all@...org, netdev@...r.kernel.org,
        linux-kernel@...r.kernel.org, kernel-team@...com, tj@...nel.org,
        Roman Gushchin <guro@...com>,
        Alexei Starovoitov <ast@...nel.org>,
        Daniel Borkmann <daniel@...earbox.net>
Subject: Re: [PATCH bpf-next 03/14] bpf: pass a pointer to a cgroup storage
 using pcpu variable

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/20180629-031527
base:   https://git.kernel.org/pub/scm/linux/kernel/git/bpf/bpf-next.git master
config: parisc-allyesconfig (attached as .config)
compiler: hppa-linux-gnu-gcc (Debian 7.2.0-11) 7.2.0
reproduce:
        wget https://raw.githubusercontent.com/intel/lkp-tests/master/sbin/make.cross -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=parisc 

All error/warnings (new ones prefixed by >>):

   In file included from include/linux/compiler_types.h:58:0,
                    from <command-line>:0:
   include/linux/bpf-cgroup.h: In function 'bpf_cgroup_storage_set':
>> include/asm-generic/percpu.h:31:40: error: implicit declaration of function 'raw_smp_processor_id' [-Werror=implicit-function-declaration]
    #define __my_cpu_offset per_cpu_offset(raw_smp_processor_id())
                                           ^
   include/linux/compiler-gcc.h:54:26: note: in definition of macro 'RELOC_HIDE'
     (typeof(ptr)) (__ptr + (off));     \
                             ^~~
   include/asm-generic/percpu.h:44:31: note: in expansion of macro 'SHIFT_PERCPU_PTR'
    #define arch_raw_cpu_ptr(ptr) SHIFT_PERCPU_PTR(ptr, __my_cpu_offset)
                                  ^~~~~~~~~~~~~~~~
   include/asm-generic/percpu.h:31:25: note: in expansion of macro 'per_cpu_offset'
    #define __my_cpu_offset per_cpu_offset(raw_smp_processor_id())
                            ^~~~~~~~~~~~~~
>> include/asm-generic/percpu.h:44:53: note: in expansion of macro '__my_cpu_offset'
    #define arch_raw_cpu_ptr(ptr) SHIFT_PERCPU_PTR(ptr, __my_cpu_offset)
                                                        ^~~~~~~~~~~~~~~
>> include/linux/percpu-defs.h:244:2: note: in expansion of macro 'arch_raw_cpu_ptr'
     arch_raw_cpu_ptr(ptr);      \
     ^~~~~~~~~~~~~~~~
>> include/asm-generic/percpu.h:76:3: note: in expansion of macro 'raw_cpu_ptr'
     *raw_cpu_ptr(&(pcp)) op val;     \
      ^~~~~~~~~~~
>> include/asm-generic/percpu.h:152:2: note: in expansion of macro 'raw_cpu_generic_to_op'
     raw_cpu_generic_to_op(pcp, val, op);    \
     ^~~~~~~~~~~~~~~~~~~~~
>> include/asm-generic/percpu.h:337:36: note: in expansion of macro 'this_cpu_generic_to_op'
    #define this_cpu_write_1(pcp, val) this_cpu_generic_to_op(pcp, val, =)
                                       ^~~~~~~~~~~~~~~~~~~~~~
>> include/linux/percpu-defs.h:379:11: note: in expansion of macro 'this_cpu_write_1'
      case 1: stem##1(variable, __VA_ARGS__);break;  \
              ^~~~
>> include/linux/percpu-defs.h:510:34: note: in expansion of macro '__pcpu_size_call'
    #define this_cpu_write(pcp, val) __pcpu_size_call(this_cpu_write_, pcp, val)
                                     ^~~~~~~~~~~~~~~~
>> include/linux/bpf-cgroup.h:109:2: note: in expansion of macro 'this_cpu_write'
     this_cpu_write(bpf_cgroup_storage, &buf->data[0]);
     ^~~~~~~~~~~~~~
   cc1: some warnings being treated as errors

vim +/this_cpu_write +109 include/linux/bpf-cgroup.h

    66	
    67	int __cgroup_bpf_attach(struct cgroup *cgrp, struct bpf_prog *prog,
    68				enum bpf_attach_type type, u32 flags);
    69	int __cgroup_bpf_detach(struct cgroup *cgrp, struct bpf_prog *prog,
    70				enum bpf_attach_type type, u32 flags);
    71	int __cgroup_bpf_query(struct cgroup *cgrp, const union bpf_attr *attr,
    72			       union bpf_attr __user *uattr);
    73	
    74	/* Wrapper for __cgroup_bpf_*() protected by cgroup_mutex */
    75	int cgroup_bpf_attach(struct cgroup *cgrp, struct bpf_prog *prog,
    76			      enum bpf_attach_type type, u32 flags);
    77	int cgroup_bpf_detach(struct cgroup *cgrp, struct bpf_prog *prog,
    78			      enum bpf_attach_type type, u32 flags);
    79	int cgroup_bpf_query(struct cgroup *cgrp, const union bpf_attr *attr,
    80			     union bpf_attr __user *uattr);
    81	
    82	int __cgroup_bpf_run_filter_skb(struct sock *sk,
    83					struct sk_buff *skb,
    84					enum bpf_attach_type type);
    85	
    86	int __cgroup_bpf_run_filter_sk(struct sock *sk,
    87				       enum bpf_attach_type type);
    88	
    89	int __cgroup_bpf_run_filter_sock_addr(struct sock *sk,
    90					      struct sockaddr *uaddr,
    91					      enum bpf_attach_type type,
    92					      void *t_ctx);
    93	
    94	int __cgroup_bpf_run_filter_sock_ops(struct sock *sk,
    95					     struct bpf_sock_ops_kern *sock_ops,
    96					     enum bpf_attach_type type);
    97	
    98	int __cgroup_bpf_check_dev_permission(short dev_type, u32 major, u32 minor,
    99					      short access, enum bpf_attach_type type);
   100	
   101	static inline void bpf_cgroup_storage_set(struct bpf_cgroup_storage *storage)
   102	{
   103		struct bpf_storage_buffer *buf;
   104	
   105		if (!storage)
   106			return;
   107	
   108		buf = rcu_dereference(storage->buf);
 > 109		this_cpu_write(bpf_cgroup_storage, &buf->data[0]);
   110	}
   111	

---
0-DAY kernel test infrastructure                Open Source Technology Center
https://lists.01.org/pipermail/kbuild-all                   Intel Corporation

Download attachment ".config.gz" of type "application/gzip" (53550 bytes)

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ