From: kernel test robot <oliver.sang@intel.com>
To: Jinyu Tang <tangjinyu@tinylab.org>
Cc: <oe-lkp@lists.linux.dev>, <lkp@intel.com>,
Jiexun Wang <wangjiexun@tinylab.org>,
<linux-kernel@vger.kernel.org>,
<linux-trace-kernel@vger.kernel.org>, <rostedt@goodmis.org>,
<mhiramat@kernel.org>, <bristot@kernel.org>,
<ttjjyystupid@163.com>, <falcon@tinylab.org>,
Jinyu Tang <tangjinyu@tinylab.org>, <oliver.sang@intel.com>
Subject: Re: [PATCH v1] Ftrace: make sched_wakeup can focus on the target process
Date: Fri, 20 Oct 2023 15:59:03 +0800 [thread overview]
Message-ID: <202310201530.46065346-oliver.sang@intel.com> (raw)
In-Reply-To: <20231009153714.10743-1-tangjinyu@tinylab.org>
Hello,
kernel test robot noticed "BUG:kernel_NULL_pointer_dereference,address" on:
commit: e70b12f847f6d1b5db838c0eefa9d1d00c1591bd ("[PATCH v1] Ftrace: make sched_wakeup can focus on the target process")
url: https://github.com/intel-lab-lkp/linux/commits/Jinyu-Tang/Ftrace-make-sched_wakeup-can-focus-on-the-target-process/20231009-234127
base: https://git.kernel.org/cgit/linux/kernel/git/torvalds/linux.git 94f6f0550c625fab1f373bb86a6669b45e9748b3
patch link: https://lore.kernel.org/all/20231009153714.10743-1-tangjinyu@tinylab.org/
patch subject: [PATCH v1] Ftrace: make sched_wakeup can focus on the target process
in testcase: boot
compiler: gcc-7
test machine: qemu-system-x86_64 -enable-kvm -cpu SandyBridge -smp 2 -m 16G
(please refer to attached dmesg/kmsg for entire log/backtrace)
+---------------------------------------------+----------+------------+
| | v6.6-rc5 | e70b12f847 |
+---------------------------------------------+----------+------------+
| boot_successes | 33 | 0 |
| boot_failures | 0 | 18 |
| BUG:kernel_NULL_pointer_dereference,address | 0 | 18 |
| Oops:#[##] | 0 | 18 |
| EIP:__kmem_cache_alloc_lru | 0 | 18 |
| Kernel_panic-not_syncing:Fatal_exception | 0 | 18 |
+---------------------------------------------+----------+------------+
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/202310201530.46065346-oliver.sang@intel.com
[ 6.082261][ T1] BUG: kernel NULL pointer dereference, address: 0000000c
[ 6.083178][ T1] #PF: supervisor read access in kernel mode
[ 6.083178][ T1] #PF: error_code(0x0000) - not-present page
[ 6.083178][ T1] *pde = 00000000
[ 6.083178][ T1] Oops: 0000 [#1]
[ 6.083178][ T1] CPU: 0 PID: 1 Comm: swapper Not tainted 6.6.0-rc5-00001-ge70b12f847f6 #1
[ 6.083178][ T1] EIP: __kmem_cache_alloc_lru+0x1d/0x88
[ 6.083178][ T1] Code: 04 eb a7 31 db e9 a5 fe ff ff 8d 76 00 3e 8d 74 26 00 55 b9 ff ff ff ff 89 e5 83 ec 18 89 5d f4 89 c3 89 75 f8 89 7d fc 89 d7 <8b> 40 0c 89 04 24 89 d8 e8 ca fd ff ff 8b 55 04 89 c6 a1 e4 38 25
All code
========
0: 04 eb add $0xeb,%al
2: a7 cmpsl %es:(%rdi),%ds:(%rsi)
3: 31 db xor %ebx,%ebx
5: e9 a5 fe ff ff jmpq 0xfffffffffffffeaf
a: 8d 76 00 lea 0x0(%rsi),%esi
d: 3e 8d 74 26 00 lea %ds:0x0(%rsi,%riz,1),%esi
12: 55 push %rbp
13: b9 ff ff ff ff mov $0xffffffff,%ecx
18: 89 e5 mov %esp,%ebp
1a: 83 ec 18 sub $0x18,%esp
1d: 89 5d f4 mov %ebx,-0xc(%rbp)
20: 89 c3 mov %eax,%ebx
22: 89 75 f8 mov %esi,-0x8(%rbp)
25: 89 7d fc mov %edi,-0x4(%rbp)
28: 89 d7 mov %edx,%edi
2a:* 8b 40 0c mov 0xc(%rax),%eax <-- trapping instruction
2d: 89 04 24 mov %eax,(%rsp)
30: 89 d8 mov %ebx,%eax
32: e8 ca fd ff ff callq 0xfffffffffffffe01
37: 8b 55 04 mov 0x4(%rbp),%edx
3a: 89 c6 mov %eax,%esi
3c: a1 .byte 0xa1
3d: e4 38 in $0x38,%al
3f: 25 .byte 0x25
Code starting with the faulting instruction
===========================================
0: 8b 40 0c mov 0xc(%rax),%eax
3: 89 04 24 mov %eax,(%rsp)
6: 89 d8 mov %ebx,%eax
8: e8 ca fd ff ff callq 0xfffffffffffffdd7
d: 8b 55 04 mov 0x4(%rbp),%edx
10: 89 c6 mov %eax,%esi
12: a1 .byte 0xa1
13: e4 38 in $0x38,%al
15: 25 .byte 0x25
[ 6.083178][ T1] EAX: 00000000 EBX: 00000000 ECX: ffffffff EDX: 00000cc0
[ 6.083178][ T1] ESI: c3213800 EDI: 00000cc0 EBP: c3217d78 ESP: c3217d60
[ 6.083178][ T1] DS: 007b ES: 007b FS: 0000 GS: 0000 SS: 0068 EFLAGS: 00010286
[ 6.083178][ T1] CR0: 80050033 CR2: 0000000c CR3: 02364000 CR4: 000406d0
[ 6.083178][ T1] DR0: 00000000 DR1: 00000000 DR2: 00000000 DR3: 00000000
[ 6.083178][ T1] DR6: fffe0ff0 DR7: 00000400
[ 6.083178][ T1] Call Trace:
[ 6.083178][ T1] ? show_regs (arch/x86/kernel/dumpstack.c:479)
[ 6.083178][ T1] ? __die_body (arch/x86/kernel/dumpstack.c:421)
[ 6.083178][ T1] ? __die (arch/x86/kernel/dumpstack.c:435)
[ 6.083178][ T1] ? page_fault_oops (arch/x86/mm/fault.c:702)
[ 6.083178][ T1] ? kernelmode_fixup_or_oops+0x94/0xf4
[ 6.083178][ T1] ? __bad_area_nosemaphore+0x12f/0x1e4
[ 6.083178][ T1] ? bad_area_nosemaphore (arch/x86/mm/fault.c:867)
[ 6.083178][ T1] ? exc_page_fault (arch/x86/mm/fault.c:1472 arch/x86/mm/fault.c:1505 arch/x86/mm/fault.c:1561)
[ 6.083178][ T1] ? _raw_spin_unlock (kernel/locking/spinlock.c:187)
[ 6.083178][ T1] ? pvclock_clocksource_read_nowd (arch/x86/mm/fault.c:1518)
[ 6.083178][ T1] ? handle_exception (arch/x86/entry/entry_32.S:1049)
[ 6.083178][ T1] ? lookup_open (fs/namei.c:3121 fs/namei.c:3153 fs/namei.c:3456)
[ 6.083178][ T1] ? pvclock_clocksource_read_nowd (arch/x86/mm/fault.c:1518)
[ 6.083178][ T1] ? __kmem_cache_alloc_lru+0x1d/0x88
[ 6.083178][ T1] ? pvclock_clocksource_read_nowd (arch/x86/mm/fault.c:1518)
[ 6.083178][ T1] ? __kmem_cache_alloc_lru+0x1d/0x88
[ 6.083178][ T1] kmem_cache_alloc (mm/slub.c:3503)
[ 6.083178][ T1] tracefs_alloc_inode (fs/tracefs/inode.c:38)
[ 6.083178][ T1] alloc_inode (fs/inode.c:259)
[ 6.083178][ T1] new_inode_pseudo (fs/inode.c:1006)
[ 6.083178][ T1] new_inode (fs/inode.c:1031)
[ 6.083178][ T1] tracefs_get_inode (fs/tracefs/inode.c:153)
[ 6.083178][ T1] ? tracefs_start_creating (fs/tracefs/inode.c:470)
[ 6.083178][ T1] tracefs_create_file (fs/tracefs/inode.c:616)
[ 6.083178][ T1] ? set_tracer_flag (kernel/trace/trace.c:5441)
[ 6.083178][ T1] __wakeup_tracer_init (kernel/trace/trace_sched_wakeup.c:858)
[ 6.083178][ T1] wakeup_tracer_init (kernel/trace/trace_sched_wakeup.c:873)
[ 6.083178][ T1] trace_selftest_startup_wakeup (kernel/trace/trace_selftest.c:1216 (discriminator 1))
[ 6.083178][ T1] ? trace_selftest_ops (kernel/trace/trace_selftest.c:1155)
[ 6.083178][ T1] ? wait_for_completion (kernel/sched/completion.c:97 kernel/sched/completion.c:116 kernel/sched/completion.c:127 kernel/sched/completion.c:148)
[ 6.083178][ T1] run_tracer_selftest (kernel/trace/trace.c:2026)
[ 6.083178][ T1] register_tracer (kernel/trace/trace.c:2063 kernel/trace/trace.c:2187)
[ 6.083178][ T1] init_wakeup_tracer (kernel/trace/trace_sched_wakeup.c:985)
[ 6.083178][ T1] ? init_function_trace (kernel/trace/trace_sched_wakeup.c:982)
[ 6.083178][ T1] do_one_initcall (init/main.c:1232)
[ 6.083178][ T1] ? parameq (kernel/params.c:89 kernel/params.c:98)
[ 6.083178][ T1] ? parse_args (kernel/params.c:184)
[ 6.083178][ T1] ? kernel_init_freeable (init/main.c:1304 init/main.c:1329 init/main.c:1547)
[ 6.083178][ T1] kernel_init_freeable (init/main.c:1293 init/main.c:1310 init/main.c:1329 init/main.c:1547)
[ 6.083178][ T1] ? rdinit_setup (init/main.c:1278)
[ 6.083178][ T1] ? rest_init (init/main.c:1429)
[ 6.083178][ T1] kernel_init (init/main.c:1439)
[ 6.083178][ T1] ? schedule_tail (kernel/sched/core.c:5318)
[ 6.083178][ T1] ret_from_fork (arch/x86/kernel/process.c:153)
[ 6.083178][ T1] ? rest_init (init/main.c:1429)
[ 6.083178][ T1] ret_from_fork_asm (arch/x86/entry/entry_32.S:741)
[ 6.083178][ T1] entry_INT80_32 (arch/x86/entry/entry_32.S:947)
[ 6.083178][ T1] Modules linked in:
[ 6.083178][ T1] CR2: 000000000000000c
[ 6.083178][ T1] ---[ end trace 0000000000000000 ]---
[ 6.083178][ T1] EIP: __kmem_cache_alloc_lru+0x1d/0x88
[ 6.083178][ T1] Code: 04 eb a7 31 db e9 a5 fe ff ff 8d 76 00 3e 8d 74 26 00 55 b9 ff ff ff ff 89 e5 83 ec 18 89 5d f4 89 c3 89 75 f8 89 7d fc 89 d7 <8b> 40 0c 89 04 24 89 d8 e8 ca fd ff ff 8b 55 04 89 c6 a1 e4 38 25
All code
========
0: 04 eb add $0xeb,%al
2: a7 cmpsl %es:(%rdi),%ds:(%rsi)
3: 31 db xor %ebx,%ebx
5: e9 a5 fe ff ff jmpq 0xfffffffffffffeaf
a: 8d 76 00 lea 0x0(%rsi),%esi
d: 3e 8d 74 26 00 lea %ds:0x0(%rsi,%riz,1),%esi
12: 55 push %rbp
13: b9 ff ff ff ff mov $0xffffffff,%ecx
18: 89 e5 mov %esp,%ebp
1a: 83 ec 18 sub $0x18,%esp
1d: 89 5d f4 mov %ebx,-0xc(%rbp)
20: 89 c3 mov %eax,%ebx
22: 89 75 f8 mov %esi,-0x8(%rbp)
25: 89 7d fc mov %edi,-0x4(%rbp)
28: 89 d7 mov %edx,%edi
2a:* 8b 40 0c mov 0xc(%rax),%eax <-- trapping instruction
2d: 89 04 24 mov %eax,(%rsp)
30: 89 d8 mov %ebx,%eax
32: e8 ca fd ff ff callq 0xfffffffffffffe01
37: 8b 55 04 mov 0x4(%rbp),%edx
3a: 89 c6 mov %eax,%esi
3c: a1 .byte 0xa1
3d: e4 38 in $0x38,%al
3f: 25 .byte 0x25
Code starting with the faulting instruction
===========================================
0: 8b 40 0c mov 0xc(%rax),%eax
3: 89 04 24 mov %eax,(%rsp)
6: 89 d8 mov %ebx,%eax
8: e8 ca fd ff ff callq 0xfffffffffffffdd7
d: 8b 55 04 mov 0x4(%rbp),%edx
10: 89 c6 mov %eax,%esi
12: a1 .byte 0xa1
13: e4 38 in $0x38,%al
15: 25 .byte 0x25
The kernel config and materials to reproduce are available at:
https://download.01.org/0day-ci/archive/20231020/202310201530.46065346-oliver.sang@intel.com
--
0-DAY CI Kernel Test Service
https://github.com/intel/lkp-tests/wiki
prev parent reply other threads:[~2023-10-20 7:59 UTC|newest]
Thread overview: 5+ messages / expand[flat|nested] mbox.gz Atom feed top
2023-10-09 15:37 [PATCH v1] Ftrace: make sched_wakeup can focus on the target process Jinyu Tang
2023-10-09 16:25 ` Steven Rostedt
2023-10-10 6:53 ` Daniel Bristot de Oliveira
2023-10-11 1:13 ` kernel test robot
2023-10-20 7:59 ` 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=202310201530.46065346-oliver.sang@intel.com \
--to=oliver.sang@intel.com \
--cc=bristot@kernel.org \
--cc=falcon@tinylab.org \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-trace-kernel@vger.kernel.org \
--cc=lkp@intel.com \
--cc=mhiramat@kernel.org \
--cc=oe-lkp@lists.linux.dev \
--cc=rostedt@goodmis.org \
--cc=tangjinyu@tinylab.org \
--cc=ttjjyystupid@163.com \
--cc=wangjiexun@tinylab.org \
/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).