[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <202102060307.eHluKn6A-lkp@intel.com>
Date: Sat, 6 Feb 2021 03:46:39 +0800
From: kernel test robot <lkp@...el.com>
To: Chris Wilson <chris@...is-wilson.co.uk>,
linux-kernel@...r.kernel.org
Cc: kbuild-all@...ts.01.org, Will Drewry <wad@...omium.org>,
Kees Cook <keescook@...omium.org>,
intel-gfx@...ts.freedesktop.org, dri-devel@...ts.freedesktop.org,
Andy Lutomirski <luto@...capital.net>,
Andrew Morton <akpm@...ux-foundation.org>,
Linux Memory Management List <linux-mm@...ck.org>,
Chris Wilson <chris@...is-wilson.co.uk>
Subject: Re: [PATCH] kernel: Expose SYS_kcmp by default
Hi Chris,
Thank you for the patch! Yet something to improve:
[auto build test ERROR on linux/master]
[also build test ERROR on kees/for-next/seccomp kees/for-next/pstore linus/master v5.11-rc6 next-20210125]
[If your patch is applied to the wrong git tree, kindly drop us a note.
And when submitting patch, we suggest to use '--base' as documented in
https://git-scm.com/docs/git-format-patch]
url: https://github.com/0day-ci/linux/commits/Chris-Wilson/kernel-Expose-SYS_kcmp-by-default/20210206-004006
base: https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git 2ab38c17aac10bf55ab3efde4c4db3893d8691d2
config: i386-randconfig-s002-20210205 (attached as .config)
compiler: gcc-9 (Debian 9.3.0-15) 9.3.0
reproduce:
# apt-get install sparse
# sparse version: v0.6.3-215-g0fb77bb6-dirty
# https://github.com/0day-ci/linux/commit/f7694e48ae81aac5a226e74421dbda1dcdc3ca92
git remote add linux-review https://github.com/0day-ci/linux
git fetch --no-tags linux-review Chris-Wilson/kernel-Expose-SYS_kcmp-by-default/20210206-004006
git checkout f7694e48ae81aac5a226e74421dbda1dcdc3ca92
# save the attached .config to linux build tree
make W=1 C=1 CF='-fdiagnostic-prefix -D__CHECK_ENDIAN__' ARCH=i386
If you fix the issue, kindly add following tag as appropriate
Reported-by: kernel test robot <lkp@...el.com>
All error/warnings (new ones prefixed by >>):
kernel/kcmp.c: In function 'kcmp_epoll_target':
>> kernel/kcmp.c:117:13: error: implicit declaration of function 'get_epoll_tfile_raw_ptr'; did you mean 'get_file_raw_ptr'? [-Werror=implicit-function-declaration]
117 | filp_tgt = get_epoll_tfile_raw_ptr(filp_epoll, slot.tfd, slot.toff);
| ^~~~~~~~~~~~~~~~~~~~~~~
| get_file_raw_ptr
>> kernel/kcmp.c:117:11: warning: assignment to 'struct file *' from 'int' makes pointer from integer without a cast [-Wint-conversion]
117 | filp_tgt = get_epoll_tfile_raw_ptr(filp_epoll, slot.tfd, slot.toff);
| ^
cc1: some warnings being treated as errors
vim +117 kernel/kcmp.c
d97b46a64674a2 Cyrill Gorcunov 2012-05-31 96
0791e3644e5ef2 Cyrill Gorcunov 2017-07-12 97 #ifdef CONFIG_EPOLL
0791e3644e5ef2 Cyrill Gorcunov 2017-07-12 98 static int kcmp_epoll_target(struct task_struct *task1,
0791e3644e5ef2 Cyrill Gorcunov 2017-07-12 99 struct task_struct *task2,
0791e3644e5ef2 Cyrill Gorcunov 2017-07-12 100 unsigned long idx1,
0791e3644e5ef2 Cyrill Gorcunov 2017-07-12 101 struct kcmp_epoll_slot __user *uslot)
0791e3644e5ef2 Cyrill Gorcunov 2017-07-12 102 {
0791e3644e5ef2 Cyrill Gorcunov 2017-07-12 103 struct file *filp, *filp_epoll, *filp_tgt;
0791e3644e5ef2 Cyrill Gorcunov 2017-07-12 104 struct kcmp_epoll_slot slot;
0791e3644e5ef2 Cyrill Gorcunov 2017-07-12 105
0791e3644e5ef2 Cyrill Gorcunov 2017-07-12 106 if (copy_from_user(&slot, uslot, sizeof(slot)))
0791e3644e5ef2 Cyrill Gorcunov 2017-07-12 107 return -EFAULT;
0791e3644e5ef2 Cyrill Gorcunov 2017-07-12 108
0791e3644e5ef2 Cyrill Gorcunov 2017-07-12 109 filp = get_file_raw_ptr(task1, idx1);
0791e3644e5ef2 Cyrill Gorcunov 2017-07-12 110 if (!filp)
0791e3644e5ef2 Cyrill Gorcunov 2017-07-12 111 return -EBADF;
0791e3644e5ef2 Cyrill Gorcunov 2017-07-12 112
f43c283a89a7dc Eric W. Biederman 2020-11-20 113 filp_epoll = fget_task(task2, slot.efd);
f43c283a89a7dc Eric W. Biederman 2020-11-20 114 if (!filp_epoll)
0791e3644e5ef2 Cyrill Gorcunov 2017-07-12 115 return -EBADF;
0791e3644e5ef2 Cyrill Gorcunov 2017-07-12 116
0791e3644e5ef2 Cyrill Gorcunov 2017-07-12 @117 filp_tgt = get_epoll_tfile_raw_ptr(filp_epoll, slot.tfd, slot.toff);
0791e3644e5ef2 Cyrill Gorcunov 2017-07-12 118 fput(filp_epoll);
0791e3644e5ef2 Cyrill Gorcunov 2017-07-12 119
0791e3644e5ef2 Cyrill Gorcunov 2017-07-12 120 if (IS_ERR(filp_tgt))
0791e3644e5ef2 Cyrill Gorcunov 2017-07-12 121 return PTR_ERR(filp_tgt);
0791e3644e5ef2 Cyrill Gorcunov 2017-07-12 122
0791e3644e5ef2 Cyrill Gorcunov 2017-07-12 123 return kcmp_ptr(filp, filp_tgt, KCMP_FILE);
0791e3644e5ef2 Cyrill Gorcunov 2017-07-12 124 }
0791e3644e5ef2 Cyrill Gorcunov 2017-07-12 125 #else
0791e3644e5ef2 Cyrill Gorcunov 2017-07-12 126 static int kcmp_epoll_target(struct task_struct *task1,
0791e3644e5ef2 Cyrill Gorcunov 2017-07-12 127 struct task_struct *task2,
0791e3644e5ef2 Cyrill Gorcunov 2017-07-12 128 unsigned long idx1,
0791e3644e5ef2 Cyrill Gorcunov 2017-07-12 129 struct kcmp_epoll_slot __user *uslot)
0791e3644e5ef2 Cyrill Gorcunov 2017-07-12 130 {
0791e3644e5ef2 Cyrill Gorcunov 2017-07-12 131 return -EOPNOTSUPP;
0791e3644e5ef2 Cyrill Gorcunov 2017-07-12 132 }
0791e3644e5ef2 Cyrill Gorcunov 2017-07-12 133 #endif
0791e3644e5ef2 Cyrill Gorcunov 2017-07-12 134
---
0-DAY CI Kernel Test Service, Intel Corporation
https://lists.01.org/hyperkitty/list/kbuild-all@lists.01.org
Download attachment ".config.gz" of type "application/gzip" (31465 bytes)
Powered by blists - more mailing lists