All of lore.kernel.org
 help / color / mirror / Atom feed
From: kernel test robot <oliver.sang@intel.com>
To: "Paul E. McKenney" <paulmck@kernel.org>
Cc: <oe-lkp@lists.linux.dev>, <lkp@intel.com>, <rcu@vger.kernel.org>,
	<oliver.sang@intel.com>
Subject: [paulmckrcu:dev.2024.12.23a] [srcu]  c634c0678e: UBSAN:array-index-out-of-bounds_in_kernel/rcu/srcutree.c
Date: Fri, 27 Dec 2024 17:17:18 +0800	[thread overview]
Message-ID: <202412271623.8ceb422e-lkp@intel.com> (raw)



Hello,

kernel test robot noticed "UBSAN:array-index-out-of-bounds_in_kernel/rcu/srcutree.c" on:

commit: c634c0678e8b46a432aaf2993cc3fb81b6941981 ("srcu: Make Tree SRCU updates independent of ->srcu_idx")
https://github.com/paulmckrcu/linux dev.2024.12.23a

in testcase: rcutorture
version: 
with following parameters:

	runtime: 300s
	test: cpuhotplug
	torture_type: srcud



config: x86_64-randconfig-074-20241226
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)



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/202412271623.8ceb422e-lkp@intel.com


[  434.917288][ T2320] ------------[ cut here ]------------
[  434.938323][ T2320] UBSAN: array-index-out-of-bounds in kernel/rcu/srcutree.c:1918:9
[  434.941267][ T2320] index -23500 is out of range for type 'srcu_ctr [2]'
[  434.942019][ T2320] CPU: 1 UID: 0 PID: 2320 Comm: rmmod Tainted: G                T  6.13.0-rc1-00070-gc634c0678e8b #1
[  434.943103][ T2320] Tainted: [T]=RANDSTRUCT
[  434.943530][ T2320] Call Trace:
[  434.943893][ T2320]  <TASK>
[ 434.944224][ T2320] dump_stack_lvl (lib/dump_stack.c:123)
[ 434.944766][ T2320] ubsan_epilogue (lib/ubsan.c:232)
[ 434.945286][ T2320] __ubsan_handle_out_of_bounds (lib/ubsan.c:429)
[ 434.945896][ T2320] srcu_torture_stats_print (kernel/rcu/srcutree.c:1918)
[ 434.946535][ T2320] rcu_torture_stats_print (kernel/rcu/rcutorture.c:2445) rcutorture
[ 434.947574][ T2320] ? rcu_torture_preempt (kernel/rcu/rcutorture.c:2362) rcutorture
[ 434.948560][ T2320] ? kfree (mm/slub.c:4598 mm/slub.c:4746)
[ 434.948994][ T2320] ? vfree (mm/vmalloc.c:3388)
[ 434.949526][ T2320] ? rcu_torture_mem_dump_obj (kernel/rcu/rcutorture.c:2489) rcutorture
[ 434.950627][ T2320] ? __sanitizer_cov_trace_pc (kernel/kcov.c:217)
[ 434.951294][ T2320] ? cleanup_srcu_struct (kernel/rcu/srcutree.c:711)
[ 434.951899][ T2320] rcu_torture_cleanup (kernel/rcu/rcutorture.c:3664) rcutorture
[ 434.952906][ T2320] ? ftrace_likely_update (arch/x86/include/asm/smap.h:56 kernel/trace/trace_branch.c:225)
[ 434.953470][ T2320] ? rcu_torture_print_module_parms+0x104/0x104 rcutorture
[ 434.954601][ T2320] ? __mutex_unlock_slowpath (kernel/locking/mutex.c:914)
[ 434.955225][ T2320] ? build_sched_groups (kernel/sched/wait.c:383)
[ 434.955799][ T2320] ? write_comp_data (kernel/kcov.c:246)
[ 434.956334][ T2320] ? ftrace_likely_update (arch/x86/include/asm/smap.h:56 kernel/trace/trace_branch.c:225)
[ 434.956905][ T2320] ? __sanitizer_cov_trace_pc (kernel/kcov.c:217)
[ 434.961646][ T2320] __do_sys_delete_module+0x36a/0x4ed
[ 434.962321][ T2320] ? module_flags (kernel/module/main.c:732)
[ 434.962828][ T2320] ? ftrace_likely_update (kernel/trace/trace_branch.c:220)
[ 434.963408][ T2320] ? write_comp_data (kernel/kcov.c:246)
[ 434.963949][ T2320] ? ftrace_likely_update (kernel/trace/trace_branch.c:220)
[ 434.964556][ T2320] ? ftrace_likely_update (kernel/trace/trace_branch.c:220)
[ 434.965115][ T2320] ? write_comp_data (kernel/kcov.c:246)
[ 434.965639][ T2320] ? ftrace_likely_update (arch/x86/include/asm/smap.h:56 kernel/trace/trace_branch.c:225)
[ 434.966188][ T2320] ? __sanitizer_cov_trace_pc (kernel/kcov.c:217)
[ 434.966797][ T2320] do_syscall_64 (arch/x86/entry/common.c:52 arch/x86/entry/common.c:83)
[ 434.967296][ T2320] ? entry_SYSCALL_64_after_hwframe (arch/x86/entry/entry_64.S:130)
[  434.967978][ T2320]  </TASK>
[  434.968715][ T2320] ---[ end trace ]---


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



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


                 reply	other threads:[~2024-12-27  9:18 UTC|newest]

Thread overview: [no followups] expand[flat|nested]  mbox.gz  Atom feed

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=202412271623.8ceb422e-lkp@intel.com \
    --to=oliver.sang@intel.com \
    --cc=lkp@intel.com \
    --cc=oe-lkp@lists.linux.dev \
    --cc=paulmck@kernel.org \
    --cc=rcu@vger.kernel.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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.