linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: kernel test robot <oliver.sang@intel.com>
To: Marcos Del Sol Vives <marcos@orca.pet>
Cc: <oe-lkp@lists.linux.dev>, <lkp@intel.com>,
	<linux-kernel@vger.kernel.org>, <marcos@orca.pet>,
	Thomas Gleixner <tglx@linutronix.de>,
	Ingo Molnar <mingo@redhat.com>, Borislav Petkov <bp@alien8.de>,
	Dave Hansen <dave.hansen@linux.intel.com>, <x86@kernel.org>,
	"H. Peter Anvin" <hpa@zytor.com>,
	Peter Zijlstra <peterz@infradead.org>,
	Kees Cook <kees@kernel.org>, "Xin Li (Intel)" <xin@zytor.com>,
	Sabyrzhan Tasbolatov <snovitoll@gmail.com>,
	<oliver.sang@intel.com>
Subject: Re: [PATCH v2] x86: add hintable NOPs emulation
Date: Sat, 30 Aug 2025 14:56:31 +0800	[thread overview]
Message-ID: <202508291620.bcfb3924-lkp@intel.com> (raw)
In-Reply-To: <20250820110437.560107-1-marcos@orca.pet>



Hello,

kernel test robot noticed "BUG:sleeping_function_called_from_invalid_context_at_include/linux/uaccess.h" on:

commit: 09c737e0df5a3dbf40e8da1d6e168bd6d7fd19f0 ("[PATCH v2] x86: add hintable NOPs emulation")
url: https://github.com/intel-lab-lkp/linux/commits/Marcos-Del-Sol-Vives/x86-add-hintable-NOPs-emulation/20250820-190618
base: https://git.kernel.org/cgit/linux/kernel/git/tip/tip.git 894af4a1cde61c3401f237184fb770f72ff12df8
patch link: https://lore.kernel.org/all/20250820110437.560107-1-marcos@orca.pet/
patch subject: [PATCH v2] x86: add hintable NOPs emulation

in testcase: trinity
version: trinity-i386-abe9de86-1_20230429
with following parameters:

	runtime: 600s



config: i386-randconfig-004-20250827
compiler: clang-20
test machine: qemu-system-x86_64 -enable-kvm -cpu SandyBridge -smp 2 -m 16G

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



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/202508291620.bcfb3924-lkp@intel.com


[   24.176151][ T2696] BUG: sleeping function called from invalid context at include/linux/uaccess.h:162
[   24.176703][ T2696] in_atomic(): 0, irqs_disabled(): 1, non_block: 0, pid: 2696, name: trinity-c4
[   24.177213][ T2696] preempt_count: 0, expected: 0
[   24.177492][ T2696] no locks held by trinity-c4/2696.
[   24.177788][ T2696] irq event stamp: 335112
[ 24.178030][ T2696] hardirqs last enabled at (335111): irqentry_exit (kernel/entry/common.c:210) 
[ 24.178521][ T2696] hardirqs last disabled at (335112): irqentry_enter (kernel/entry/common.c:?) 
[ 24.179004][ T2696] softirqs last enabled at (332212): __do_softirq (kernel/softirq.c:614) 
[ 24.179473][ T2696] softirqs last disabled at (332207): __do_softirq (kernel/softirq.c:614) 
[   24.179948][ T2696] CPU: 1 UID: 65534 PID: 2696 Comm: trinity-c4 Tainted: G                T   6.17.0-rc2-00017-g09c737e0df5a #1 VOLUNTARY
[   24.179952][ T2696] Tainted: [T]=RANDSTRUCT
[   24.179954][ T2696] Call Trace:
[ 24.179956][ T2696] __dump_stack (lib/dump_stack.c:95) 
[ 24.179961][ T2696] dump_stack_lvl (lib/dump_stack.c:123) 
[ 24.179963][ T2696] ? nbcon_get_cpu_emergency_nesting (kernel/printk/nbcon.c:1375) 
[ 24.179967][ T2696] dump_stack (lib/dump_stack.c:129) 
[ 24.179969][ T2696] __might_resched (kernel/sched/core.c:8958) 
[ 24.179976][ T2696] __might_sleep (kernel/sched/core.c:8887) 
[ 24.179979][ T2696] __might_fault (mm/memory.c:6957) 
[ 24.179983][ T2696] _copy_from_user (include/linux/uaccess.h:?) 
[ 24.179991][ T2696] insn_fetch_from_user (include/linux/uaccess.h:212 arch/x86/lib/insn-eval.c:1516) 
[ 24.179995][ T2696] handle_invalid_op (arch/x86/kernel/traps.c:308) 
[ 24.180010][ T2696] ? exc_overflow (arch/x86/kernel/traps.c:417) 
[ 24.180012][ T2696] exc_invalid_op (arch/x86/kernel/traps.c:432) 
[ 24.180014][ T2696] handle_exception (arch/x86/entry/entry_32.S:1055) 
[   24.180017][ T2696] EIP: 0x434433
[ 24.180025][ T2696] Code: d8 ba 3b ab 45 74 a5 5b 8a ef a2 59 f6 b5 0c b9 82 33 c3 f1 23 2e da 6f 60 f0 65 13 13 44 c5 b7 3a 06 f6 a2 3c 53 db 3b 28 30 <f0> ce 36 c2 77 c0 2b 9b fd 83 f2 04 89 08 45 5d 8b 0b c3 d0 8a 38
All code
========
   0:	d8 ba 3b ab 45 74    	fdivrs 0x7445ab3b(%rdx)
   6:	a5                   	movsl  %ds:(%rsi),%es:(%rdi)
   7:	5b                   	pop    %rbx
   8:	8a ef                	mov    %bh,%ch
   a:	a2 59 f6 b5 0c b9 82 	movabs %al,0xc33382b90cb5f659
  11:	33 c3 
  13:	f1                   	int1
  14:	23 2e                	and    (%rsi),%ebp
  16:	da 6f 60             	fisubrl 0x60(%rdi)
  19:	f0 65 13 13          	lock adc %gs:(%rbx),%edx
  1d:	44 c5 b7 3a          	(bad)
  21:	06                   	(bad)
  22:	f6 a2 3c 53 db 3b    	mulb   0x3bdb533c(%rdx)
  28:	28 30                	sub    %dh,(%rax)
  2a:*	f0 ce                	lock (bad)		<-- trapping instruction
  2c:	36 c2 77 c0          	ss ret $0xc077
  30:	2b 9b fd 83 f2 04    	sub    0x4f283fd(%rbx),%ebx
  36:	89 08                	mov    %ecx,(%rax)
  38:	45 5d                	rex.RB pop %r13
  3a:	8b 0b                	mov    (%rbx),%ecx
  3c:	c3                   	ret
  3d:	d0                   	.byte 0xd0
  3e:	8a 38                	mov    (%rax),%bh

Code starting with the faulting instruction
===========================================
   0:	f0 ce                	lock (bad)
   2:	36 c2 77 c0          	ss ret $0xc077
   6:	2b 9b fd 83 f2 04    	sub    0x4f283fd(%rbx),%ebx
   c:	89 08                	mov    %ecx,(%rax)
   e:	45 5d                	rex.RB pop %r13
  10:	8b 0b                	mov    (%rbx),%ecx
  12:	c3                   	ret
  13:	d0                   	.byte 0xd0
  14:	8a 38                	mov    (%rax),%bh
[   24.180028][ T2696] EAX: 00400000 EBX: 00465000 ECX: 00058000 EDX: 00100000
[   24.180030][ T2696] ESI: b72df000 EDI: b7f53234 EBP: b72df030 ESP: bfd7948c
[   24.180031][ T2696] DS: 007b ES: 007b FS: 0000 GS: 0033 SS: 007b EFLAGS: 00010246
[ 24.180036][ T2696] ? exc_overflow (arch/x86/kernel/traps.c:417) 


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



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


  parent reply	other threads:[~2025-08-30  6:57 UTC|newest]

Thread overview: 10+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2025-08-20 11:04 [PATCH v2] x86: add hintable NOPs emulation Marcos Del Sol Vives
2025-08-20 15:31 ` H. Peter Anvin
2025-08-30  6:56 ` kernel test robot [this message]
2025-08-31 14:34   ` Marcos Del Sol Vives
2025-08-31 19:32     ` H. Peter Anvin
2025-09-01 11:43       ` Marcos Del Sol Vives
2025-09-01 21:28         ` H. Peter Anvin
2025-09-02  8:16           ` Marc Haber
2025-09-02 10:52             ` Marcos Del Sol Vives
2025-08-31 19:48     ` David Laight

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=202508291620.bcfb3924-lkp@intel.com \
    --to=oliver.sang@intel.com \
    --cc=bp@alien8.de \
    --cc=dave.hansen@linux.intel.com \
    --cc=hpa@zytor.com \
    --cc=kees@kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=lkp@intel.com \
    --cc=marcos@orca.pet \
    --cc=mingo@redhat.com \
    --cc=oe-lkp@lists.linux.dev \
    --cc=peterz@infradead.org \
    --cc=snovitoll@gmail.com \
    --cc=tglx@linutronix.de \
    --cc=x86@kernel.org \
    --cc=xin@zytor.com \
    /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;
as well as URLs for NNTP newsgroup(s).