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]
Date:   Sat, 27 Nov 2021 04:55:18 +0800
From:   kernel test robot <lkp@...el.com>
To:     Paolo Abeni <pabeni@...hat.com>, netdev@...r.kernel.org
Cc:     llvm@...ts.linux.dev, kbuild-all@...ts.01.org,
        Alexei Starovoitov <ast@...nel.org>,
        Daniel Borkmann <daniel@...earbox.net>, bpf@...r.kernel.org,
        Toke Høiland-Jørgensen <toke@...hat.com>
Subject: Re: [PATCH net-next v2 2/2] bpf: let bpf_warn_invalid_xdp_action()
 report more info

Hi Paolo,

Thank you for the patch! Perhaps something to improve:

[auto build test WARNING on net-next/master]

url:    https://github.com/0day-ci/linux/commits/Paolo-Abeni/bpf-do-not-WARN-in-bpf_warn_invalid_xdp_action/20211126-192252
base:   https://git.kernel.org/pub/scm/linux/kernel/git/davem/net-next.git 35bf8c86eeb8ae609f61c43aeab3b530fedcf1b4
config: riscv-randconfig-r036-20211126 (https://download.01.org/0day-ci/archive/20211127/202111270414.XuXZgoE5-lkp@intel.com/config)
compiler: clang version 14.0.0 (https://github.com/llvm/llvm-project 5162b558d8c0b542e752b037e72a69d5fd51eb1e)
reproduce (this is a W=1 build):
        wget https://raw.githubusercontent.com/intel/lkp-tests/master/sbin/make.cross -O ~/bin/make.cross
        chmod +x ~/bin/make.cross
        # install riscv cross compiling tool for clang build
        # apt-get install binutils-riscv64-linux-gnu
        # https://github.com/0day-ci/linux/commit/afb829c16c3bd86f86b24c880601cea9e21c5d3e
        git remote add linux-review https://github.com/0day-ci/linux
        git fetch --no-tags linux-review Paolo-Abeni/bpf-do-not-WARN-in-bpf_warn_invalid_xdp_action/20211126-192252
        git checkout afb829c16c3bd86f86b24c880601cea9e21c5d3e
        # save the config file to linux build tree
        mkdir build_dir
        COMPILER_INSTALL_PATH=$HOME/0day COMPILER=clang make.cross W=1 O=build_dir ARCH=riscv SHELL=/bin/bash net/core/

If you fix the issue, kindly add following tag as appropriate
Reported-by: kernel test robot <lkp@...el.com>

All warnings (new ones prefixed by >>):

>> net/core/filter.c:8190:50: warning: address of array 'dev->name' will always evaluate to 'true' [-Wpointer-bool-conversion]
                        act, prog->aux->name, prog->aux->id, dev->name ? dev->name : "");
                                                             ~~~~~^~~~ ~
   include/linux/printk.h:608:42: note: expanded from macro 'pr_warn_once'
           printk_once(KERN_WARNING pr_fmt(fmt), ##__VA_ARGS__)
                                                   ^~~~~~~~~~~
   include/linux/printk.h:589:30: note: expanded from macro 'printk_once'
           DO_ONCE_LITE(printk, fmt, ##__VA_ARGS__)
                                       ^~~~~~~~~~~
   include/linux/once_lite.h:11:32: note: expanded from macro 'DO_ONCE_LITE'
           DO_ONCE_LITE_IF(true, func, ##__VA_ARGS__)
                                         ^~~~~~~~~~~
   include/linux/once_lite.h:19:9: note: expanded from macro 'DO_ONCE_LITE_IF'
                           func(__VA_ARGS__);                              \
                                ^~~~~~~~~~~
   include/linux/printk.h:450:60: note: expanded from macro 'printk'
   #define printk(fmt, ...) printk_index_wrap(_printk, fmt, ##__VA_ARGS__)
                                                              ^~~~~~~~~~~
   include/linux/printk.h:422:19: note: expanded from macro 'printk_index_wrap'
                   _p_func(_fmt, ##__VA_ARGS__);                           \
                                   ^~~~~~~~~~~
   1 warning generated.


vim +8190 net/core/filter.c

  8183	
  8184	void bpf_warn_invalid_xdp_action(struct net_device *dev, struct bpf_prog *prog, u32 act)
  8185	{
  8186		const u32 act_max = XDP_REDIRECT;
  8187	
  8188		pr_warn_once("%s XDP return value %u on prog %s (id %d) dev %s, expect packet loss!\n",
  8189			     act > act_max ? "Illegal" : "Driver unsupported",
> 8190			     act, prog->aux->name, prog->aux->id, dev->name ? dev->name : "");
  8191	}
  8192	EXPORT_SYMBOL_GPL(bpf_warn_invalid_xdp_action);
  8193	

---
0-DAY CI Kernel Test Service, Intel Corporation
https://lists.01.org/hyperkitty/list/kbuild-all@lists.01.org

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