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  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]
Date:   Wed, 20 May 2020 07:53:34 +0800
From:   kbuild test robot <>
To:     Andrii Nakryiko <>,,,,
        Andrii Nakryiko <>,
        "Paul E . McKenney" <>,
        Jonathan Lemon <>
Subject: Re: [PATCH v2 bpf-next 1/7] bpf: implement BPF ring buffer and
 verifier support for it

Hi Andrii,

I love your patch! Perhaps something to improve:

[auto build test WARNING on bpf-next/master]
[also build test WARNING on next-20200519]
[cannot apply to bpf/master rcu/dev v5.7-rc6]
[if your patch is applied to the wrong git tree, please drop us a note to help
improve the system. BTW, we also suggest to use '--base' option to specify the
base tree in git format-patch, please see]

base: master
config: arm-randconfig-r006-20200519 (attached as .config)
compiler: clang version 11.0.0 ( 135b877874fae96b4372c8a3fbfaa8ff44ff86e3)
        wget -O ~/bin/make.cross
        chmod +x ~/bin/make.cross
        # install arm cross compiling tool for clang build
        # apt-get install binutils-arm-linux-gnueabi
        # save the attached .config to linux build tree
        COMPILER_INSTALL_PATH=$HOME/0day COMPILER=clang make.cross ARCH=arm 

If you fix the issue, kindly add following tag as appropriate
Reported-by: kbuild test robot <>

All warnings (new ones prefixed by >>, old ones prefixed by <<):

>> kernel/bpf/ringbuf.c:133:14: warning: result of comparison of constant 68719464448 with expression of type 'size_t' (aka 'unsigned int') is always false [-Wtautological-constant-out-of-range-compare]
if (data_sz > RINGBUF_MAX_DATA_SZ)
~~~~~~~ ^ ~~~~~~~~~~~~~~~~~~~
1 warning generated.

vim +133 kernel/bpf/ringbuf.c

   126	static struct bpf_ringbuf *bpf_ringbuf_alloc(size_t data_sz, int numa_node)
   127	{
   128		struct bpf_ringbuf *rb;
   130		if (!data_sz || !PAGE_ALIGNED(data_sz))
   131			return ERR_PTR(-EINVAL);
 > 133		if (data_sz > RINGBUF_MAX_DATA_SZ)
   134			return ERR_PTR(-E2BIG);
   136		rb = bpf_ringbuf_area_alloc(data_sz, numa_node);
   137		if (!rb)
   138			return ERR_PTR(-ENOMEM);
   140		spin_lock_init(&rb->spinlock);
   141		init_waitqueue_head(&rb->waitq);
   142		init_irq_work(&rb->work, bpf_ringbuf_notify);
   144		rb->mask = data_sz - 1;
   145		rb->consumer_pos = 0;
   146		rb->producer_pos = 0;
   148		return rb;
   149	}

0-DAY CI Kernel Test Service, Intel Corporation

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

Powered by blists - more mailing lists