[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <202510151429.2c3f3413-lkp@intel.com>
Date: Wed, 15 Oct 2025 14:57:37 +0800
From: kernel test robot <oliver.sang@...el.com>
To: Tim Chen <tim.c.chen@...ux.intel.com>
CC: <oe-lkp@...ts.linux.dev>, <lkp@...el.com>, Tim Chen
<tim.c.chen@...ux.intel.com>, <linux-kernel@...r.kernel.org>,
<aubrey.li@...ux.intel.com>, <yu.c.chen@...el.com>, Peter Zijlstra
<peterz@...radead.org>, Ingo Molnar <mingo@...hat.com>, K Prateek Nayak
<kprateek.nayak@....com>, "Gautham R . Shenoy" <gautham.shenoy@....com>,
Vincent Guittot <vincent.guittot@...aro.org>, Juri Lelli
<juri.lelli@...hat.com>, Dietmar Eggemann <dietmar.eggemann@....com>, "Steven
Rostedt" <rostedt@...dmis.org>, Ben Segall <bsegall@...gle.com>, Mel Gorman
<mgorman@...e.de>, Valentin Schneider <vschneid@...hat.com>, "Madadi Vineeth
Reddy" <vineethr@...ux.ibm.com>, Hillf Danton <hdanton@...a.com>, "Shrikanth
Hegde" <sshegde@...ux.ibm.com>, Jianyong Wu <jianyong.wu@...look.com>,
"Yangyu Chen" <cyy@...self.name>, Tingyin Duan <tingyin.duan@...il.com>, Vern
Hao <vernhao@...cent.com>, Len Brown <len.brown@...el.com>, Aubrey Li
<aubrey.li@...el.com>, Zhao Liu <zhao1.liu@...el.com>, Chen Yu
<yu.chen.surf@...il.com>, Libo Chen <libo.chen@...cle.com>, Adam Li
<adamli@...amperecomputing.com>, Tim Chen <tim.c.chen@...el.com>,
<oliver.sang@...el.com>
Subject: Re: [PATCH 18/19] sched/fair: Avoid cache-aware scheduling for
memory-heavy processes
Hello,
kernel test robot noticed "UBSAN:array-index-out-of-bounds_in_drivers/base/cacheinfo.c" on:
commit: e8b871200f11decae96692a3f5b385cdc25af231 ("[PATCH 18/19] sched/fair: Avoid cache-aware scheduling for memory-heavy processes")
url: https://github.com/intel-lab-lkp/linux/commits/Tim-Chen/sched-fair-Add-infrastructure-for-cache-aware-load-balancing/20251012-022248
base: https://git.kernel.org/cgit/linux/kernel/git/tip/tip.git 45b7f780739a3145aeef24d2dfa02517a6c82ed6
patch link: https://lore.kernel.org/all/00da49fd590b95baad0525660bda4c0ba178243d.1760206683.git.tim.c.chen@linux.intel.com/
patch subject: [PATCH 18/19] sched/fair: Avoid cache-aware scheduling for memory-heavy processes
in testcase: boot
config: i386-randconfig-003-20251012
compiler: clang-20
test machine: qemu-system-i386 -enable-kvm -cpu SandyBridge -smp 2 -m 4G
(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/202510151429.2c3f3413-lkp@intel.com
[ 12.549731][ T83] ------------[ cut here ]------------
[ 12.550388][ T83] UBSAN: array-index-out-of-bounds in drivers/base/cacheinfo.c:37:9
[ 12.551060][ T83] index 4294967295 is out of range for type 'unsigned long[8]'
[ 12.551580][ T83] CPU: 0 UID: 0 PID: 83 Comm: systemd-journal Not tainted 6.17.0-rc4-00035-ge8b871200f11 #1 PREEMPTLAZY
[ 12.551585][ T83] Call Trace:
[ 12.551588][ T83] __dump_stack (lib/dump_stack.c:95)
[ 12.551594][ T83] dump_stack_lvl (lib/dump_stack.c:123)
[ 12.551601][ T83] ubsan_epilogue.llvm.16751680356772289369 (lib/dump_stack.c:129 lib/ubsan.c:233)
[ 12.551607][ T83] __ubsan_handle_out_of_bounds (lib/ubsan.c:?)
[ 12.551621][ T83] get_cpu_cacheinfo (drivers/base/cacheinfo.c:?)
[ 12.551625][ T83] exceed_llc_capacity (include/linux/cacheinfo.h:? kernel/sched/fair.c:1256)
[ 12.551632][ T83] task_cache_work.llvm.12119588225164800824 (kernel/sched/fair.c:1527)
[ 12.551637][ T83] ? task_work_run (kernel/task_work.c:?)
[ 12.551641][ T83] ? _raw_spin_unlock_irq (arch/x86/include/asm/irqflags.h:42 arch/x86/include/asm/irqflags.h:119 include/linux/spinlock_api_smp.h:159 kernel/locking/spinlock.c:202)
[ 12.551644][ T83] ? __this_cpu_preempt_check (lib/smp_processor_id.c:65)
[ 12.551648][ T83] ? lockdep_hardirqs_on (kernel/locking/lockdep.c:4472)
[ 12.551650][ T83] ? _raw_spin_unlock_irq (arch/x86/include/asm/irqflags.h:42 arch/x86/include/asm/irqflags.h:119 include/linux/spinlock_api_smp.h:159 kernel/locking/spinlock.c:202)
[ 12.551652][ T83] ? task_work_run (kernel/task_work.c:?)
[ 12.551655][ T83] ? trace_hardirqs_on (kernel/trace/trace_preemptirq.c:80)
[ 12.551662][ T83] task_work_run (kernel/task_work.c:229)
[ 12.551668][ T83] resume_user_mode_work (include/linux/resume_user_mode.h:?)
[ 12.551673][ T83] irqentry_exit_to_user_mode (kernel/entry/common.c:53 include/linux/irq-entry-common.h:225 kernel/entry/common.c:73)
[ 12.551676][ T83] ? sysvec_call_function_single (arch/x86/kernel/apic/apic.c:1050)
[ 12.551681][ T83] irqentry_exit (kernel/entry/common.c:210)
[ 12.551684][ T83] sysvec_apic_timer_interrupt (arch/x86/kernel/apic/apic.c:1050)
[ 12.551689][ T83] handle_exception (arch/x86/entry/entry_32.S:1055)
[ 12.551691][ T83] EIP: 0x3764e8f0
[ 12.551694][ T83] Code: 00 00 89 c2 eb d2 65 c7 05 28 02 00 00 ff ff ff ff 65 a1 08 00 00 00 f0 83 88 84 00 00 00 10 65 a1 80 00 00 00 e8 f0 02 00 00 <8b> 44 24 04 8b 54 24 08 89 10 8b 54 24 0c 89 50 04 65 8b 15 7c 00
All code
========
0: 00 00 add %al,(%rax)
2: 89 c2 mov %eax,%edx
4: eb d2 jmp 0xffffffffffffffd8
6: 65 c7 05 28 02 00 00 movl $0xffffffff,%gs:0x228(%rip) # 0x239
d: ff ff ff ff
11: 65 a1 08 00 00 00 f0 movabs %gs:0x848883f000000008,%eax
18: 83 88 84
1b: 00 00 add %al,(%rax)
1d: 00 10 add %dl,(%rax)
1f: 65 a1 80 00 00 00 e8 movabs %gs:0x2f0e800000080,%eax
26: f0 02 00
29:* 00 8b 44 24 04 8b add %cl,-0x74fbdbbc(%rbx) <-- trapping instruction
2f: 54 push %rsp
30: 24 08 and $0x8,%al
32: 89 10 mov %edx,(%rax)
34: 8b 54 24 0c mov 0xc(%rsp),%edx
38: 89 50 04 mov %edx,0x4(%rax)
3b: 65 gs
3c: 8b .byte 0x8b
3d: 15 .byte 0x15
3e: 7c 00 jl 0x40
Code starting with the faulting instruction
===========================================
0: 8b 44 24 04 mov 0x4(%rsp),%eax
4: 8b 54 24 08 mov 0x8(%rsp),%edx
8: 89 10 mov %edx,(%rax)
a: 8b 54 24 0c mov 0xc(%rsp),%edx
e: 89 50 04 mov %edx,0x4(%rax)
11: 65 gs
12: 8b .byte 0x8b
13: 15 .byte 0x15
14: 7c 00 jl 0x16
[ 12.551696][ T83] EAX: 3fdacc1c EBX: 36a49ba8 ECX: 36a49d64 EDX: 00000001
[ 12.551697][ T83] ESI: 00000000 EDI: 36a49b40 EBP: 00000000 ESP: 3fdacbdc
[ 12.551699][ T83] DS: 007b ES: 007b FS: 0000 GS: 0033 SS: 007b EFLAGS: 00200212
[ 12.551708][ T83] ? sysvec_call_function_single (arch/x86/kernel/apic/apic.c:1050)
[ 12.551717][ T83] ---[ end trace ]---
The kernel config and materials to reproduce are available at:
https://download.01.org/0day-ci/archive/20251015/202510151429.2c3f3413-lkp@intel.com
--
0-DAY CI Kernel Test Service
https://github.com/intel/lkp-tests/wiki
Powered by blists - more mailing lists