Re: [PATCHv2 3/3] drm/i915/display: Populate list of async supported formats/modifiers

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 




Hello,

kernel test robot noticed "BUG:KASAN:global-out-of-bounds_in_drm_plane_create_format_blob" on:

commit: ab8ee1a4b22d80e3812a6d9990b92d77eee4a17f ("[PATCHv2 3/3] drm/i915/display: Populate list of async supported formats/modifiers")
url: https://github.com/intel-lab-lkp/linux/commits/Arun-R-Murthy/drm-plane-Expose-function-to-create-format-modifier-blob/20241121-105652
base: git://anongit.freedesktop.org/drm-intel for-linux-next-fixes
patch link: https://lore.kernel.org/all/20241118075315.466009-4-arun.r.murthy@xxxxxxxxx/
patch subject: [PATCHv2 3/3] drm/i915/display: Populate list of async supported formats/modifiers

in testcase: ltp
version: ltp-x86_64-14c1f76-1_20241111
with following parameters:

	test: lvm.local-00



config: x86_64-rhel-9.4-ltp
compiler: gcc-12
test machine: 8 threads 1 sockets Intel(R) Core(TM) i7-7700 CPU @ 3.60GHz (Kaby Lake) with 32G memory

(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@xxxxxxxxx>
| Closes: https://lore.kernel.org/oe-lkp/202411252029.30061fde-lkp@xxxxxxxxx


kern :err : [   44.116017] BUG: KASAN: global-out-of-bounds in drm_plane_create_format_blob (drivers/gpu/drm/drm_plane.c:191 drivers/gpu/drm/drm_plane.c:238) drm
kern  :notice: [   44.129098] i915 0000:00:02.0: [drm] DMC firmware homepage: https://git.kernel.org/pub/scm/linux/kernel/git/firmware/linux-firmware.git
kern  :err   : [   44.138344] Read of size 144 at addr ffffffffc1a99bc0 by task (udev-worker)/230

kern  :err   : [   44.138357] CPU: 1 UID: 0 PID: 230 Comm: (udev-worker) Not tainted 6.12.0-00003-gab8ee1a4b22d #1
kern  :err   : [   44.138361] Hardware name: Dell Inc. OptiPlex 7050/062KRH, BIOS 1.2.0 12/22/2016
kern  :err   : [   44.138363] Call Trace:
kern  :err   : [   44.138365]  <TASK>
kern :err : [   44.138367] dump_stack_lvl (lib/dump_stack.c:123 (discriminator 1)) 
kern :err : [   44.138376] print_address_description+0x2c/0x3a0 
kern :err : [   44.196003] ? drm_plane_create_format_blob (drivers/gpu/drm/drm_plane.c:191 drivers/gpu/drm/drm_plane.c:238) drm
kern :err : [   44.202599] print_report (mm/kasan/report.c:489) 
kern :err : [   44.206894] ? kasan_addr_to_slab (mm/kasan/common.c:37) 
kern :err : [   44.211709] ? drm_plane_create_format_blob (drivers/gpu/drm/drm_plane.c:191 drivers/gpu/drm/drm_plane.c:238) drm
kern :err : [   44.218254] kasan_report (mm/kasan/report.c:603) 
kern :err : [   44.222465] ? drm_plane_create_format_blob (drivers/gpu/drm/drm_plane.c:191 drivers/gpu/drm/drm_plane.c:238) drm
kern :err : [   44.229022] kasan_check_range (mm/kasan/generic.c:183 mm/kasan/generic.c:189) 
kern :err : [   44.233763] __asan_memcpy (mm/kasan/shadow.c:105) 
kern :err : [   44.238065] drm_plane_create_format_blob (drivers/gpu/drm/drm_plane.c:191 drivers/gpu/drm/drm_plane.c:238) drm
kern :err : [   44.244436] ? skl_universal_plane_create (drivers/gpu/drm/i915/display/skl_universal_plane.c:2615) i915
kern :err : [   44.251192] skl_universal_plane_create (drivers/gpu/drm/i915/display/skl_universal_plane.c:2630) i915
kern :err : [   44.257773] intel_crtc_init (drivers/gpu/drm/i915/display/intel_crtc.c:312) i915
kern :err : [   44.263672] ? intel_gmbus_setup (drivers/gpu/drm/i915/display/intel_gmbus.c:935) i915
kern :err : [   44.269640] intel_display_driver_probe_nogem (drivers/gpu/drm/i915/display/intel_display_driver.c:441) i915
kern :err : [   44.277003] i915_driver_probe (drivers/gpu/drm/i915/i915_driver.c:832) i915
kern :err : [   44.282751] ? __pfx_i915_driver_probe (drivers/gpu/drm/i915/i915_driver.c:751) i915
kern :err : [   44.289031] ? drm_privacy_screen_get (drivers/gpu/drm/drm_privacy_screen.c:168) drm
kern :err : [   44.295046] ? intel_display_driver_probe_defer (drivers/gpu/drm/i915/display/intel_display_driver.c:81) i915
kern :err : [   44.302188] ? i915_pci_probe (drivers/gpu/drm/i915/i915_pci.c:998) i915
kern :err : [   44.307853] ? __pfx_i915_pci_probe (drivers/gpu/drm/i915/i915_pci.c:959) i915
kern :err : [   44.314024] local_pci_probe (drivers/pci/pci-driver.c:324) 
kern :err : [   44.318585] pci_call_probe (drivers/pci/pci-driver.c:392) 
kern :err : [   44.323139] ? __pfx_pci_call_probe (drivers/pci/pci-driver.c:352) 
kern :err : [   44.328232] ? pci_assign_irq (drivers/pci/irq.c:149) 
kern :err : [   44.332888] ? pci_match_device (drivers/pci/pci-driver.c:159 (discriminator 1)) 
kern :err : [   44.337812] pci_device_probe (drivers/pci/pci-driver.c:452) 
kern :err : [   44.342468] ? pci_dma_configure (drivers/pci/pci-driver.c:1656) 
kern :err : [   44.347478] really_probe (drivers/base/dd.c:579 drivers/base/dd.c:658) 
kern :err : [   44.351871] __driver_probe_device (drivers/base/dd.c:800) 
kern :err : [   44.357038] driver_probe_device (drivers/base/dd.c:830) 
kern :err : [   44.361948] __driver_attach (drivers/base/dd.c:1217) 
kern :err : [   44.366602] ? __pfx___driver_attach (drivers/base/dd.c:1157) 
kern :err : [   44.371767] bus_for_each_dev (drivers/base/bus.c:370) 
kern :err : [   44.376413] ? __kasan_slab_alloc (mm/kasan/common.c:318 mm/kasan/common.c:345) 
kern :err : [   44.381325] ? __pfx_bus_for_each_dev (drivers/base/bus.c:358) 
kern :err : [   44.386587] ? __pfx__raw_spin_lock (kernel/locking/spinlock.c:153) 
kern :err : [   44.391677] ? klist_add_tail (include/linux/list.h:150 include/linux/list.h:183 lib/klist.c:104 lib/klist.c:137) 
kern :err : [   44.396421] bus_add_driver (drivers/base/bus.c:675) 
kern :err : [   44.400984] driver_register (drivers/base/driver.c:246) 
kern :err : [   44.405631] i915_init (drivers/gpu/drm/i915/i915_driver.c:1395) i915
kern :err : [   44.410605] ? __pfx_i915_init (drivers/gpu/drm/i915/i915_config.c:13) i915
kern :err : [   44.416150] do_one_initcall (init/main.c:1269) 
kern :err : [   44.420704] ? __pfx_do_one_initcall (init/main.c:1260) 
kern :err : [   44.425872] ? __asan_register_globals (mm/kasan/generic.c:232 (discriminator 3)) 
kern :err : [   44.431218] ? kasan_unpoison (mm/kasan/shadow.c:156 mm/kasan/shadow.c:182) 
kern :err : [   44.435787] do_init_module (kernel/module/main.c:2543) 
kern :err : [   44.440356] load_module (kernel/module/main.c:3009) 
kern :err : [   44.444831] ? ima_post_read_file (security/integrity/ima/ima_main.c:835 security/integrity/ima/ima_main.c:817) 
kern :err : [   44.449914] ? __pfx_load_module (kernel/module/main.c:2856) 
kern :err : [   44.454736] ? security_kernel_post_read_file (security/security.c:3356) 
kern :err : [   44.460698] ? __pfx_kernel_read_file (fs/kernel_read_file.c:38) 
kern :err : [   44.465953] ? __pfx_down_write_killable (kernel/locking/rwsem.c:1586) 
kern :err : [   44.471467] ? init_module_from_file (kernel/module/main.c:3198) 
kern :err : [   44.476720] init_module_from_file (kernel/module/main.c:3198) 
kern :err : [   44.481796] ? __pfx_init_module_from_file (kernel/module/main.c:3174) 
kern :err : [   44.487485] ? __pfx_vm_mmap_pgoff (mm/util.c:578) 
kern :err : [   44.492477] ? __pfx__raw_spin_lock (kernel/locking/spinlock.c:153) 
kern :err : [   44.497559] ? ksys_mmap_pgoff (mm/mmap.c:547) 
kern :err : [   44.502382] idempotent_init_module (kernel/module/main.c:3210) 
kern :err : [   44.507642] ? __pfx_idempotent_init_module (kernel/module/main.c:3202) 
kern :err : [   44.513422] ? __pfx___seccomp_filter (kernel/seccomp.c:1218) 
kern :err : [   44.518687] ? fdget (include/linux/atomic/atomic-arch-fallback.h:479 include/linux/atomic/atomic-instrumented.h:50 fs/file.c:1114 fs/file.c:1128) 
kern :err : [   44.522549] ? security_capable (security/security.c:1143) 
kern :err : [   44.527277] __x64_sys_finit_module (include/linux/file.h:68 kernel/module/main.c:3238 kernel/module/main.c:3220 kernel/module/main.c:3220) 
kern :err : [   44.532443] do_syscall_64 (arch/x86/entry/common.c:52 arch/x86/entry/common.c:83) 
kern :err : [   44.536824] ? sched_clock (arch/x86/include/asm/preempt.h:94 arch/x86/kernel/tsc.c:285) 
kern :err : [   44.541029] ? sched_clock_cpu (kernel/sched/clock.c:394) 
kern :err : [   44.545767] ? clockevents_program_event (kernel/time/clockevents.c:334 (discriminator 3)) 
kern :err : [   44.551465] ? __pfx_sched_clock_cpu (kernel/sched/clock.c:389) 
kern :err : [   44.556639] ? hrtimer_interrupt (kernel/time/hrtimer.c:1830) 
kern :err : [   44.561639] ? irqtime_account_irq (kernel/sched/cputime.c:64) 
kern :err : [   44.566730] ? __irq_exit_rcu (kernel/softirq.c:620 kernel/softirq.c:639) 
kern :err : [   44.571387] entry_SYSCALL_64_after_hwframe (arch/x86/entry/entry_64.S:130) 
kern  :err   : [   44.577175] RIP: 0033:0x7f6c1bf48799
kern :err : [ 44.581479] Code: 08 89 e8 5b 5d c3 66 2e 0f 1f 84 00 00 00 00 00 90 48 89 f8 48 89 f7 48 89 d6 48 89 ca 4d 89 c2 4d 89 c8 4c 8b 4c 24 08 0f 05 <48> 3d 01 f0 ff ff 73 01 c3 48 8b 0d 37 06 0d 00 f7 d8 64 89 01 48
All code
========
   0:	08 89 e8 5b 5d c3    	or     %cl,-0x3ca2a418(%rcx)
   6:	66 2e 0f 1f 84 00 00 	cs nopw 0x0(%rax,%rax,1)
   d:	00 00 00 
  10:	90                   	nop
  11:	48 89 f8             	mov    %rdi,%rax
  14:	48 89 f7             	mov    %rsi,%rdi
  17:	48 89 d6             	mov    %rdx,%rsi
  1a:	48 89 ca             	mov    %rcx,%rdx
  1d:	4d 89 c2             	mov    %r8,%r10
  20:	4d 89 c8             	mov    %r9,%r8
  23:	4c 8b 4c 24 08       	mov    0x8(%rsp),%r9
  28:	0f 05                	syscall
  2a:*	48 3d 01 f0 ff ff    	cmp    $0xfffffffffffff001,%rax		<-- trapping instruction
  30:	73 01                	jae    0x33
  32:	c3                   	ret
  33:	48 8b 0d 37 06 0d 00 	mov    0xd0637(%rip),%rcx        # 0xd0671
  3a:	f7 d8                	neg    %eax
  3c:	64 89 01             	mov    %eax,%fs:(%rcx)
  3f:	48                   	rex.W

Code starting with the faulting instruction
===========================================
   0:	48 3d 01 f0 ff ff    	cmp    $0xfffffffffffff001,%rax
   6:	73 01                	jae    0x9
   8:	c3                   	ret
   9:	48 8b 0d 37 06 0d 00 	mov    0xd0637(%rip),%rcx        # 0xd0647
  10:	f7 d8                	neg    %eax
  12:	64 89 01             	mov    %eax,%fs:(%rcx)
  15:	48                   	rex.W


The kernel config and materials to reproduce are available at:
https://download.01.org/0day-ci/archive/20241125/202411252029.30061fde-lkp@xxxxxxxxx



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




[Index of Archives]     [AMD Graphics]     [Linux USB Devel]     [Linux Audio Users]     [Yosemite News]     [Linux Kernel]     [Linux SCSI]

  Powered by Linux