From: kbuild test robot <lkp@intel.com>
To: kbuild-all@lists.01.org
Subject: [vfs:untested.uaccess 18/22] arch/x86/kernel/signal.c:309:51: error: macro "unsafe_put_user" requires 3 arguments, but only 2 given
Date: Mon, 17 Feb 2020 06:35:07 +0800 [thread overview]
Message-ID: <202002170605.k2OSCkAE%lkp@intel.com> (raw)
[-- Attachment #1: Type: text/plain, Size: 4453 bytes --]
tree: https://git.kernel.org/pub/scm/linux/kernel/git/viro/vfs.git untested.uaccess
head: 094cadd628e4f679e8d2a5edbf9564ac1ec5bb03
commit: c6bab75849c01b2ea5ce1ac94a1c26db84efce6c [18/22] x86: __setup_frame(): consolidate uaccess areas
config: i386-alldefconfig (attached as .config)
compiler: gcc-7 (Debian 7.5.0-4) 7.5.0
reproduce:
git checkout c6bab75849c01b2ea5ce1ac94a1c26db84efce6c
# save the attached .config to linux build tree
make ARCH=i386
If you fix the issue, kindly add following tag
Reported-by: kbuild test robot <lkp@intel.com>
All errors (new ones prefixed by >>):
arch/x86/kernel/signal.c: In function '__setup_frame':
>> arch/x86/kernel/signal.c:309:51: error: macro "unsafe_put_user" requires 3 arguments, but only 2 given
unsafe_put_user(set->sig[1], &frame->extramask[0]), Efault)
^
>> arch/x86/kernel/signal.c:309:2: error: 'unsafe_put_user' undeclared (first use in this function)
unsafe_put_user(set->sig[1], &frame->extramask[0]), Efault)
^~~~~~~~~~~~~~~
arch/x86/kernel/signal.c:309:2: note: each undeclared identifier is reported only once for each function it appears in
>> arch/x86/kernel/signal.c:309:54: error: 'Efault' undeclared (first use in this function)
unsafe_put_user(set->sig[1], &frame->extramask[0]), Efault)
^~~~~~
arch/x86/kernel/signal.c:309:52: warning: left-hand operand of comma expression has no effect [-Wunused-value]
unsafe_put_user(set->sig[1], &frame->extramask[0]), Efault)
^
>> arch/x86/kernel/signal.c:309:60: error: expected ';' before ')' token
unsafe_put_user(set->sig[1], &frame->extramask[0]), Efault)
^
>> arch/x86/kernel/signal.c:309:60: error: expected statement before ')' token
arch/x86/kernel/signal.c:298:6: warning: unused variable 'err' [-Wunused-variable]
int err = 0;
^~~
arch/x86/kernel/signal.c: In function 'x32_setup_rt_frame':
arch/x86/kernel/signal.c:580:1: warning: label 'Efault' defined but not used [-Wunused-label]
Efault:
^~~~~~
vim +/unsafe_put_user +309 arch/x86/kernel/signal.c
291
292 static int
293 __setup_frame(int sig, struct ksignal *ksig, sigset_t *set,
294 struct pt_regs *regs)
295 {
296 struct sigframe __user *frame;
297 void __user *restorer;
298 int err = 0;
299 void __user *fpstate = NULL;
300
301 frame = get_sigframe(&ksig->ka, regs, sizeof(*frame), &fpstate);
302
303 if (!user_access_begin(frame, sizeof(*frame)))
304 return -EFAULT;
305
306 unsafe_put_user(sig, &frame->sig, Efault);
307 if (setup_sigcontext(&frame->sc, fpstate, regs, set->sig[0]))
308 goto Efault;
> 309 unsafe_put_user(set->sig[1], &frame->extramask[0]), Efault)
310 if (current->mm->context.vdso)
311 restorer = current->mm->context.vdso +
312 vdso_image_32.sym___kernel_sigreturn;
313 else
314 restorer = &frame->retcode;
315 if (ksig->ka.sa.sa_flags & SA_RESTORER)
316 restorer = ksig->ka.sa.sa_restorer;
317
318 /* Set up to return from userspace. */
319 unsafe_put_user(restorer, &frame->pretcode, Efault);
320
321 /*
322 * This is popl %eax ; movl $__NR_sigreturn, %eax ; int $0x80
323 *
324 * WE DO NOT USE IT ANY MORE! It's only left here for historical
325 * reasons and because gdb uses it as a signature to notice
326 * signal handler stack frames.
327 */
328 unsafe_put_user(*((u64 *)&retcode), (u64 *)frame->retcode, Efault);
329 user_access_end();
330
331 /* Set up registers for signal handler */
332 regs->sp = (unsigned long)frame;
333 regs->ip = (unsigned long)ksig->ka.sa.sa_handler;
334 regs->ax = (unsigned long)sig;
335 regs->dx = 0;
336 regs->cx = 0;
337
338 regs->ds = __USER_DS;
339 regs->es = __USER_DS;
340 regs->ss = __USER_DS;
341 regs->cs = __USER_CS;
342
343 return 0;
344
345 Efault:
346 user_access_end();
347 return -EFAULT;
348 }
349
---
0-DAY CI Kernel Test Service, Intel Corporation
https://lists.01.org/hyperkitty/list/kbuild-all(a)lists.01.org
[-- Attachment #2: config.gz --]
[-- Type: application/gzip, Size: 10574 bytes --]
WARNING: multiple messages have this Message-ID (diff)
From: kbuild test robot <lkp@intel.com>
To: Al Viro <viro@zeniv.linux.org.uk>
Cc: kbuild-all@lists.01.org, linux-fsdevel@vger.kernel.org
Subject: [vfs:untested.uaccess 18/22] arch/x86/kernel/signal.c:309:51: error: macro "unsafe_put_user" requires 3 arguments, but only 2 given
Date: Mon, 17 Feb 2020 06:35:07 +0800 [thread overview]
Message-ID: <202002170605.k2OSCkAE%lkp@intel.com> (raw)
[-- Attachment #1: Type: text/plain, Size: 4345 bytes --]
tree: https://git.kernel.org/pub/scm/linux/kernel/git/viro/vfs.git untested.uaccess
head: 094cadd628e4f679e8d2a5edbf9564ac1ec5bb03
commit: c6bab75849c01b2ea5ce1ac94a1c26db84efce6c [18/22] x86: __setup_frame(): consolidate uaccess areas
config: i386-alldefconfig (attached as .config)
compiler: gcc-7 (Debian 7.5.0-4) 7.5.0
reproduce:
git checkout c6bab75849c01b2ea5ce1ac94a1c26db84efce6c
# save the attached .config to linux build tree
make ARCH=i386
If you fix the issue, kindly add following tag
Reported-by: kbuild test robot <lkp@intel.com>
All errors (new ones prefixed by >>):
arch/x86/kernel/signal.c: In function '__setup_frame':
>> arch/x86/kernel/signal.c:309:51: error: macro "unsafe_put_user" requires 3 arguments, but only 2 given
unsafe_put_user(set->sig[1], &frame->extramask[0]), Efault)
^
>> arch/x86/kernel/signal.c:309:2: error: 'unsafe_put_user' undeclared (first use in this function)
unsafe_put_user(set->sig[1], &frame->extramask[0]), Efault)
^~~~~~~~~~~~~~~
arch/x86/kernel/signal.c:309:2: note: each undeclared identifier is reported only once for each function it appears in
>> arch/x86/kernel/signal.c:309:54: error: 'Efault' undeclared (first use in this function)
unsafe_put_user(set->sig[1], &frame->extramask[0]), Efault)
^~~~~~
arch/x86/kernel/signal.c:309:52: warning: left-hand operand of comma expression has no effect [-Wunused-value]
unsafe_put_user(set->sig[1], &frame->extramask[0]), Efault)
^
>> arch/x86/kernel/signal.c:309:60: error: expected ';' before ')' token
unsafe_put_user(set->sig[1], &frame->extramask[0]), Efault)
^
>> arch/x86/kernel/signal.c:309:60: error: expected statement before ')' token
arch/x86/kernel/signal.c:298:6: warning: unused variable 'err' [-Wunused-variable]
int err = 0;
^~~
arch/x86/kernel/signal.c: In function 'x32_setup_rt_frame':
arch/x86/kernel/signal.c:580:1: warning: label 'Efault' defined but not used [-Wunused-label]
Efault:
^~~~~~
vim +/unsafe_put_user +309 arch/x86/kernel/signal.c
291
292 static int
293 __setup_frame(int sig, struct ksignal *ksig, sigset_t *set,
294 struct pt_regs *regs)
295 {
296 struct sigframe __user *frame;
297 void __user *restorer;
298 int err = 0;
299 void __user *fpstate = NULL;
300
301 frame = get_sigframe(&ksig->ka, regs, sizeof(*frame), &fpstate);
302
303 if (!user_access_begin(frame, sizeof(*frame)))
304 return -EFAULT;
305
306 unsafe_put_user(sig, &frame->sig, Efault);
307 if (setup_sigcontext(&frame->sc, fpstate, regs, set->sig[0]))
308 goto Efault;
> 309 unsafe_put_user(set->sig[1], &frame->extramask[0]), Efault)
310 if (current->mm->context.vdso)
311 restorer = current->mm->context.vdso +
312 vdso_image_32.sym___kernel_sigreturn;
313 else
314 restorer = &frame->retcode;
315 if (ksig->ka.sa.sa_flags & SA_RESTORER)
316 restorer = ksig->ka.sa.sa_restorer;
317
318 /* Set up to return from userspace. */
319 unsafe_put_user(restorer, &frame->pretcode, Efault);
320
321 /*
322 * This is popl %eax ; movl $__NR_sigreturn, %eax ; int $0x80
323 *
324 * WE DO NOT USE IT ANY MORE! It's only left here for historical
325 * reasons and because gdb uses it as a signature to notice
326 * signal handler stack frames.
327 */
328 unsafe_put_user(*((u64 *)&retcode), (u64 *)frame->retcode, Efault);
329 user_access_end();
330
331 /* Set up registers for signal handler */
332 regs->sp = (unsigned long)frame;
333 regs->ip = (unsigned long)ksig->ka.sa.sa_handler;
334 regs->ax = (unsigned long)sig;
335 regs->dx = 0;
336 regs->cx = 0;
337
338 regs->ds = __USER_DS;
339 regs->es = __USER_DS;
340 regs->ss = __USER_DS;
341 regs->cs = __USER_CS;
342
343 return 0;
344
345 Efault:
346 user_access_end();
347 return -EFAULT;
348 }
349
---
0-DAY CI Kernel Test Service, Intel Corporation
https://lists.01.org/hyperkitty/list/kbuild-all@lists.01.org
[-- Attachment #2: .config.gz --]
[-- Type: application/gzip, Size: 10574 bytes --]
next reply other threads:[~2020-02-16 22:35 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2020-02-16 22:35 kbuild test robot [this message]
2020-02-16 22:35 ` [vfs:untested.uaccess 18/22] arch/x86/kernel/signal.c:309:51: error: macro "unsafe_put_user" requires 3 arguments, but only 2 given kbuild test robot
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=202002170605.k2OSCkAE%lkp@intel.com \
--to=lkp@intel.com \
--cc=kbuild-all@lists.01.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.