All of lore.kernel.org
 help / color / mirror / Atom feed
From: kbuild test robot <lkp@intel.com>
To: Christophe Leroy <christophe.leroy@c-s.fr>
Cc: x86@kernel.org, linuxppc-dev@lists.ozlabs.org,
	kbuild-all@lists.01.org, dri-devel@lists.freedesktop.org,
	"H. Peter Anvin" <hpa@zytor.com>,
	linux-kernel@vger.kernel.org,
	Jani Nikula <jani.nikula@linux.intel.com>,
	linux-mm@kvack.org, Ingo Molnar <mingo@redhat.com>,
	Paul Mackerras <paulus@samba.org>,
	Alexander Viro <viro@zeniv.linux.org.uk>,
	linux-fsdevel@vger.kernel.org, Borislav Petkov <bp@alien8.de>,
	Andrew Morton <akpm@linux-foundation.org>,
	Linus Torvalds <torvalds@linux-foundation.org>,
	Thomas Gleixner <tglx@linutronix.de>
Subject: Re: [PATCH v3 2/7] uaccess: Tell user_access_begin() if it's for a write or not
Date: Sat, 25 Jan 2020 22:40:11 +0800	[thread overview]
Message-ID: <202001252253.56iDTPmy%lkp@intel.com> (raw)
In-Reply-To: <e11a8f0670251267f87e3114e0bdbacb1eb72980.1579783936.git.christophe.leroy@c-s.fr>

