public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
From: kernel test robot <oliver.sang@intel.com>
To: Charlie Jenkins <charlie@rivosinc.com>
Cc: <oe-lkp@lists.linux.dev>, <lkp@intel.com>,
	<linux-kernel@vger.kernel.org>,
	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>,
	<linux-riscv@lists.infradead.org>, <loongarch@lists.linux.dev>,
	Charlie Jenkins <charlie@rivosinc.com>, <oliver.sang@intel.com>
Subject: Re: [PATCH v3 4/4] entry: Inline syscall_exit_to_user_mode()
Date: Tue, 28 Jan 2025 09:44:00 +0800	[thread overview]
Message-ID: <202501272352.d9bc5c3-lkp@intel.com> (raw)
In-Reply-To: <20250124-riscv_optimize_entry-v3-4-869f36b9e43b@rivosinc.com>



Hello,

kernel test robot noticed "WARNING:at_include/linux/entry-common.h:#ret_from_fork" on:

commit: af2a35e015974bdfa788eebda365a2896b2db87c ("[PATCH v3 4/4] entry: Inline syscall_exit_to_user_mode()")
url: https://github.com/intel-lab-lkp/linux/commits/Charlie-Jenkins/riscv-entry-Convert-ret_from_fork-to-C/20250125-063418
patch link: https://lore.kernel.org/all/20250124-riscv_optimize_entry-v3-4-869f36b9e43b@rivosinc.com/
patch subject: [PATCH v3 4/4] entry: Inline syscall_exit_to_user_mode()

in testcase: boot

config: x86_64-randconfig-004-20250126
compiler: gcc-12
test machine: qemu-system-x86_64 -enable-kvm -cpu SandyBridge -smp 2 -m 16G

(please refer to attached dmesg/kmsg for entire log/backtrace)


+---------------------------------------------------------------+------------+------------+
|                                                               | d05f6a7fc5 | af2a35e015 |
+---------------------------------------------------------------+------------+------------+
| boot_successes                                                | 21         | 0          |
| boot_failures                                                 | 0          | 21         |
| WARNING:at_include/linux/entry-common.h:#ret_from_fork        | 0          | 21         |
| RIP:ret_from_fork                                             | 0          | 21         |
| WARNING:at_include/linux/entry-common.h:#do_int80_emulation   | 0          | 15         |
| RIP:do_int80_emulation                                        | 0          | 15         |
| WARNING:at_include/linux/entry-common.h:#__do_fast_syscall_32 | 0          | 15         |
| RIP:__do_fast_syscall_32                                      | 0          | 15         |
| WARNING:at_include/linux/entry-common.h:#do_syscall_64        | 0          | 6          |
| RIP:do_syscall_64                                             | 0          | 6          |
+---------------------------------------------------------------+------------+------------+


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 <oliver.sang@intel.com>
| Closes: https://lore.kernel.org/oe-lkp/202501272352.d9bc5c3-lkp@intel.com


[  112.344122][   T69] ------------[ cut here ]------------
[ 112.345019][ T69] WARNING: CPU: 0 PID: 69 at include/linux/entry-common.h:397 ret_from_fork (include/linux/entry-common.h:397 include/linux/entry-common.h:449 arch/x86/kernel/process.c:156) 
[  112.346485][   T69] Modules linked in:
[  112.347163][   T69] CPU: 0 UID: 0 PID: 69 Comm: modprobe Not tainted 6.13.0-00004-gaf2a35e01597 #1 214e9f59286a53f9934969c01f519fb8074cbd24
[  112.348970][   T69] Hardware name: QEMU Standard PC (i440FX + PIIX, 1996), BIOS 1.16.2-debian-1.16.2-1 04/01/2014
[ 112.350385][ T69] RIP: 0010:ret_from_fork (include/linux/entry-common.h:397 include/linux/entry-common.h:449 arch/x86/kernel/process.c:156) 
[ 112.351202][ T69] Code: f8 83 e0 07 83 c0 03 38 d0 7c 09 84 d2 74 05 e8 e2 f1 4a 00 41 8b 85 a8 56 1f 00 65 ff 0d 25 06 1b 7f 75 05 0f 1f 44 00 00 90 <0f> 0b 90 9c 58 0f ba e0 09 72 1b 90 48 c7 c7 00 ad 22 83 48 63 f5
All code
========
   0:	f8                   	clc
   1:	83 e0 07             	and    $0x7,%eax
   4:	83 c0 03             	add    $0x3,%eax
   7:	38 d0                	cmp    %dl,%al
   9:	7c 09                	jl     0x14
   b:	84 d2                	test   %dl,%dl
   d:	74 05                	je     0x14
   f:	e8 e2 f1 4a 00       	call   0x4af1f6
  14:	41 8b 85 a8 56 1f 00 	mov    0x1f56a8(%r13),%eax
  1b:	65 ff 0d 25 06 1b 7f 	decl   %gs:0x7f1b0625(%rip)        # 0x7f1b0647
  22:	75 05                	jne    0x29
  24:	0f 1f 44 00 00       	nopl   0x0(%rax,%rax,1)
  29:	90                   	nop
  2a:*	0f 0b                	ud2		<-- trapping instruction
  2c:	90                   	nop
  2d:	9c                   	pushf
  2e:	58                   	pop    %rax
  2f:	0f ba e0 09          	bt     $0x9,%eax
  33:	72 1b                	jb     0x50
  35:	90                   	nop
  36:	48 c7 c7 00 ad 22 83 	mov    $0xffffffff8322ad00,%rdi
  3d:	48 63 f5             	movslq %ebp,%rsi

