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: Wed, 10 May 2023 23:06:07 +0800
From: kernel test robot <lkp@...el.com>
To: Alexander Mikhalitsyn <aleksandr.mikhalitsyn@...onical.com>,
	nhorman@...driver.com
Cc: oe-kbuild-all@...ts.linux.dev, davem@...emloft.net,
	Alexander Mikhalitsyn <aleksandr.mikhalitsyn@...onical.com>,
	Daniel Borkmann <daniel@...earbox.net>,
	Christian Brauner <brauner@...nel.org>,
	Stanislav Fomichev <sdf@...gle.com>,
	Marcelo Ricardo Leitner <marcelo.leitner@...il.com>,
	Xin Long <lucien.xin@...il.com>, linux-sctp@...r.kernel.org,
	linux-kernel@...r.kernel.org, netdev@...r.kernel.org
Subject: Re: [PATCH net-next] sctp: add bpf_bypass_getsockopt proto callback

Hi Alexander,

kernel test robot noticed the following build warnings:

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

url:    https://github.com/intel-lab-lkp/linux/commits/Alexander-Mikhalitsyn/sctp-add-bpf_bypass_getsockopt-proto-callback/20230510-211646
base:   net-next/main
patch link:    https://lore.kernel.org/r/20230510131527.1244929-1-aleksandr.mikhalitsyn%40canonical.com
patch subject: [PATCH net-next] sctp: add bpf_bypass_getsockopt proto callback
config: m68k-defconfig (https://download.01.org/0day-ci/archive/20230510/202305102234.u4T0ut0T-lkp@intel.com/config)
compiler: m68k-linux-gcc (GCC) 12.1.0
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
        # https://github.com/intel-lab-lkp/linux/commit/8ad9818b4b74026fe549b2aa34ea800ab6c8e66d
        git remote add linux-review https://github.com/intel-lab-lkp/linux
        git fetch --no-tags linux-review Alexander-Mikhalitsyn/sctp-add-bpf_bypass_getsockopt-proto-callback/20230510-211646
        git checkout 8ad9818b4b74026fe549b2aa34ea800ab6c8e66d
        # save the config file
        mkdir build_dir && cp config build_dir/.config
        COMPILER_INSTALL_PATH=$HOME/0day COMPILER=gcc-12.1.0 make.cross W=1 O=build_dir ARCH=m68k olddefconfig
        COMPILER_INSTALL_PATH=$HOME/0day COMPILER=gcc-12.1.0 make.cross W=1 O=build_dir ARCH=m68k SHELL=/bin/bash net/sctp/

If you fix the issue, kindly add following tag where applicable
| Reported-by: kernel test robot <lkp@...el.com>
| Link: https://lore.kernel.org/oe-kbuild-all/202305102234.u4T0ut0T-lkp@intel.com/

All warnings (new ones prefixed by >>):

>> net/sctp/socket.c:8284:6: warning: no previous prototype for 'sctp_bpf_bypass_getsockopt' [-Wmissing-prototypes]
    8284 | bool sctp_bpf_bypass_getsockopt(int level, int optname)
         |      ^~~~~~~~~~~~~~~~~~~~~~~~~~


vim +/sctp_bpf_bypass_getsockopt +8284 net/sctp/socket.c

  8283	
> 8284	bool sctp_bpf_bypass_getsockopt(int level, int optname)
  8285	{
  8286		/*
  8287		 * These options do fd_install(), and if BPF_CGROUP_RUN_PROG_GETSOCKOPT
  8288		 * hook returns an error after success of the original handler
  8289		 * sctp_getsockopt(...), userspace will receive an error from getsockopt
  8290		 * syscall and will be not aware that fd was successfully installed into fdtable.
  8291		 *
  8292		 * Let's prevent bpf cgroup hook from running on them.
  8293		 */
  8294		if (level == SOL_SCTP) {
  8295			switch (optname) {
  8296			case SCTP_SOCKOPT_PEELOFF:
  8297			case SCTP_SOCKOPT_PEELOFF_FLAGS:
  8298				return true;
  8299			default:
  8300				return false;
  8301			}
  8302		}
  8303	
  8304		return false;
  8305	}
  8306	

-- 
0-DAY CI Kernel Test Service
https://github.com/intel/lkp-tests

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