lkml.org 
[lkml]   [2017]   [May]   [16]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
SubjectRe: [PATCH 8/8] waitid(): switch copyout of siginfo to unsafe_put_user()
Hi Al,

[auto build test WARNING on linus/master]
[also build test WARNING on v4.12-rc1 next-20170515]
[if your patch is applied to the wrong git tree, please drop us a note to help improve the system]

url: https://github.com/0day-ci/linux/commits/Al-Viro/move-compat-wait4-and-waitid-next-to-native-variants/20170516-084127
config: arm64-defconfig (attached as .config)
compiler: aarch64-linux-gnu-gcc (Debian 6.1.1-9) 6.1.1 20160705
reproduce:
wget https://raw.githubusercontent.com/01org/lkp-tests/master/sbin/make.cross -O ~/bin/make.cross
chmod +x ~/bin/make.cross
# save the attached .config to linux build tree
make.cross ARCH=arm64

All warnings (new ones prefixed by >>):

In file included from include/asm-generic/bug.h:4:0,
from arch/arm64/include/asm/bug.h:66,
from include/linux/bug.h:4,
from include/linux/mmdebug.h:4,
from include/linux/mm.h:8,
from kernel/exit.c:7:
kernel/exit.c: In function 'C_SYSC_waitid':
kernel/exit.c:1746:38: error: 'infop' undeclared (first use in this function)
unsafe_put_user(err ? 0 : SIGCHLD, &infop->si_signo, Efault);
^
include/linux/compiler.h:179:42: note: in definition of macro 'unlikely'
# define unlikely(x) __builtin_expect(!!(x), 0)
^
>> arch/arm64/include/asm/uaccess.h:313:2: note: in expansion of macro '__put_user_err'
__put_user_err((x), (ptr), __pu_err); \
^~~~~~~~~~~~~~
include/linux/uaccess.h:302:56: note: in expansion of macro '__put_user'
#define unsafe_put_user(x, ptr, err) do { if (unlikely(__put_user(x, ptr))) goto err; } while (0)
^~~~~~~~~~
kernel/exit.c:1746:2: note: in expansion of macro 'unsafe_put_user'
unsafe_put_user(err ? 0 : SIGCHLD, &infop->si_signo, Efault);
^~~~~~~~~~~~~~~
kernel/exit.c:1746:38: note: each undeclared identifier is reported only once for each function it appears in
unsafe_put_user(err ? 0 : SIGCHLD, &infop->si_signo, Efault);
^
include/linux/compiler.h:179:42: note: in definition of macro 'unlikely'
# define unlikely(x) __builtin_expect(!!(x), 0)
^
>> arch/arm64/include/asm/uaccess.h:313:2: note: in expansion of macro '__put_user_err'
__put_user_err((x), (ptr), __pu_err); \
^~~~~~~~~~~~~~
include/linux/uaccess.h:302:56: note: in expansion of macro '__put_user'
#define unsafe_put_user(x, ptr, err) do { if (unlikely(__put_user(x, ptr))) goto err; } while (0)
^~~~~~~~~~
kernel/exit.c:1746:2: note: in expansion of macro 'unsafe_put_user'
unsafe_put_user(err ? 0 : SIGCHLD, &infop->si_signo, Efault);
^~~~~~~~~~~~~~~

vim +/__put_user_err +313 arch/arm64/include/asm/uaccess.h

57f4959b James Morse 2016-02-05 297 __put_user_asm("str", "sttr", "%w", __pu_val, (ptr), \
57f4959b James Morse 2016-02-05 298 (err), ARM64_HAS_UAO); \
0aea86a2 Catalin Marinas 2012-03-05 299 break; \
0aea86a2 Catalin Marinas 2012-03-05 300 case 8: \
d135b8b5 Mark Rutland 2017-05-03 301 __put_user_asm("str", "sttr", "%x", __pu_val, (ptr), \
57f4959b James Morse 2016-02-05 302 (err), ARM64_HAS_UAO); \
0aea86a2 Catalin Marinas 2012-03-05 303 break; \
0aea86a2 Catalin Marinas 2012-03-05 304 default: \
0aea86a2 Catalin Marinas 2012-03-05 305 BUILD_BUG(); \
0aea86a2 Catalin Marinas 2012-03-05 306 } \
bd38967d Catalin Marinas 2016-07-01 307 uaccess_disable_not_uao(); \
0aea86a2 Catalin Marinas 2012-03-05 308 } while (0)
0aea86a2 Catalin Marinas 2012-03-05 309
0aea86a2 Catalin Marinas 2012-03-05 310 #define __put_user(x, ptr) \
0aea86a2 Catalin Marinas 2012-03-05 311 ({ \
0aea86a2 Catalin Marinas 2012-03-05 312 int __pu_err = 0; \
0aea86a2 Catalin Marinas 2012-03-05 @313 __put_user_err((x), (ptr), __pu_err); \
0aea86a2 Catalin Marinas 2012-03-05 314 __pu_err; \
0aea86a2 Catalin Marinas 2012-03-05 315 })
0aea86a2 Catalin Marinas 2012-03-05 316
0aea86a2 Catalin Marinas 2012-03-05 317 #define __put_user_error(x, ptr, err) \
0aea86a2 Catalin Marinas 2012-03-05 318 ({ \
0aea86a2 Catalin Marinas 2012-03-05 319 __put_user_err((x), (ptr), (err)); \
0aea86a2 Catalin Marinas 2012-03-05 320 (void)0; \
0aea86a2 Catalin Marinas 2012-03-05 321 })

:::::: The code at line 313 was first introduced by commit
:::::: 0aea86a2176c22647a5b683768f858d880d5e05b arm64: User access library functions

:::::: TO: Catalin Marinas <catalin.marinas@arm.com>
:::::: CC: Catalin Marinas <catalin.marinas@arm.com>

---
0-DAY kernel test infrastructure Open Source Technology Center
https://lists.01.org/pipermail/kbuild-all Intel Corporation
[unhandled content-type:application/gzip]
\
 
 \ /
  Last update: 2017-05-16 06:19    [W:1.781 / U:0.164 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site