netdev.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: kernel test robot <lkp@intel.com>
To: Alexander Mikhalitsyn <aleksandr.mikhalitsyn@canonical.com>,
	nhorman@tuxdriver.com
Cc: oe-kbuild-all@lists.linux.dev, davem@davemloft.net,
	Alexander Mikhalitsyn <aleksandr.mikhalitsyn@canonical.com>,
	Daniel Borkmann <daniel@iogearbox.net>,
	Christian Brauner <brauner@kernel.org>,
	Stanislav Fomichev <sdf@google.com>,
	Marcelo Ricardo Leitner <marcelo.leitner@gmail.com>,
	Xin Long <lucien.xin@gmail.com>,
	linux-sctp@vger.kernel.org, linux-kernel@vger.kernel.org,
	netdev@vger.kernel.org
Subject: Re: [PATCH net-next] sctp: add bpf_bypass_getsockopt proto callback
Date: Wed, 10 May 2023 23:06:07 +0800	[thread overview]
Message-ID: <202305102234.u4T0ut0T-lkp@intel.com> (raw)
In-Reply-To: <20230510131527.1244929-1-aleksandr.mikhalitsyn@canonical.com>

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@intel.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

      parent reply	other threads:[~2023-05-10 15:06 UTC|newest]

Thread overview: 8+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2023-05-10 13:15 [PATCH net-next] sctp: add bpf_bypass_getsockopt proto callback Alexander Mikhalitsyn
2023-05-10 14:31 ` Stanislav Fomichev
2023-05-10 14:47   ` Aleksandr Mikhalitsyn
2023-05-10 14:39 ` Marcelo Ricardo Leitner
2023-05-10 14:55   ` Aleksandr Mikhalitsyn
2023-05-10 15:18     ` Marcelo Ricardo Leitner
2023-05-10 21:22       ` Stanislav Fomichev
2023-05-10 15:06 ` kernel test robot [this message]

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=202305102234.u4T0ut0T-lkp@intel.com \
    --to=lkp@intel.com \
    --cc=aleksandr.mikhalitsyn@canonical.com \
    --cc=brauner@kernel.org \
    --cc=daniel@iogearbox.net \
    --cc=davem@davemloft.net \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-sctp@vger.kernel.org \
    --cc=lucien.xin@gmail.com \
    --cc=marcelo.leitner@gmail.com \
    --cc=netdev@vger.kernel.org \
    --cc=nhorman@tuxdriver.com \
    --cc=oe-kbuild-all@lists.linux.dev \
    --cc=sdf@google.com \
    /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).