[-- Attachment #1: Type: text/plain, Size: 6360 bytes --]

Hi Christophe,

Thank you for the patch! Yet something to improve:

[auto build test ERROR on powerpc/next]
[also build test ERROR on tip/x86/core drm-intel/for-linux-next v5.5-rc7]
[cannot apply to linus/master next-20200124]
[if your patch is applied to the wrong git tree, please drop us a note to help
improve the system. BTW, we also suggest to use '--base' option to specify the
base tree in git format-patch, please see https://stackoverflow.com/a/37406982]

url:    https://github.com/0day-ci/linux/commits/Christophe-Leroy/fs-readdir-Fix-filldir-and-filldir64-use-of-user_access_begin/20200125-070606
base:   https://git.kernel.org/pub/scm/linux/kernel/git/powerpc/linux.git next
config: x86_64-randconfig-s0-20200125 (attached as .config)
compiler: gcc-7 (Debian 7.5.0-3) 7.5.0
reproduce:
        # save the attached .config to linux build tree
        make ARCH=x86_64 

If you fix the issue, kindly add following tag
Reported-by: kbuild test robot <lkp@intel.com>

All error/warnings (new ones prefixed by >>):

   kernel/exit.c: In function '__do_sys_waitid':
>> kernel/exit.c:1567:53: error: macro "user_access_begin" passed 3 arguments, but takes just 2
     key = user_access_begin(infop, sizeof(*infop), true);
                                                        ^
>> kernel/exit.c:1567:6: warning: assignment makes integer from pointer without a cast [-Wint-conversion]
     key = user_access_begin(infop, sizeof(*infop), true);
         ^
   kernel/exit.c: In function '__do_compat_sys_waitid':
   kernel/exit.c:1697:53: error: macro "user_access_begin" passed 3 arguments, but takes just 2
     key = user_access_begin(infop, sizeof(*infop), true);
                                                        ^
   kernel/exit.c:1697:6: warning: assignment makes integer from pointer without a cast [-Wint-conversion]
     key = user_access_begin(infop, sizeof(*infop), true);
         ^
--
   kernel/compat.c: In function 'compat_get_bitmap':
>> kernel/compat.c:267:55: error: macro "user_access_begin" passed 3 arguments, but takes just 2
     key = user_access_begin(umask, bitmap_size / 8, false);
                                                          ^
>> kernel/compat.c:267:6: warning: assignment makes integer from pointer without a cast [-Wint-conversion]
     key = user_access_begin(umask, bitmap_size / 8, false);
         ^
   kernel/compat.c: In function 'compat_put_bitmap':
   kernel/compat.c:298:54: error: macro "user_access_begin" passed 3 arguments, but takes just 2
     key = user_access_begin(umask, bitmap_size / 8, true);
                                                         ^
   kernel/compat.c:298:6: warning: assignment makes integer from pointer without a cast [-Wint-conversion]
     key = user_access_begin(umask, bitmap_size / 8, true);
         ^
--
   fs/readdir.c: In function 'filldir':
>> fs/readdir.c:242:58: error: macro "user_access_begin" passed 3 arguments, but takes just 2
     key = user_access_begin(prev, reclen + prev_reclen, true);
                                                             ^
>> fs/readdir.c:242:6: warning: assignment makes integer from pointer without a cast [-Wint-conversion]
     key = user_access_begin(prev, reclen + prev_reclen, true);
         ^
   fs/readdir.c: In function 'filldir64':
   fs/readdir.c:329:58: error: macro "user_access_begin" passed 3 arguments, but takes just 2
     key = user_access_begin(prev, reclen + prev_reclen, true);
                                                             ^
   fs/readdir.c:329:6: warning: assignment makes integer from pointer without a cast [-Wint-conversion]
     key = user_access_begin(prev, reclen + prev_reclen, true);
         ^
--
   lib/usercopy.c: In function 'check_zeroed_user':
>> lib/usercopy.c:62:43: error: macro "user_access_begin" passed 3 arguments, but takes just 2
     key = user_access_begin(from, size, false);
                                              ^
>> lib/usercopy.c:62:6: warning: assignment makes integer from pointer without a cast [-Wint-conversion]
     key = user_access_begin(from, size, false);
         ^
--
   lib/strncpy_from_user.c: In function 'strncpy_from_user':
>> lib/strncpy_from_user.c:120:42: error: macro "user_access_begin" passed 3 arguments, but takes just 2
      key = user_access_begin(src, max, false);
                                             ^
>> lib/strncpy_from_user.c:120:7: warning: assignment makes integer from pointer without a cast [-Wint-conversion]
      key = user_access_begin(src, max, false);
          ^
--
   lib/strnlen_user.c: In function 'strnlen_user':
>> lib/strnlen_user.c:113:42: error: macro "user_access_begin" passed 3 arguments, but takes just 2
      key = user_access_begin(str, max, false);
                                             ^
>> lib/strnlen_user.c:113:7: warning: assignment makes integer from pointer without a cast [-Wint-conversion]
      key = user_access_begin(str, max, false);
          ^

vim +/user_access_begin +1567 kernel/exit.c

  1548	
  1549	SYSCALL_DEFINE5(waitid, int, which, pid_t, upid, struct siginfo __user *,
  1550			infop, int, options, struct rusage __user *, ru)
  1551	{
  1552		struct rusage r;
  1553		struct waitid_info info = {.status = 0};
  1554		long err = kernel_waitid(which, upid, &info, options, ru ? &r : NULL);
  1555		int signo = 0;
  1556		unsigned long key;
  1557	
  1558		if (err > 0) {
  1559			signo = SIGCHLD;
  1560			err = 0;
  1561			if (ru && copy_to_user(ru, &r, sizeof(struct rusage)))
  1562				return -EFAULT;
  1563		}
  1564		if (!infop)
  1565			return err;
  1566	
> 1567		key = user_access_begin(infop, sizeof(*infop), true);
  1568		if (!key)
  1569			return -EFAULT;
  1570	
  1571		unsafe_put_user(signo, &infop->si_signo, Efault);
  1572		unsafe_put_user(0, &infop->si_errno, Efault);
  1573		unsafe_put_user(info.cause, &infop->si_code, Efault);
  1574		unsafe_put_user(info.pid, &infop->si_pid, Efault);
  1575		unsafe_put_user(info.uid, &infop->si_uid, Efault);
  1576		unsafe_put_user(info.status, &infop->si_status, Efault);
  1577		user_access_end(key);
  1578		return err;
  1579	Efault:
  1580		user_access_end(key);
  1581		return -EFAULT;
  1582	}
  1583	

---
0-DAY kernel test infrastructure                 Open Source Technology Center
https://lists.01.org/hyperkitty/list/kbuild-all@lists.01.org Intel Corporation

[-- Attachment #2: .config.gz --]
[-- Type: application/gzip, Size: 38991 bytes --]

WARNING: multiple messages have this Message-ID (diff)
From: kbuild test robot <lkp@intel.com>
To: Christophe Leroy <christophe.leroy@c-s.fr>
Cc: x86@kernel.org, linuxppc-dev@lists.ozlabs.org,
	kbuild-all@lists.01.org, dri-devel@lists.freedesktop.org,
	"H. Peter Anvin" <hpa@zytor.com>,
	linux-kernel@vger.kernel.org, linux-mm@kvack.org,
	Ingo Molnar <mingo@redhat.com>, Paul Mackerras <paulus@samba.org>,
	Alexander Viro <viro@zeniv.linux.org.uk>,
	Michael Ellerman <mpe@ellerman.id.au>,
	linux-fsdevel@vger.kernel.org, Borislav Petkov <bp@alien8.de>,
	Andrew Morton <akpm@linux-foundation.org>,
	Linus Torvalds <torvalds@linux-foundation.org>,
	Thomas Gleixner <tglx@linutronix.de>
Subject: Re: [PATCH v3 2/7] uaccess: Tell user_access_begin() if it's for a write or not
Date: Sat, 25 Jan 2020 22:40:11 +0800	[thread overview]
Message-ID: <202001252253.56iDTPmy%lkp@intel.com> (raw)
In-Reply-To: <e11a8f0670251267f87e3114e0bdbacb1eb72980.1579783936.git.christophe.leroy@c-s.fr>

[-- Attachment #1: Type: text/plain, Size: 6360 bytes --]

Hi Christophe,

Thank you for the patch! Yet something to improve:

[auto build test ERROR on powerpc/next]
[also build test ERROR on tip/x86/core drm-intel/for-linux-next v5.5-rc7]
[cannot apply to linus/master next-20200124]
[if your patch is applied to the wrong git tree, please drop us a note to help
improve the system. BTW, we also suggest to use '--base' option to specify the
base tree in git format-patch, please see https://stackoverflow.com/a/37406982]

url:    https://github.com/0day-ci/linux/commits/Christophe-Leroy/fs-readdir-Fix-filldir-and-filldir64-use-of-user_access_begin/20200125-070606
base:   https://git.kernel.org/pub/scm/linux/kernel/git/powerpc/linux.git next
config: x86_64-randconfig-s0-20200125 (attached as .config)
compiler: gcc-7 (Debian 7.5.0-3) 7.5.0
reproduce:
        # save the attached .config to linux build tree
        make ARCH=x86_64 

If you fix the issue, kindly add following tag
Reported-by: kbuild test robot <lkp@intel.com>

All error/warnings (new ones prefixed by >>):

   kernel/exit.c: In function '__do_sys_waitid':
>> kernel/exit.c:1567:53: error: macro "user_access_begin" passed 3 arguments, but takes just 2
     key = user_access_begin(infop, sizeof(*infop), true);
                                                        ^
>> kernel/exit.c:1567:6: warning: assignment makes integer from pointer without a cast [-Wint-conversion]
     key = user_access_begin(infop, sizeof(*infop), true);
         ^
   kernel/exit.c: In function '__do_compat_sys_waitid':
   kernel/exit.c:1697:53: error: macro "user_access_begin" passed 3 arguments, but takes just 2
     key = user_access_begin(infop, sizeof(*infop), true);
                                                        ^
   kernel/exit.c:1697:6: warning: assignment makes integer from pointer without a cast [-Wint-conversion]
     key = user_access_begin(infop, sizeof(*infop), true);
         ^
--
   kernel/compat.c: In function 'compat_get_bitmap':
>> kernel/compat.c:267:55: error: macro "user_access_begin" passed 3 arguments, but takes just 2
     key = user_access_begin(umask, bitmap_size / 8, false);
                                                          ^
>> kernel/compat.c:267:6: warning: assignment makes integer from pointer without a cast [-Wint-conversion]
     key = user_access_begin(umask, bitmap_size / 8, false);
         ^
   kernel/compat.c: In function 'compat_put_bitmap':
   kernel/compat.c:298:54: error: macro "user_access_begin" passed 3 arguments, but takes just 2
     key = user_access_begin(umask, bitmap_size / 8, true);
                                                         ^
   kernel/compat.c:298:6: warning: assignment makes integer from pointer without a cast [-Wint-conversion]
     key = user_access_begin(umask, bitmap_size / 8, true);
         ^
--
   fs/readdir.c: In function 'filldir':
>> fs/readdir.c:242:58: error: macro "user_access_begin" passed 3 arguments, but takes just 2
     key = user_access_begin(prev, reclen + prev_reclen, true);
                                                             ^
>> fs/readdir.c:242:6: warning: assignment makes integer from pointer without a cast [-Wint-conversion]
     key = user_access_begin(prev, reclen + prev_reclen, true);
         ^
   fs/readdir.c: In function 'filldir64':
   fs/readdir.c:329:58: error: macro "user_access_begin" passed 3 arguments, but takes just 2
     key = user_access_begin(prev, reclen + prev_reclen, true);
                                                             ^
   fs/readdir.c:329:6: warning: assignment makes integer from pointer without a cast [-Wint-conversion]
     key = user_access_begin(prev, reclen + prev_reclen, true);
         ^
--
   lib/usercopy.c: In function 'check_zeroed_user':
>> lib/usercopy.c:62:43: error: macro "user_access_begin" passed 3 arguments, but takes just 2
     key = user_access_begin(from, size, false);
                                              ^
>> lib/usercopy.c:62:6: warning: assignment makes integer from pointer without a cast [-Wint-conversion]
     key = user_access_begin(from, size, false);
         ^
--
   lib/strncpy_from_user.c: In function 'strncpy_from_user':
>> lib/strncpy_from_user.c:120:42: error: macro "user_access_begin" passed 3 arguments, but takes just 2
      key = user_access_begin(src, max, false);
                                             ^
>> lib/strncpy_from_user.c:120:7: warning: assignment makes integer from pointer without a cast [-Wint-conversion]
      key = user_access_begin(src, max, false);
          ^
--
   lib/strnlen_user.c: In function 'strnlen_user':
>> lib/strnlen_user.c:113:42: error: macro "user_access_begin" passed 3 arguments, but takes just 2
      key = user_access_begin(str, max, false);
                                             ^
>> lib/strnlen_user.c:113:7: warning: assignment makes integer from pointer without a cast [-Wint-conversion]
      key = user_access_begin(str, max, false);
          ^

vim +/user_access_begin +1567 kernel/exit.c

  1548	
  1549	SYSCALL_DEFINE5(waitid, int, which, pid_t, upid, struct siginfo __user *,
  1550			infop, int, options, struct rusage __user *, ru)
  1551	{
  1552		struct rusage r;
  1553		struct waitid_info info = {.status = 0};
  1554		long err = kernel_waitid(which, upid, &info, options, ru ? &r : NULL);
  1555		int signo = 0;
  1556		unsigned long key;
  1557	
  1558		if (err > 0) {
  1559			signo = SIGCHLD;
  1560			err = 0;
  1561			if (ru && copy_to_user(ru, &r, sizeof(struct rusage)))
  1562				return -EFAULT;
  1563		}
  1564		if (!infop)
  1565			return err;
  1566	
> 1567		key = user_access_begin(infop, sizeof(*infop), true);
  1568		if (!key)
  1569			return -EFAULT;
  1570	
  1571		unsafe_put_user(signo, &infop->si_signo, Efault);
  1572		unsafe_put_user(0, &infop->si_errno, Efault);
  1573		unsafe_put_user(info.cause, &infop->si_code, Efault);
  1574		unsafe_put_user(info.pid, &infop->si_pid, Efault);
  1575		unsafe_put_user(info.uid, &infop->si_uid, Efault);
  1576		unsafe_put_user(info.status, &infop->si_status, Efault);
  1577		user_access_end(key);
  1578		return err;
  1579	Efault:
  1580		user_access_end(key);
  1581		return -EFAULT;
  1582	}
  1583	

---
0-DAY kernel test infrastructure                 Open Source Technology Center
https://lists.01.org/hyperkitty/list/kbuild-all@lists.01.org Intel Corporation

[-- Attachment #2: .config.gz --]
[-- Type: application/gzip, Size: 38991 bytes --]

[-- Attachment #3: Type: text/plain, Size: 160 bytes --]

_______________________________________________
dri-devel mailing list
dri-devel@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/dri-devel

WARNING: multiple messages have this Message-ID (diff)
From: kbuild test robot <lkp@intel.com>
To: kbuild-all@lists.01.org
Subject: Re: [PATCH v3 2/7] uaccess: Tell user_access_begin() if it's for a write or not
Date: Sat, 25 Jan 2020 22:40:11 +0800	[thread overview]
Message-ID: <202001252253.56iDTPmy%lkp@intel.com> (raw)
In-Reply-To: <e11a8f0670251267f87e3114e0bdbacb1eb72980.1579783936.git.christophe.leroy@c-s.fr>

[-- Attachment #1: Type: text/plain, Size: 6497 bytes --]

Hi Christophe,

Thank you for the patch! Yet something to improve:

[auto build test ERROR on powerpc/next]
[also build test ERROR on tip/x86/core drm-intel/for-linux-next v5.5-rc7]
[cannot apply to linus/master next-20200124]
[if your patch is applied to the wrong git tree, please drop us a note to help
improve the system. BTW, we also suggest to use '--base' option to specify the
base tree in git format-patch, please see https://stackoverflow.com/a/37406982]

url:    https://github.com/0day-ci/linux/commits/Christophe-Leroy/fs-readdir-Fix-filldir-and-filldir64-use-of-user_access_begin/20200125-070606
base:   https://git.kernel.org/pub/scm/linux/kernel/git/powerpc/linux.git next
config: x86_64-randconfig-s0-20200125 (attached as .config)
compiler: gcc-7 (Debian 7.5.0-3) 7.5.0
reproduce:
        # save the attached .config to linux build tree
        make ARCH=x86_64 

If you fix the issue, kindly add following tag
Reported-by: kbuild test robot <lkp@intel.com>

All error/warnings (new ones prefixed by >>):

   kernel/exit.c: In function '__do_sys_waitid':
>> kernel/exit.c:1567:53: error: macro "user_access_begin" passed 3 arguments, but takes just 2
     key = user_access_begin(infop, sizeof(*infop), true);
                                                        ^
>> kernel/exit.c:1567:6: warning: assignment makes integer from pointer without a cast [-Wint-conversion]
     key = user_access_begin(infop, sizeof(*infop), true);
         ^
   kernel/exit.c: In function '__do_compat_sys_waitid':
   kernel/exit.c:1697:53: error: macro "user_access_begin" passed 3 arguments, but takes just 2
     key = user_access_begin(infop, sizeof(*infop), true);
                                                        ^
   kernel/exit.c:1697:6: warning: assignment makes integer from pointer without a cast [-Wint-conversion]
     key = user_access_begin(infop, sizeof(*infop), true);
         ^
--
   kernel/compat.c: In function 'compat_get_bitmap':
>> kernel/compat.c:267:55: error: macro "user_access_begin" passed 3 arguments, but takes just 2
     key = user_access_begin(umask, bitmap_size / 8, false);
                                                          ^
>> kernel/compat.c:267:6: warning: assignment makes integer from pointer without a cast [-Wint-conversion]
     key = user_access_begin(umask, bitmap_size / 8, false);
         ^
   kernel/compat.c: In function 'compat_put_bitmap':
   kernel/compat.c:298:54: error: macro "user_access_begin" passed 3 arguments, but takes just 2
     key = user_access_begin(umask, bitmap_size / 8, true);
                                                         ^
   kernel/compat.c:298:6: warning: assignment makes integer from pointer without a cast [-Wint-conversion]
     key = user_access_begin(umask, bitmap_size / 8, true);
         ^
--
   fs/readdir.c: In function 'filldir':
>> fs/readdir.c:242:58: error: macro "user_access_begin" passed 3 arguments, but takes just 2
     key = user_access_begin(prev, reclen + prev_reclen, true);
                                                             ^
>> fs/readdir.c:242:6: warning: assignment makes integer from pointer without a cast [-Wint-conversion]
     key = user_access_begin(prev, reclen + prev_reclen, true);
         ^
   fs/readdir.c: In function 'filldir64':
   fs/readdir.c:329:58: error: macro "user_access_begin" passed 3 arguments, but takes just 2
     key = user_access_begin(prev, reclen + prev_reclen, true);
                                                             ^
   fs/readdir.c:329:6: warning: assignment makes integer from pointer without a cast [-Wint-conversion]
     key = user_access_begin(prev, reclen + prev_reclen, true);
         ^
--
   lib/usercopy.c: In function 'check_zeroed_user':
>> lib/usercopy.c:62:43: error: macro "user_access_begin" passed 3 arguments, but takes just 2
     key = user_access_begin(from, size, false);
                                              ^
>> lib/usercopy.c:62:6: warning: assignment makes integer from pointer without a cast [-Wint-conversion]
     key = user_access_begin(from, size, false);
         ^
--
   lib/strncpy_from_user.c: In function 'strncpy_from_user':
>> lib/strncpy_from_user.c:120:42: error: macro "user_access_begin" passed 3 arguments, but takes just 2
      key = user_access_begin(src, max, false);
                                             ^
>> lib/strncpy_from_user.c:120:7: warning: assignment makes integer from pointer without a cast [-Wint-conversion]
      key = user_access_begin(src, max, false);
          ^
--
   lib/strnlen_user.c: In function 'strnlen_user':
>> lib/strnlen_user.c:113:42: error: macro "user_access_begin" passed 3 arguments, but takes just 2
      key = user_access_begin(str, max, false);
                                             ^
>> lib/strnlen_user.c:113:7: warning: assignment makes integer from pointer without a cast [-Wint-conversion]
      key = user_access_begin(str, max, false);
          ^

vim +/user_access_begin +1567 kernel/exit.c

  1548	
  1549	SYSCALL_DEFINE5(waitid, int, which, pid_t, upid, struct siginfo __user *,
  1550			infop, int, options, struct rusage __user *, ru)
  1551	{
  1552		struct rusage r;
  1553		struct waitid_info info = {.status = 0};
  1554		long err = kernel_waitid(which, upid, &info, options, ru ? &r : NULL);
  1555		int signo = 0;
  1556		unsigned long key;
  1557	
  1558		if (err > 0) {
  1559			signo = SIGCHLD;
  1560			err = 0;
  1561			if (ru && copy_to_user(ru, &r, sizeof(struct rusage)))
  1562				return -EFAULT;
  1563		}
  1564		if (!infop)
  1565			return err;
  1566	
> 1567		key = user_access_begin(infop, sizeof(*infop), true);
  1568		if (!key)
  1569			return -EFAULT;
  1570	
  1571		unsafe_put_user(signo, &infop->si_signo, Efault);
  1572		unsafe_put_user(0, &infop->si_errno, Efault);
  1573		unsafe_put_user(info.cause, &infop->si_code, Efault);
  1574		unsafe_put_user(info.pid, &infop->si_pid, Efault);
  1575		unsafe_put_user(info.uid, &infop->si_uid, Efault);
  1576		unsafe_put_user(info.status, &infop->si_status, Efault);
  1577		user_access_end(key);
  1578		return err;
  1579	Efault:
  1580		user_access_end(key);
  1581		return -EFAULT;
  1582	}
  1583	

---
0-DAY kernel test infrastructure                 Open Source Technology Center
https://lists.01.org/hyperkitty/list/kbuild-all(a)lists.01.org Intel Corporation

[-- Attachment #2: config.gz --]
[-- Type: application/gzip, Size: 38991 bytes --]

WARNING: multiple messages have this Message-ID (diff)
From: kbuild test robot <lkp@intel.com>
To: Christophe Leroy <christophe.leroy@c-s.fr>
Cc: kbuild-all@lists.01.org,
	Benjamin Herrenschmidt <benh@kernel.crashing.org>,
	Paul Mackerras <paulus@samba.org>,
	Michael Ellerman <mpe@ellerman.id.au>,
	Linus Torvalds <torvalds@linux-foundation.org>,
	Alexander Viro <viro@zeniv.linux.org.uk>,
	Andrew Morton <akpm@linux-foundation.org>,
	Thomas Gleixner <tglx@linutronix.de>,
	Ingo Molnar <mingo@redhat.com>, Borislav Petkov <bp@alien8.de>,
	"H. Peter Anvin" <hpa@zytor.com>,
	Jani Nikula <jani.nikula@linux.intel.com>,
	linux-kernel@vger.kernel.org, linuxppc-dev@lists.ozlabs.org,
	linux-fsdevel@vger.kernel.org, linux-mm@kvack.org,
	dri-devel@lists.freedesktop.org, x86@kernel.org
Subject: Re: [PATCH v3 2/7] uaccess: Tell user_access_begin() if it's for a write or not
Date: Sat, 25 Jan 2020 22:40:11 +0800	[thread overview]
Message-ID: <202001252253.56iDTPmy%lkp@intel.com> (raw)
In-Reply-To: <e11a8f0670251267f87e3114e0bdbacb1eb72980.1579783936.git.christophe.leroy@c-s.fr>

[-- Attachment #1: Type: text/plain, Size: 6360 bytes --]

Hi Christophe,

Thank you for the patch! Yet something to improve:

[auto build test ERROR on powerpc/next]
[also build test ERROR on tip/x86/core drm-intel/for-linux-next v5.5-rc7]
[cannot apply to linus/master next-20200124]
[if your patch is applied to the wrong git tree, please drop us a note to help
improve the system. BTW, we also suggest to use '--base' option to specify the
base tree in git format-patch, please see https://stackoverflow.com/a/37406982]

url:    https://github.com/0day-ci/linux/commits/Christophe-Leroy/fs-readdir-Fix-filldir-and-filldir64-use-of-user_access_begin/20200125-070606
base:   https://git.kernel.org/pub/scm/linux/kernel/git/powerpc/linux.git next
config: x86_64-randconfig-s0-20200125 (attached as .config)
compiler: gcc-7 (Debian 7.5.0-3) 7.5.0
reproduce:
        # save the attached .config to linux build tree
        make ARCH=x86_64 

If you fix the issue, kindly add following tag
Reported-by: kbuild test robot <lkp@intel.com>

All error/warnings (new ones prefixed by >>):

   kernel/exit.c: In function '__do_sys_waitid':
>> kernel/exit.c:1567:53: error: macro "user_access_begin" passed 3 arguments, but takes just 2
     key = user_access_begin(infop, sizeof(*infop), true);
                                                        ^
>> kernel/exit.c:1567:6: warning: assignment makes integer from pointer without a cast [-Wint-conversion]
     key = user_access_begin(infop, sizeof(*infop), true);
         ^
   kernel/exit.c: In function '__do_compat_sys_waitid':
   kernel/exit.c:1697:53: error: macro "user_access_begin" passed 3 arguments, but takes just 2
     key = user_access_begin(infop, sizeof(*infop), true);
                                                        ^
   kernel/exit.c:1697:6: warning: assignment makes integer from pointer without a cast [-Wint-conversion]
     key = user_access_begin(infop, sizeof(*infop), true);
         ^
--
   kernel/compat.c: In function 'compat_get_bitmap':
>> kernel/compat.c:267:55: error: macro "user_access_begin" passed 3 arguments, but takes just 2
     key = user_access_begin(umask, bitmap_size / 8, false);
                                                          ^
>> kernel/compat.c:267:6: warning: assignment makes integer from pointer without a cast [-Wint-conversion]
     key = user_access_begin(umask, bitmap_size / 8, false);
         ^
   kernel/compat.c: In function 'compat_put_bitmap':
   kernel/compat.c:298:54: error: macro "user_access_begin" passed 3 arguments, but takes just 2
     key = user_access_begin(umask, bitmap_size / 8, true);
                                                         ^
   kernel/compat.c:298:6: warning: assignment makes integer from pointer without a cast [-Wint-conversion]
     key = user_access_begin(umask, bitmap_size / 8, true);
         ^
--
   fs/readdir.c: In function 'filldir':
>> fs/readdir.c:242:58: error: macro "user_access_begin" passed 3 arguments, but takes just 2
     key = user_access_begin(prev, reclen + prev_reclen, true);
                                                             ^
>> fs/readdir.c:242:6: warning: assignment makes integer from pointer without a cast [-Wint-conversion]
     key = user_access_begin(prev, reclen + prev_reclen, true);
         ^
   fs/readdir.c: In function 'filldir64':
   fs/readdir.c:329:58: error: macro "user_access_begin" passed 3 arguments, but takes just 2
     key = user_access_begin(prev, reclen + prev_reclen, true);
                                                             ^
   fs/readdir.c:329:6: warning: assignment makes integer from pointer without a cast [-Wint-conversion]
     key = user_access_begin(prev, reclen + prev_reclen, true);
         ^
--
   lib/usercopy.c: In function 'check_zeroed_user':
>> lib/usercopy.c:62:43: error: macro "user_access_begin" passed 3 arguments, but takes just 2
     key = user_access_begin(from, size, false);
                                              ^
>> lib/usercopy.c:62:6: warning: assignment makes integer from pointer without a cast [-Wint-conversion]
     key = user_access_begin(from, size, false);
         ^
--
   lib/strncpy_from_user.c: In function 'strncpy_from_user':
>> lib/strncpy_from_user.c:120:42: error: macro "user_access_begin" passed 3 arguments, but takes just 2
      key = user_access_begin(src, max, false);
                                             ^
>> lib/strncpy_from_user.c:120:7: warning: assignment makes integer from pointer without a cast [-Wint-conversion]
      key = user_access_begin(src, max, false);
          ^
--
   lib/strnlen_user.c: In function 'strnlen_user':
>> lib/strnlen_user.c:113:42: error: macro "user_access_begin" passed 3 arguments, but takes just 2
      key = user_access_begin(str, max, false);
                                             ^
>> lib/strnlen_user.c:113:7: warning: assignment makes integer from pointer without a cast [-Wint-conversion]
      key = user_access_begin(str, max, false);
          ^

vim +/user_access_begin +1567 kernel/exit.c

  1548	
  1549	SYSCALL_DEFINE5(waitid, int, which, pid_t, upid, struct siginfo __user *,
  1550			infop, int, options, struct rusage __user *, ru)
  1551	{
  1552		struct rusage r;
  1553		struct waitid_info info = {.status = 0};
  1554		long err = kernel_waitid(which, upid, &info, options, ru ? &r : NULL);
  1555		int signo = 0;
  1556		unsigned long key;
  1557	
  1558		if (err > 0) {
  1559			signo = SIGCHLD;
  1560			err = 0;
  1561			if (ru && copy_to_user(ru, &r, sizeof(struct rusage)))
  1562				return -EFAULT;
  1563		}
  1564		if (!infop)
  1565			return err;
  1566	
> 1567		key = user_access_begin(infop, sizeof(*infop), true);
  1568		if (!key)
  1569			return -EFAULT;
  1570	
  1571		unsafe_put_user(signo, &infop->si_signo, Efault);
  1572		unsafe_put_user(0, &infop->si_errno, Efault);
  1573		unsafe_put_user(info.cause, &infop->si_code, Efault);
  1574		unsafe_put_user(info.pid, &infop->si_pid, Efault);
  1575		unsafe_put_user(info.uid, &infop->si_uid, Efault);
  1576		unsafe_put_user(info.status, &infop->si_status, Efault);
  1577		user_access_end(key);
  1578		return err;
  1579	Efault:
  1580		user_access_end(key);
  1581		return -EFAULT;
  1582	}
  1583	

---
0-DAY kernel test infrastructure                 Open Source Technology Center
https://lists.01.org/hyperkitty/list/kbuild-all@lists.01.org Intel Corporation

[-- Attachment #2: .config.gz --]
[-- Type: application/gzip, Size: 38991 bytes --]

  parent reply	other threads:[~2020-01-25 14:43 UTC|newest]

Thread overview: 37+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2020-01-23 12:59 [PATCH v3 1/7] fs/readdir: Fix filldir() and filldir64() use of user_access_begin() Christophe Leroy
2020-01-23 12:59 ` Christophe Leroy
2020-01-23 12:59 ` [PATCH v3 2/7] uaccess: Tell user_access_begin() if it's for a write or not Christophe Leroy
2020-01-23 12:59   ` Christophe Leroy
2020-01-23 12:59   ` Christophe Leroy
2020-01-23 13:11   ` Jani Nikula
2020-01-23 13:11     ` Jani Nikula
2020-01-23 13:11     ` Jani Nikula
2020-01-23 18:02   ` Linus Torvalds
2020-01-23 18:02     ` Linus Torvalds
2020-01-23 18:02     ` Linus Torvalds
2020-01-23 19:47     ` christophe leroy
2020-01-23 19:47       ` christophe leroy
2020-01-23 19:47       ` christophe leroy
2020-01-23 19:57       ` Linus Torvalds
2020-01-23 19:57         ` Linus Torvalds
2020-01-23 19:57         ` Linus Torvalds
2020-01-24  2:03         ` hpa
2020-01-24  2:03           ` hpa
2020-01-24  2:03           ` hpa
2020-01-25  6:17     ` Tony Luck
2020-01-25  6:17       ` Tony Luck
2020-01-25  6:17       ` Tony Luck
2020-01-25 14:40   ` kbuild test robot [this message]
2020-01-25 14:40     ` kbuild test robot
2020-01-25 14:40     ` kbuild test robot
2020-01-25 14:40     ` kbuild test robot
2020-01-23 12:59 ` [PATCH v3 3/7] powerpc/32s: Fix bad_kuap_fault() Christophe Leroy
2020-01-23 12:59   ` Christophe Leroy
2020-01-23 12:59 ` [PATCH v3 4/7] powerpc/kuap: Fix set direction in allow/prevent_user_access() Christophe Leroy
2020-01-23 12:59   ` Christophe Leroy
2020-01-23 12:59 ` [PATCH v3 5/7] powerpc/32s: Drop NULL addr verification Christophe Leroy
2020-01-23 12:59   ` Christophe Leroy
2020-01-23 12:59 ` [PATCH v3 6/7] powerpc/32s: Prepare allow_user_access() for user_access_begin() Christophe Leroy
2020-01-23 12:59   ` Christophe Leroy
2020-01-23 12:59 ` [PATCH v3 7/7] powerpc: Implement user_access_begin and friends Christophe Leroy
2020-01-23 12:59   ` Christophe Leroy

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=202001252253.56iDTPmy%lkp@intel.com \
    --to=lkp@intel.com \
    --cc=akpm@linux-foundation.org \
    --cc=bp@alien8.de \
    --cc=christophe.leroy@c-s.fr \
    --cc=dri-devel@lists.freedesktop.org \
    --cc=hpa@zytor.com \
    --cc=jani.nikula@linux.intel.com \
    --cc=kbuild-all@lists.01.org \
    --cc=linux-fsdevel@vger.kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-mm@kvack.org \
    --cc=linuxppc-dev@lists.ozlabs.org \
    --cc=mingo@redhat.com \
    --cc=paulus@samba.org \
    --cc=tglx@linutronix.de \
    --cc=torvalds@linux-foundation.org \
    --cc=viro@zeniv.linux.org.uk \
    --cc=x86@kernel.org \
    /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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.