From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on gnuweeb.org X-Spam-Level: X-Spam-Status: No, score=-6.2 required=5.0 tests=DKIMWL_WL_HIGH,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,RCVD_IN_DNSWL_HI, RCVD_IN_MSPIKE_H3,RCVD_IN_MSPIKE_WL,SPF_HELO_NONE,SPF_PASS, URIBL_BLOCKED autolearn=ham autolearn_force=no version=3.4.6 Received: from mga01.intel.com (mga01.intel.com [192.55.52.88]) by gnuweeb.org (Postfix) with ESMTPS id 36DE480615 for ; Wed, 10 Aug 2022 20:22:08 +0000 (UTC) Authentication-Results: gnuweeb.org; dkim=pass (2048-bit key; unprotected) header.d=intel.com header.i=@intel.com header.a=rsa-sha256 header.s=Intel header.b=L5V3r3q9; dkim-atps=neutral DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=intel.com; i=@intel.com; q=dns/txt; s=Intel; t=1660162928; x=1691698928; h=date:from:to:cc:subject:message-id:mime-version; bh=mn31Ly6w4U+2LUKtUn3Ca6HRlas2AGr0uA6OzH8UfHE=; b=L5V3r3q9DUW9n6hNYePVDwKeRSluc/bcAt+neX2pCnVVaK5MFSiEOrBG 40w8J1s+pLNGe6Egg3daDweDCNg3iR/V2QuBQXGSnr8whJu/hdQSm4oVG IgatJx5JmGea8Rew09xbY/lkxpaQKLjS9TYYObgyXHYGMHANjwGaIDnkR uGM9SSxvXnAZycQoMxyI+Vhpf6hkCAFUdAi0L2QALULREfzFTvg2qgk3d do0om6LGOb0BVl4ZBxfiyifZim0l9x5FCwQcIjhQ+mVtPp0zLmChaUCXR Pitrc2rFt1hDHic2hBJr5/iSP+BAr5bqhP4/Sm+kuk7mag8B7zSM+xOff w==; X-IronPort-AV: E=McAfee;i="6400,9594,10435"; a="317138960" X-IronPort-AV: E=Sophos;i="5.93,228,1654585200"; d="scan'208";a="317138960" Received: from orsmga008.jf.intel.com ([10.7.209.65]) by fmsmga101.fm.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 10 Aug 2022 13:22:07 -0700 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.93,228,1654585200"; d="scan'208";a="633920614" Received: from lkp-server02.sh.intel.com (HELO 5d6b42aa80b8) ([10.239.97.151]) by orsmga008.jf.intel.com with ESMTP; 10 Aug 2022 13:22:05 -0700 Received: from kbuild by 5d6b42aa80b8 with local (Exim 4.96) (envelope-from ) id 1oLsDN-0000gR-0h; Wed, 10 Aug 2022 20:22:05 +0000 Date: Thu, 11 Aug 2022 04:21:54 +0800 From: kernel test robot To: Alexei Starovoitov Cc: kbuild-all@lists.01.org, Ammar Faizi , GNU/Weeb Mailing List , linux-kernel@vger.kernel.org Subject: [ammarfaizi2-block:bpf/bpf/master 1/2] kernel/bpf/syscall.c:5089:5: warning: no previous prototype for 'kern_sys_bpf' Message-ID: <202208110432.CI0a5IwF-lkp@intel.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline List-Id: tree: https://github.com/ammarfaizi2/linux-block bpf/bpf/master head: 86f44fcec22ce2979507742bc53db8400e454f46 commit: 86f44fcec22ce2979507742bc53db8400e454f46 [1/2] bpf: Disallow bpf programs call prog_run command. config: i386-allyesconfig (https://download.01.org/0day-ci/archive/20220811/202208110432.CI0a5IwF-lkp@intel.com/config) compiler: gcc-11 (Debian 11.3.0-3) 11.3.0 reproduce (this is a W=1 build): # https://github.com/ammarfaizi2/linux-block/commit/86f44fcec22ce2979507742bc53db8400e454f46 git remote add ammarfaizi2-block https://github.com/ammarfaizi2/linux-block git fetch --no-tags ammarfaizi2-block bpf/bpf/master git checkout 86f44fcec22ce2979507742bc53db8400e454f46 # save the config file mkdir build_dir && cp config build_dir/.config make W=1 O=build_dir ARCH=i386 SHELL=/bin/bash kernel/bpf/ If you fix the issue, kindly add following tag where applicable Reported-by: kernel test robot All warnings (new ones prefixed by >>): >> kernel/bpf/syscall.c:5089:5: warning: no previous prototype for 'kern_sys_bpf' [-Wmissing-prototypes] 5089 | int kern_sys_bpf(int cmd, union bpf_attr *attr, unsigned int size) | ^~~~~~~~~~~~ vim +/kern_sys_bpf +5089 kernel/bpf/syscall.c 5088 > 5089 int kern_sys_bpf(int cmd, union bpf_attr *attr, unsigned int size) 5090 { 5091 struct bpf_prog * __maybe_unused prog; 5092 struct bpf_tramp_run_ctx __maybe_unused run_ctx; 5093 5094 switch (cmd) { 5095 #ifdef CONFIG_BPF_JIT /* __bpf_prog_enter_sleepable used by trampoline and JIT */ 5096 case BPF_PROG_TEST_RUN: 5097 if (attr->test.data_in || attr->test.data_out || 5098 attr->test.ctx_out || attr->test.duration || 5099 attr->test.repeat || attr->test.flags) 5100 return -EINVAL; 5101 5102 prog = bpf_prog_get_type(attr->test.prog_fd, BPF_PROG_TYPE_SYSCALL); 5103 if (IS_ERR(prog)) 5104 return PTR_ERR(prog); 5105 5106 if (attr->test.ctx_size_in < prog->aux->max_ctx_offset || 5107 attr->test.ctx_size_in > U16_MAX) { 5108 bpf_prog_put(prog); 5109 return -EINVAL; 5110 } 5111 5112 run_ctx.bpf_cookie = 0; 5113 run_ctx.saved_run_ctx = NULL; 5114 if (!__bpf_prog_enter_sleepable(prog, &run_ctx)) { 5115 /* recursion detected */ 5116 bpf_prog_put(prog); 5117 return -EBUSY; 5118 } 5119 attr->test.retval = bpf_prog_run(prog, (void *) (long) attr->test.ctx_in); 5120 __bpf_prog_exit_sleepable(prog, 0 /* bpf_prog_run does runtime stats */, &run_ctx); 5121 bpf_prog_put(prog); 5122 return 0; 5123 #endif 5124 default: 5125 return ____bpf_sys_bpf(cmd, attr, size); 5126 } 5127 } 5128 EXPORT_SYMBOL(kern_sys_bpf); 5129 -- 0-DAY CI Kernel Test Service https://01.org/lkp