Code starting with the faulting instruction
===========================================
   0:	0f 0b                	ud2
   2:	90                   	nop
   3:	9c                   	pushf
   4:	58                   	pop    %rax
   5:	0f ba e0 09          	bt     $0x9,%eax
   9:	72 1b                	jb     0x26
   b:	90                   	nop
   c:	48 c7 c7 00 ad 22 83 	mov    $0xffffffff8322ad00,%rdi
  13:	48 63 f5             	movslq %ebp,%rsi
[  112.353759][   T69] RSP: 0000:ffffc900016eff20 EFLAGS: 00010246
[  112.354637][   T69] RAX: 000000000001256c RBX: ffffc900016eff48 RCX: 1ffffffff0aab891
[  112.355762][   T69] RDX: 1ffff11075d7ea00 RSI: 0000000000000006 RDI: ffff8883aebf56a8
[  112.356876][   T69] RBP: 000000000000003b R08: fffffbfff0aac275 R09: 0000000000000000
[  112.358011][   T69] R10: ffffffff8133b7bb R11: fffffbfff0aac274 R12: 0000000000000000
[  112.359131][   T69] R13: ffff8883aea00000 R14: 0000000000000000 R15: 0000000000000000
[  112.360256][   T69] FS:  0000000000000000(0000) GS:ffff8883aea00000(0000) knlGS:0000000000000000
[  112.361495][   T69] CS:  0010 DS: 0000 ES: 0000 CR0: 0000000080050033
[  112.362410][   T69] CR2: 00007fff006efef9 CR3: 000000014ab4d000 CR4: 00000000000406b0
[  112.364674][   T69] DR0: 0000000000000000 DR1: 0000000000000000 DR2: 0000000000000000
[  112.365489][   T69] DR3: 0000000000000000 DR6: 00000000fffe0ff0 DR7: 0000000000000400
[  112.366294][   T69] Call Trace:
[  112.366677][   T69]  <TASK>
[ 112.367020][ T69] ? __warn (kernel/panic.c:748) 
[ 112.367509][ T69] ? ret_from_fork (include/linux/entry-common.h:397 include/linux/entry-common.h:449 arch/x86/kernel/process.c:156) 
[ 112.368006][ T69] ? report_bug (lib/bug.c:201 lib/bug.c:219) 
[ 112.368605][ T69] ? ret_from_fork (include/linux/entry-common.h:397 include/linux/entry-common.h:449 arch/x86/kernel/process.c:156) 
[ 112.369094][ T69] ? handle_bug (arch/x86/kernel/traps.c:285) 
[ 112.369551][ T69] ? exc_invalid_op (arch/x86/kernel/traps.c:309 (discriminator 1)) 
[ 112.370039][ T69] ? asm_exc_invalid_op (arch/x86/include/asm/idtentry.h:621) 
[ 112.370572][ T69] ? trace_irq_enable+0xa1/0xda 
[ 112.371195][ T69] ? ret_from_fork (include/linux/entry-common.h:397 include/linux/entry-common.h:449 arch/x86/kernel/process.c:156) 
[ 112.371685][ T69] ? umh_complete (kernel/umh.c:64) 
[ 112.372160][ T69] ret_from_fork_asm (arch/x86/entry/entry_64.S:254) 
[  112.372670][   T69]  </TASK>
[  112.373019][   T69] irq event stamp: 1233
[ 112.373460][ T69] hardirqs last enabled at (1243): __up_console_sem (arch/x86/include/asm/irqflags.h:26 (discriminator 1) arch/x86/include/asm/irqflags.h:87 (discriminator 1) arch/x86/include/asm/irqflags.h:147 (discriminator 1) kernel/printk/printk.c:344 (discriminator 1)) 
[ 112.374413][ T69] hardirqs last disabled at (1254): __up_console_sem (kernel/printk/printk.c:342 (discriminator 1)) 
[ 112.375342][ T69] softirqs last enabled at (928): handle_softirqs (arch/x86/include/asm/preempt.h:26 kernel/softirq.c:408 kernel/softirq.c:589) 
[ 112.376269][ T69] softirqs last disabled at (917): __irq_exit_rcu (kernel/softirq.c:435 kernel/softirq.c:662) 
[  112.377174][   T69] ---[ end trace 0000000000000000 ]---


The kernel config and materials to reproduce are available at:
https://download.01.org/0day-ci/archive/20250127/202501272352.d9bc5c3-lkp@intel.com



-- 
0-DAY CI Kernel Test Service
https://github.com/intel/lkp-tests/wiki


      reply	other threads:[~2025-01-28  1:44 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2025-01-24 22:30 [PATCH v3 0/4] entry: Move ret_from_fork() to C and inline syscall_exit_to_user_mode() Charlie Jenkins
2025-01-24 22:30 ` [PATCH v3 1/4] riscv: entry: Convert ret_from_fork() to C Charlie Jenkins
2025-01-24 22:31 ` [PATCH v3 2/4] riscv: entry: Split ret_from_fork() into user and kernel Charlie Jenkins
2025-01-24 22:31 ` [PATCH v3 3/4] LoongArch: entry: Migrate ret_from_fork() to C Charlie Jenkins
2025-01-24 22:31 ` [PATCH v3 4/4] entry: Inline syscall_exit_to_user_mode() Charlie Jenkins
2025-01-28  1:44   ` kernel test robot [this message]

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=202501272352.d9bc5c3-lkp@intel.com \
    --to=oliver.sang@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=lkp@intel.com \
    --cc=loongarch@lists.linux.dev \
    --cc=luto@kernel.org \
    --cc=oe-lkp@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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox