[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Message-ID: <202508291620.bcfb3924-lkp@intel.com>
Date: Sat, 30 Aug 2025 14:56:31 +0800
From: kernel test robot <oliver.sang@...el.com>
To: Marcos Del Sol Vives <marcos@...a.pet>
CC: <oe-lkp@...ts.linux.dev>, <lkp@...el.com>, <linux-kernel@...r.kernel.org>,
<marcos@...a.pet>, Thomas Gleixner <tglx@...utronix.de>, Ingo Molnar
<mingo@...hat.com>, Borislav Petkov <bp@...en8.de>, Dave Hansen
<dave.hansen@...ux.intel.com>, <x86@...nel.org>, "H. Peter Anvin"
<hpa@...or.com>, Peter Zijlstra <peterz@...radead.org>, Kees Cook
<kees@...nel.org>, "Xin Li (Intel)" <xin@...or.com>, Sabyrzhan Tasbolatov
<snovitoll@...il.com>, <oliver.sang@...el.com>
Subject: Re: [PATCH v2] x86: add hintable NOPs emulation
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@...el.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
Powered by blists - more mailing lists