tree:
https://git.kernel.org/pub/scm/linux/kernel/git/tglx/devel.git x86/entry
head: 5c8d5a67cdc4a03d2c383cb4e70375c2da1eb5eb
commit: 20049a8a124513a9de53d614179c434ade144242 [8/21] x86/entry: Use generic syscall
entry function
config: i386-tinyconfig (attached as .config)
compiler: gcc-9 (Debian 9.3.0-14) 9.3.0
reproduce (this is a W=1 build):
git checkout 20049a8a124513a9de53d614179c434ade144242
# save the attached .config to linux build tree
make W=1 ARCH=i386
If you fix the issue, kindly add following tag as appropriate
Reported-by: kernel test robot <lkp(a)intel.com>
Note: the tglx-devel/x86/entry HEAD 5c8d5a67cdc4a03d2c383cb4e70375c2da1eb5eb builds fine.
It only hurts bisectibility.
All errors (new ones prefixed by >>):
arch/x86/entry/common.c:222:24: warning: no previous prototype for
'syscall_return_slowpath' [-Wmissing-prototypes]
222 | __visible noinstr void syscall_return_slowpath(struct pt_regs *regs)
| ^~~~~~~~~~~~~~~~~~~~~~~
arch/x86/entry/common.c:282:24: warning: no previous prototype for
'do_int80_syscall_32' [-Wmissing-prototypes]
282 | __visible noinstr void do_int80_syscall_32(struct pt_regs *regs)
| ^~~~~~~~~~~~~~~~~~~
arch/x86/entry/common.c:324:24: warning: no previous prototype for
'do_fast_syscall_32' [-Wmissing-prototypes]
324 | __visible noinstr long do_fast_syscall_32(struct pt_regs *regs)
| ^~~~~~~~~~~~~~~~~~
arch/x86/entry/common.c:376:24: warning: no previous prototype for
'do_SYSENTER_32' [-Wmissing-prototypes]
376 | __visible noinstr long do_SYSENTER_32(struct pt_regs *regs)
| ^~~~~~~~~~~~~~
arch/x86/entry/common.c: In function 'idtentry_enter':
> arch/x86/entry/common.c:434:3: error: implicit declaration of
function 'irq_enter_from_user_mode'; did you mean
'irqentry_enter_from_user_mode'? [-Werror=implicit-function-declaration]
434 | irq_enter_from_user_mode(regs);
| ^~~~~~~~~~~~~~~~~~~~~~~~
| irqentry_enter_from_user_mode
cc1: some warnings being treated as errors
vim +434 arch/x86/entry/common.c
392
393 /**
394 * idtentry_enter - Handle state tracking on ordinary idtentries
395 * @regs: Pointer to pt_regs of interrupted context
396 *
397 * Invokes:
398 * - lockdep irqflag state tracking as low level ASM entry disabled
399 * interrupts.
400 *
401 * - Context tracking if the exception hit user mode.
402 *
403 * - The hardirq tracer to keep the state consistent as low level ASM
404 * entry disabled interrupts.
405 *
406 * As a precondition, this requires that the entry came from user mode,
407 * idle, or a kernel context in which RCU is watching.
408 *
409 * For kernel mode entries RCU handling is done conditional. If RCU is
410 * watching then the only RCU requirement is to check whether the tick has
411 * to be restarted. If RCU is not watching then rcu_irq_enter() has to be
412 * invoked on entry and rcu_irq_exit() on exit.
413 *
414 * Avoiding the rcu_irq_enter/exit() calls is an optimization but also
415 * solves the problem of kernel mode pagefaults which can schedule, which
416 * is not possible after invoking rcu_irq_enter() without undoing it.
417 *
418 * For user mode entries irq_enter_from_user_mode() must be invoked to
419 * establish the proper context for NOHZ_FULL. Otherwise scheduling on exit
420 * would not be possible.
421 *
422 * Returns: An opaque object that must be passed to idtentry_exit()
423 *
424 * The return value must be fed into the state argument of
425 * idtentry_exit().
426 */
427 idtentry_state_t noinstr idtentry_enter(struct pt_regs *regs)
428 {
429 idtentry_state_t ret = {
430 .exit_rcu = false,
431 };
432
433 if (user_mode(regs)) {
434 irq_enter_from_user_mode(regs);
435 return ret;
436 }
437
438 /*
439 * If this entry hit the idle task invoke rcu_irq_enter() whether
440 * RCU is watching or not.
441 *
442 * Interupts can nest when the first interrupt invokes softirq
443 * processing on return which enables interrupts.
444 *
445 * Scheduler ticks in the idle task can mark quiescent state and
446 * terminate a grace period, if and only if the timer interrupt is
447 * not nested into another interrupt.
448 *
449 * Checking for __rcu_is_watching() here would prevent the nesting
450 * interrupt to invoke rcu_irq_enter(). If that nested interrupt is
451 * the tick then rcu_flavor_sched_clock_irq() would wrongfully
452 * assume that it is the first interupt and eventually claim
453 * quiescient state and end grace periods prematurely.
454 *
455 * Unconditionally invoke rcu_irq_enter() so RCU state stays
456 * consistent.
457 *
458 * TINY_RCU does not support EQS, so let the compiler eliminate
459 * this part when enabled.
460 */
461 if (!IS_ENABLED(CONFIG_TINY_RCU) && is_idle_task(current)) {
462 /*
463 * If RCU is not watching then the same careful
464 * sequence vs. lockdep and tracing is required
465 * as in irq_enter_from_user_mode().
466 */
467 lockdep_hardirqs_off(CALLER_ADDR0);
468 rcu_irq_enter();
469 instrumentation_begin();
470 trace_hardirqs_off_finish();
471 instrumentation_end();
472
473 ret.exit_rcu = true;
474 return ret;
475 }
476
477 /*
478 * If RCU is watching then RCU only wants to check whether it needs
479 * to restart the tick in NOHZ mode. rcu_irq_enter_check_tick()
480 * already contains a warning when RCU is not watching, so no point
481 * in having another one here.
482 */
483 instrumentation_begin();
484 rcu_irq_enter_check_tick();
485 /* Use the combo lockdep/tracing function */
486 trace_hardirqs_off();
487 instrumentation_end();
488
489 return ret;
490 }
491
---
0-DAY CI Kernel Test Service, Intel Corporation
https://lists.01.org/hyperkitty/list/kbuild-all@lists.01.org