From: kernel test robot <lkp@intel.com>
To: Charlie Jenkins <charlie@rivosinc.com>,
Paul Walmsley <paul.walmsley@sifive.com>,
Palmer Dabbelt <palmer@dabbelt.com>,
Huacai Chen <chenhuacai@kernel.org>,
WANG Xuerui <kernel@xen0n.name>,
Thomas Gleixner <tglx@linutronix.de>,
Peter Zijlstra <peterz@infradead.org>,
Andy Lutomirski <luto@kernel.org>,
Alexandre Ghiti <alexghiti@rivosinc.com>
Cc: llvm@lists.linux.dev, oe-kbuild-all@lists.linux.dev,
linux-riscv@lists.infradead.org, linux-kernel@vger.kernel.org,
loongarch@lists.linux.dev, Charlie Jenkins <charlie@rivosinc.com>
Subject: Re: [PATCH 4/4] entry: Inline syscall_exit_to_user_mode()
Date: Fri, 24 Jan 2025 01:12:23 +0800 [thread overview]
Message-ID: <202501240036.hxoscXJM-lkp@intel.com> (raw)
In-Reply-To: <20250122-riscv_optimize_entry-v1-4-4ee95559cfd0@rivosinc.com>
Hi Charlie,
kernel test robot noticed the following build errors:
[auto build test ERROR on ffd294d346d185b70e28b1a28abe367bbfe53c04]
url: https://github.com/intel-lab-lkp/linux/commits/Charlie-Jenkins/riscv-entry-Convert-ret_from_fork-to-C/20250123-065957
base: ffd294d346d185b70e28b1a28abe367bbfe53c04
patch link: https://lore.kernel.org/r/20250122-riscv_optimize_entry-v1-4-4ee95559cfd0%40rivosinc.com
patch subject: [PATCH 4/4] entry: Inline syscall_exit_to_user_mode()
config: x86_64-randconfig-071-20250123 (https://download.01.org/0day-ci/archive/20250124/202501240036.hxoscXJM-lkp@intel.com/config)
compiler: clang version 19.1.3 (https://github.com/llvm/llvm-project ab51eccf88f5321e7c60591c5546b254b6afab99)
reproduce (this is a W=1 build): (https://download.01.org/0day-ci/archive/20250124/202501240036.hxoscXJM-lkp@intel.com/reproduce)
If you fix the issue in a separate patch/commit (i.e. not just a new version of
the same patch/commit), kindly add following tags
| Reported-by: kernel test robot <lkp@intel.com>
| Closes: https://lore.kernel.org/oe-kbuild-all/202501240036.hxoscXJM-lkp@intel.com/
All errors (new ones prefixed by >>):
In file included from arch/x86/kernel/ptrace.c:40:
In file included from arch/x86/include/asm/traps.h:9:
In file included from arch/x86/include/asm/idtentry.h:11:
>> include/linux/entry-common.h:397:27: error: use of undeclared identifier 'CONTEXT_KERNEL'
397 | CT_WARN_ON(ct_state() != CONTEXT_KERNEL);
| ^
1 error generated.
vim +/CONTEXT_KERNEL +397 include/linux/entry-common.h
378
379 /**
380 * syscall_exit_to_user_mode_work - Handle work before returning to user mode
381 * @regs: Pointer to currents pt_regs
382 *
383 * Same as step 1 and 2 of syscall_exit_to_user_mode() but without calling
384 * exit_to_user_mode() to perform the final transition to user mode.
385 *
386 * Calling convention is the same as for syscall_exit_to_user_mode() and it
387 * returns with all work handled and interrupts disabled. The caller must
388 * invoke exit_to_user_mode() before actually switching to user mode to
389 * make the final state transitions. Interrupts must stay disabled between
390 * return from this function and the invocation of exit_to_user_mode().
391 */
392 static __always_inline void syscall_exit_to_user_mode_work(struct pt_regs *regs)
393 {
394 unsigned long work = READ_ONCE(current_thread_info()->syscall_work);
395 unsigned long nr = syscall_get_nr(current, regs);
396
> 397 CT_WARN_ON(ct_state() != CONTEXT_KERNEL);
398
399 if (IS_ENABLED(CONFIG_PROVE_LOCKING)) {
400 if (WARN(irqs_disabled(), "syscall %lu left IRQs disabled", nr))
401 local_irq_enable();
402 }
403
404 rseq_syscall(regs);
405
406 /*
407 * Do one-time syscall specific work. If these work items are
408 * enabled, we want to run them exactly once per syscall exit with
409 * interrupts enabled.
410 */
411 if (unlikely(work & SYSCALL_WORK_EXIT))
412 syscall_exit_work(regs, work);
413 local_irq_disable_exit_to_user();
414 exit_to_user_mode_prepare(regs);
415 }
416
--
0-DAY CI Kernel Test Service
https://github.com/intel/lkp-tests/wiki
_______________________________________________
linux-riscv mailing list
linux-riscv@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-riscv
WARNING: multiple messages have this Message-ID (diff)
From: kernel test robot <lkp@intel.com>
To: Charlie Jenkins <charlie@rivosinc.com>,
Paul Walmsley <paul.walmsley@sifive.com>,
Palmer Dabbelt <palmer@dabbelt.com>,
Huacai Chen <chenhuacai@kernel.org>,
WANG Xuerui <kernel@xen0n.name>,
Thomas Gleixner <tglx@linutronix.de>,
Peter Zijlstra <peterz@infradead.org>,
Andy Lutomirski <luto@kernel.org>,
Alexandre Ghiti <alexghiti@rivosinc.com>
Cc: llvm@lists.linux.dev, oe-kbuild-all@lists.linux.dev,
linux-riscv@lists.infradead.org, linux-kernel@vger.kernel.org,
loongarch@lists.linux.dev, Charlie Jenkins <charlie@rivosinc.com>
Subject: Re: [PATCH 4/4] entry: Inline syscall_exit_to_user_mode()
Date: Fri, 24 Jan 2025 01:12:23 +0800 [thread overview]
Message-ID: <202501240036.hxoscXJM-lkp@intel.com> (raw)
In-Reply-To: <20250122-riscv_optimize_entry-v1-4-4ee95559cfd0@rivosinc.com>
Hi Charlie,
kernel test robot noticed the following build errors:
[auto build test ERROR on ffd294d346d185b70e28b1a28abe367bbfe53c04]
url: https://github.com/intel-lab-lkp/linux/commits/Charlie-Jenkins/riscv-entry-Convert-ret_from_fork-to-C/20250123-065957
base: ffd294d346d185b70e28b1a28abe367bbfe53c04
patch link: https://lore.kernel.org/r/20250122-riscv_optimize_entry-v1-4-4ee95559cfd0%40rivosinc.com
patch subject: [PATCH 4/4] entry: Inline syscall_exit_to_user_mode()
config: x86_64-randconfig-071-20250123 (https://download.01.org/0day-ci/archive/20250124/202501240036.hxoscXJM-lkp@intel.com/config)
compiler: clang version 19.1.3 (https://github.com/llvm/llvm-project ab51eccf88f5321e7c60591c5546b254b6afab99)
reproduce (this is a W=1 build): (https://download.01.org/0day-ci/archive/20250124/202501240036.hxoscXJM-lkp@intel.com/reproduce)
If you fix the issue in a separate patch/commit (i.e. not just a new version of
the same patch/commit), kindly add following tags
| Reported-by: kernel test robot <lkp@intel.com>
| Closes: https://lore.kernel.org/oe-kbuild-all/202501240036.hxoscXJM-lkp@intel.com/
All errors (new ones prefixed by >>):
In file included from arch/x86/kernel/ptrace.c:40:
In file included from arch/x86/include/asm/traps.h:9:
In file included from arch/x86/include/asm/idtentry.h:11:
>> include/linux/entry-common.h:397:27: error: use of undeclared identifier 'CONTEXT_KERNEL'
397 | CT_WARN_ON(ct_state() != CONTEXT_KERNEL);
| ^
1 error generated.
vim +/CONTEXT_KERNEL +397 include/linux/entry-common.h
378
379 /**
380 * syscall_exit_to_user_mode_work - Handle work before returning to user mode
381 * @regs: Pointer to currents pt_regs
382 *
383 * Same as step 1 and 2 of syscall_exit_to_user_mode() but without calling
384 * exit_to_user_mode() to perform the final transition to user mode.
385 *
386 * Calling convention is the same as for syscall_exit_to_user_mode() and it
387 * returns with all work handled and interrupts disabled. The caller must
388 * invoke exit_to_user_mode() before actually switching to user mode to
389 * make the final state transitions. Interrupts must stay disabled between
390 * return from this function and the invocation of exit_to_user_mode().
391 */
392 static __always_inline void syscall_exit_to_user_mode_work(struct pt_regs *regs)
393 {
394 unsigned long work = READ_ONCE(current_thread_info()->syscall_work);
395 unsigned long nr = syscall_get_nr(current, regs);
396
> 397 CT_WARN_ON(ct_state() != CONTEXT_KERNEL);
398
399 if (IS_ENABLED(CONFIG_PROVE_LOCKING)) {
400 if (WARN(irqs_disabled(), "syscall %lu left IRQs disabled", nr))
401 local_irq_enable();
402 }
403
404 rseq_syscall(regs);
405
406 /*
407 * Do one-time syscall specific work. If these work items are
408 * enabled, we want to run them exactly once per syscall exit with
409 * interrupts enabled.
410 */
411 if (unlikely(work & SYSCALL_WORK_EXIT))
412 syscall_exit_work(regs, work);
413 local_irq_disable_exit_to_user();
414 exit_to_user_mode_prepare(regs);
415 }
416
--
0-DAY CI Kernel Test Service
https://github.com/intel/lkp-tests/wiki
next prev parent reply other threads:[~2025-01-23 17:16 UTC|newest]
Thread overview: 28+ messages / expand[flat|nested] mbox.gz Atom feed top
2025-01-22 22:56 [PATCH 0/4] entry: Move ret_from_fork() to C and inline syscall_exit_to_user_mode() Charlie Jenkins
2025-01-22 22:56 ` Charlie Jenkins
2025-01-22 22:56 ` [PATCH 1/4] riscv: entry: Convert ret_from_fork() to C Charlie Jenkins
2025-01-22 22:56 ` Charlie Jenkins
2025-01-24 7:09 ` Alexandre Ghiti
2025-01-24 7:09 ` Alexandre Ghiti
2025-01-24 7:56 ` Charlie Jenkins
2025-01-24 7:56 ` Charlie Jenkins
2025-01-25 23:30 ` Maciej W. Rozycki
2025-01-25 23:30 ` Maciej W. Rozycki
2025-01-26 19:51 ` Charlie Jenkins
2025-01-26 19:51 ` Charlie Jenkins
2025-01-27 20:20 ` Maciej W. Rozycki
2025-01-27 20:20 ` Maciej W. Rozycki
2025-01-27 20:55 ` Charlie Jenkins
2025-01-27 20:55 ` Charlie Jenkins
2025-01-22 22:56 ` [PATCH 2/4] riscv: entry: Split ret_from_fork() into user and kernel Charlie Jenkins
2025-01-22 22:56 ` Charlie Jenkins
2025-01-22 22:56 ` [PATCH 3/4] loongarch: entry: Migrate ret_from_fork() to C Charlie Jenkins
2025-01-22 22:56 ` Charlie Jenkins
2025-01-23 17:12 ` kernel test robot
2025-01-23 17:12 ` kernel test robot
2025-01-22 22:56 ` [PATCH 4/4] entry: Inline syscall_exit_to_user_mode() Charlie Jenkins
2025-01-22 22:56 ` Charlie Jenkins
2025-01-23 17:12 ` kernel test robot [this message]
2025-01-23 17:12 ` kernel test robot
2025-01-23 17:34 ` kernel test robot
2025-01-23 17:34 ` kernel 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=202501240036.hxoscXJM-lkp@intel.com \
--to=lkp@intel.com \
--cc=alexghiti@rivosinc.com \
--cc=charlie@rivosinc.com \
--cc=chenhuacai@kernel.org \
--cc=kernel@xen0n.name \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-riscv@lists.infradead.org \
--cc=llvm@lists.linux.dev \
--cc=loongarch@lists.linux.dev \
--cc=luto@kernel.org \
--cc=oe-kbuild-all@lists.linux.dev \
--cc=palmer@dabbelt.com \
--cc=paul.walmsley@sifive.com \
--cc=peterz@infradead.org \
--cc=tglx@linutronix.de \
/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.