[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <202305170355.BPcuMv9z-lkp@intel.com>
Date: Wed, 17 May 2023 03:55:19 +0800
From: kernel test robot <lkp@...el.com>
To: Sven Schnelle <svens@...ux.ibm.com>,
Thomas Gleixner <tglx@...utronix.de>,
Peter Zijlstra <peterz@...radead.org>,
Frederic Weisbecker <frederic@...nel.org>,
"Eric W . Biederman" <ebiederm@...ssion.com>,
Mark Rutland <mark.rutland@....com>,
Andy Lutomirski <luto@...nel.org>
Cc: llvm@...ts.linux.dev, oe-kbuild-all@...ts.linux.dev,
linux-s390@...r.kernel.org, hca@...ux.ibm.com,
linux-kernel@...r.kernel.org
Subject: Re: [PATCH 2/2] entry: move the enter path to header files
Hi Sven,
kernel test robot noticed the following build errors:
[auto build test ERROR on tip/core/entry]
[also build test ERROR on linus/master v6.4-rc2 next-20230516]
[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#_base_tree_information]
url: https://github.com/intel-lab-lkp/linux/commits/Sven-Schnelle/entry-move-the-exit-path-to-header-files/20230516-230146
base: tip/core/entry
patch link: https://lore.kernel.org/r/20230516133810.171487-3-svens%40linux.ibm.com
patch subject: [PATCH 2/2] entry: move the enter path to header files
config: i386-randconfig-a002
compiler: clang version 14.0.6 (https://github.com/llvm/llvm-project f28c006a5895fc0e329fe15fead81e37457cb1d1)
reproduce (this is a W=1 build):
wget https://raw.githubusercontent.com/intel/lkp-tests/master/sbin/make.cross -O ~/bin/make.cross
chmod +x ~/bin/make.cross
# https://github.com/intel-lab-lkp/linux/commit/c7a1b9f03d3d4636253dc7900059338289083917
git remote add linux-review https://github.com/intel-lab-lkp/linux
git fetch --no-tags linux-review Sven-Schnelle/entry-move-the-exit-path-to-header-files/20230516-230146
git checkout c7a1b9f03d3d4636253dc7900059338289083917
# save the config file
mkdir build_dir && cp config build_dir/.config
COMPILER_INSTALL_PATH=$HOME/0day COMPILER=clang make.cross W=1 O=build_dir ARCH=i386 olddefconfig
COMPILER_INSTALL_PATH=$HOME/0day COMPILER=clang make.cross W=1 O=build_dir ARCH=i386 SHELL=/bin/bash arch/x86/kvm/
If you fix the issue, kindly add following tag where applicable
| Reported-by: kernel test robot <lkp@...el.com>
| Link: https://lore.kernel.org/oe-kbuild-all/202305170355.BPcuMv9z-lkp@intel.com/
All errors (new ones prefixed by >>):
In file included from arch/x86/kvm/vmx/vmx.c:41:
In file included from arch/x86/include/asm/idtentry.h:11:
include/linux/entry-common.h:574:2: error: implicit declaration of function 'audit_syscall_exit' is invalid in C99 [-Werror,-Wimplicit-function-declaration]
audit_syscall_exit(regs);
^
>> include/linux/entry-common.h:669:15: error: duplicate 'inline' declaration specifier [-Werror,-Wduplicate-decl-specifier]
static inline __always_inline void syscall_enter_audit(struct pt_regs *regs, long syscall)
^
include/linux/compiler_attributes.h:55:41: note: expanded from macro '__always_inline'
#define __always_inline inline __attribute__((__always_inline__))
^
include/linux/compiler_types.h:187:16: note: expanded from macro 'inline'
#define inline inline __gnu_inline __inline_maybe_unused notrace
^
In file included from arch/x86/kvm/vmx/vmx.c:41:
In file included from arch/x86/include/asm/idtentry.h:11:
include/linux/entry-common.h:671:15: error: implicit declaration of function 'audit_context' is invalid in C99 [-Werror,-Wimplicit-function-declaration]
if (unlikely(audit_context())) {
^
include/linux/entry-common.h:671:15: note: did you mean 'put_io_context'?
include/linux/iocontext.h:119:6: note: 'put_io_context' declared here
void put_io_context(struct io_context *ioc);
^
In file included from arch/x86/kvm/vmx/vmx.c:41:
In file included from arch/x86/include/asm/idtentry.h:11:
include/linux/entry-common.h:675:3: error: implicit declaration of function 'audit_syscall_entry' is invalid in C99 [-Werror,-Wimplicit-function-declaration]
audit_syscall_entry(syscall, args[0], args[1], args[2], args[3]);
^
4 errors generated.
vim +/inline +669 include/linux/entry-common.h
556
557 static void syscall_exit_work(struct pt_regs *regs, unsigned long work)
558 {
559 bool step;
560
561 /*
562 * If the syscall was rolled back due to syscall user dispatching,
563 * then the tracers below are not invoked for the same reason as
564 * the entry side was not invoked in syscall_trace_enter(): The ABI
565 * of these syscalls is unknown.
566 */
567 if (work & SYSCALL_WORK_SYSCALL_USER_DISPATCH) {
568 if (unlikely(current->syscall_dispatch.on_dispatch)) {
569 current->syscall_dispatch.on_dispatch = false;
570 return;
571 }
572 }
573
> 574 audit_syscall_exit(regs);
575
576 if (work & SYSCALL_WORK_SYSCALL_TRACEPOINT)
577 trace_sys_exit(regs, syscall_get_return_value(current, regs));
578
579 step = report_single_step(work);
580 if (step || work & SYSCALL_WORK_SYSCALL_TRACE)
581 ptrace_report_syscall_exit(regs, step);
582 }
583
584 /*
585 * Syscall specific exit to user mode preparation. Runs with interrupts
586 * enabled.
587 */
588 static __always_inline void syscall_exit_to_user_mode_prepare(struct pt_regs *regs)
589 {
590 unsigned long work = READ_ONCE(current_thread_info()->syscall_work);
591 unsigned long nr = syscall_get_nr(current, regs);
592
593 CT_WARN_ON(ct_state() != CONTEXT_KERNEL);
594
595 if (IS_ENABLED(CONFIG_PROVE_LOCKING)) {
596 if (WARN(irqs_disabled(), "syscall %lu left IRQs disabled", nr))
597 local_irq_enable();
598 }
599
600 rseq_syscall(regs);
601
602 /*
603 * Do one-time syscall specific work. If these work items are
604 * enabled, we want to run them exactly once per syscall exit with
605 * interrupts enabled.
606 */
607 if (unlikely(work & SYSCALL_WORK_EXIT))
608 syscall_exit_work(regs, work);
609 }
610
611 static __always_inline void __syscall_exit_to_user_mode_work(struct pt_regs *regs)
612 {
613 syscall_exit_to_user_mode_prepare(regs);
614 local_irq_disable_exit_to_user();
615 exit_to_user_mode_prepare(regs);
616 }
617
618 static __always_inline void syscall_exit_to_user_mode_work(struct pt_regs *regs)
619 {
620 __syscall_exit_to_user_mode_work(regs);
621 }
622
623 /* See comment for exit_to_user_mode() in entry-common.h */
624 static __always_inline void __exit_to_user_mode(void)
625 {
626 instrumentation_begin();
627 trace_hardirqs_on_prepare();
628 lockdep_hardirqs_on_prepare();
629 instrumentation_end();
630
631 user_enter_irqoff();
632 arch_exit_to_user_mode();
633 lockdep_hardirqs_on(CALLER_ADDR0);
634 }
635
636
637 static __always_inline void irqentry_exit_to_user_mode(struct pt_regs *regs)
638 {
639 instrumentation_begin();
640 exit_to_user_mode_prepare(regs);
641 instrumentation_end();
642 __exit_to_user_mode();
643 }
644
645 static __always_inline void __enter_from_user_mode(struct pt_regs *regs)
646 {
647 arch_enter_from_user_mode(regs);
648 lockdep_hardirqs_off(CALLER_ADDR0);
649
650 CT_WARN_ON(__ct_state() != CONTEXT_USER);
651 user_exit_irqoff();
652
653 instrumentation_begin();
654 kmsan_unpoison_entry_regs(regs);
655 trace_hardirqs_off_finish();
656 instrumentation_end();
657 }
658
659 static __always_inline void enter_from_user_mode(struct pt_regs *regs)
660 {
661 __enter_from_user_mode(regs);
662 }
663
664 static __always_inline void exit_to_user_mode(void)
665 {
666 __exit_to_user_mode();
667 }
668
> 669 static inline __always_inline void syscall_enter_audit(struct pt_regs *regs, long syscall)
670 {
671 if (unlikely(audit_context())) {
672 unsigned long args[6];
673
674 syscall_get_arguments(current, regs, args);
675 audit_syscall_entry(syscall, args[0], args[1], args[2], args[3]);
676 }
677 }
678
--
0-DAY CI Kernel Test Service
https://github.com/intel/lkp-tests
View attachment "config" of type "text/plain" (170144 bytes)
Powered by blists - more mailing lists