* 6.5.5: UBSAN: radeon_atombios.c: index 1 is out of range for type 'UCHAR [1]'
@ 2023-10-01 23:05 Justin Piszcz
2023-10-02 0:00 ` Bagas Sanjaya
0 siblings, 1 reply; 8+ messages in thread
From: Justin Piszcz @ 2023-10-01 23:05 UTC (permalink / raw)
To: LKML
Hello,
Kernel: 6.5.5
Arch: x86_64
Distribution: Debian testing
Recently, I enabled UBSAN and noticed the following at boot time with
an older AMD graphics card, is this considered normal when using the
AMD firmware-linux-nonfree package?
[ .. ]
[Sun Oct 1 15:59:04 2023] ACPI: bus type drm_connector registered
[Sun Oct 1 15:59:04 2023] [drm] radeon kernel modesetting enabled.
[Sun Oct 1 15:59:04 2023] [drm] initializing kernel modesetting
(CEDAR 0x1002:0x68E1 0x1787:0x3000 0x00).
[Sun Oct 1 15:59:04 2023] ATOM BIOS: PARK
[Sun Oct 1 15:59:04 2023] radeon 0000:03:00.0: VRAM: 1024M
0x0000000000000000 - 0x000000003FFFFFFF (1024M used)
[Sun Oct 1 15:59:04 2023] radeon 0000:03:00.0: GTT: 1024M
0x0000000040000000 - 0x000000007FFFFFFF
[Sun Oct 1 15:59:04 2023] [drm] Detected VRAM RAM=1024M, BAR=256M
[Sun Oct 1 15:59:04 2023] [drm] RAM width 64bits DDR
[Sun Oct 1 15:59:04 2023] [drm] radeon: 1024M of VRAM memory ready
[Sun Oct 1 15:59:04 2023] [drm] radeon: 1024M of GTT memory ready.
[Sun Oct 1 15:59:04 2023] [drm] Loading CEDAR Microcode
[Sun Oct 1 15:59:04 2023] [drm] Internal thermal controller with fan control
[Sun Oct 1 15:59:04 2023]
================================================================================
[Sun Oct 1 15:59:04 2023] UBSAN: array-index-out-of-bounds in
drivers/gpu/drm/radeon/radeon_atombios.c:2620:43
[Sun Oct 1 15:59:04 2023] index 1 is out of range for type 'UCHAR [1]'
[Sun Oct 1 15:59:04 2023] CPU: 5 PID: 1 Comm: swapper/0 Tainted: G
T 6.5.5 #13 55df8de52754ef95effc50a55e9206abdea304ac
[Sun Oct 1 15:59:04 2023] Hardware name: Supermicro X9SRL-F/X9SRL-F,
BIOS 3.3 11/13/2018
[Sun Oct 1 15:59:04 2023] Call Trace:
[Sun Oct 1 15:59:04 2023] <TASK>
[Sun Oct 1 15:59:04 2023] dump_stack_lvl+0x36/0x50
[Sun Oct 1 15:59:04 2023] __ubsan_handle_out_of_bounds+0xc7/0x110
[Sun Oct 1 15:59:04 2023] radeon_atombios_get_power_modes+0x87a/0x8f0
[Sun Oct 1 15:59:04 2023] radeon_pm_init+0x13a/0x7e0
[Sun Oct 1 15:59:04 2023] evergreen_init+0x13d/0x3d0
[Sun Oct 1 15:59:04 2023] radeon_device_init+0x60a/0xbf0
[Sun Oct 1 15:59:04 2023] radeon_driver_load_kms+0xb1/0x250
[Sun Oct 1 15:59:04 2023] drm_dev_register+0xfc/0x250
[Sun Oct 1 15:59:04 2023] radeon_pci_probe+0xd0/0x150
[Sun Oct 1 15:59:04 2023] pci_device_probe+0x97/0x130
[Sun Oct 1 15:59:04 2023] really_probe+0xbe/0x2f0
[Sun Oct 1 15:59:04 2023] ? __pfx___driver_attach+0x10/0x10
[Sun Oct 1 15:59:04 2023] __driver_probe_device+0x6e/0x120
[Sun Oct 1 15:59:04 2023] driver_probe_device+0x1a/0x90
[Sun Oct 1 15:59:04 2023] __driver_attach+0xd4/0x170
[Sun Oct 1 15:59:04 2023] bus_for_each_dev+0x87/0xe0
[Sun Oct 1 15:59:04 2023] bus_add_driver+0xf3/0x1f0
[Sun Oct 1 15:59:04 2023] driver_register+0x58/0x120
[Sun Oct 1 15:59:04 2023] ? __pfx_radeon_module_init+0x10/0x10
[Sun Oct 1 15:59:04 2023] do_one_initcall+0x93/0x4a0
[Sun Oct 1 15:59:04 2023] kernel_init_freeable+0x301/0x580
[Sun Oct 1 15:59:04 2023] ? __pfx_kernel_init+0x10/0x10
[Sun Oct 1 15:59:04 2023] kernel_init+0x15/0x1b0
[Sun Oct 1 15:59:04 2023] ret_from_fork+0x2f/0x50
[Sun Oct 1 15:59:04 2023] ? __pfx_kernel_init+0x10/0x10
[Sun Oct 1 15:59:04 2023] ret_from_fork_asm+0x1b/0x30
[Sun Oct 1 15:59:04 2023] </TASK>
[Sun Oct 1 15:59:04 2023]
================================================================================
[Sun Oct 1 15:59:04 2023] [drm] radeon: dpm initialized
[Sun Oct 1 15:59:04 2023] [drm] GART: num cpu pages 262144, num gpu
pages 262144
[Sun Oct 1 15:59:04 2023] [drm] enabling PCIE gen 2 link speeds,
disable with radeon.pcie_gen2=0
[Sun Oct 1 15:59:04 2023] [drm] PCIE GART of 1024M enabled (table at
0x000000000014C000).
[Sun Oct 1 15:59:04 2023] radeon 0000:03:00.0: WB enabled
[Sun Oct 1 15:59:04 2023] radeon 0000:03:00.0: fence driver on ring 0
use gpu addr 0x0000000040000c00
[Sun Oct 1 15:59:04 2023] radeon 0000:03:00.0: fence driver on ring 3
use gpu addr 0x0000000040000c0c
[Sun Oct 1 15:59:04 2023] radeon 0000:03:00.0: fence driver on ring 5
use gpu addr 0x000000000005c418
[Sun Oct 1 15:59:04 2023] radeon 0000:03:00.0: radeon: MSI limited to 32-bit
[Sun Oct 1 15:59:04 2023] radeon 0000:03:00.0: radeon: using MSI.
[Sun Oct 1 15:59:04 2023] [drm] radeon: irq initialized.
Regards,
Justin
^ permalink raw reply [flat|nested] 8+ messages in thread* Re: 6.5.5: UBSAN: radeon_atombios.c: index 1 is out of range for type 'UCHAR [1]' 2023-10-01 23:05 6.5.5: UBSAN: radeon_atombios.c: index 1 is out of range for type 'UCHAR [1]' Justin Piszcz @ 2023-10-02 0:00 ` Bagas Sanjaya 2023-10-02 0:12 ` Justin Piszcz 2023-10-02 14:20 ` Alex Deucher 0 siblings, 2 replies; 8+ messages in thread From: Bagas Sanjaya @ 2023-10-02 0:00 UTC (permalink / raw) To: Justin Piszcz, Linux Kernel Mailing List, Linux AMDGPU Cc: Alex Deucher, Dave Airlie, Christian König, Pan, Xinhui [-- Attachment #1: Type: text/plain, Size: 4773 bytes --] On Sun, Oct 01, 2023 at 07:05:11PM -0400, Justin Piszcz wrote: > Hello, > > Kernel: 6.5.5 > Arch: x86_64 > Distribution: Debian testing > > Recently, I enabled UBSAN and noticed the following at boot time with > an older AMD graphics card, is this considered normal when using the > AMD firmware-linux-nonfree package? > > [ .. ] > [Sun Oct 1 15:59:04 2023] ACPI: bus type drm_connector registered > [Sun Oct 1 15:59:04 2023] [drm] radeon kernel modesetting enabled. > [Sun Oct 1 15:59:04 2023] [drm] initializing kernel modesetting > (CEDAR 0x1002:0x68E1 0x1787:0x3000 0x00). > [Sun Oct 1 15:59:04 2023] ATOM BIOS: PARK > [Sun Oct 1 15:59:04 2023] radeon 0000:03:00.0: VRAM: 1024M > 0x0000000000000000 - 0x000000003FFFFFFF (1024M used) > [Sun Oct 1 15:59:04 2023] radeon 0000:03:00.0: GTT: 1024M > 0x0000000040000000 - 0x000000007FFFFFFF > [Sun Oct 1 15:59:04 2023] [drm] Detected VRAM RAM=1024M, BAR=256M > [Sun Oct 1 15:59:04 2023] [drm] RAM width 64bits DDR > [Sun Oct 1 15:59:04 2023] [drm] radeon: 1024M of VRAM memory ready > [Sun Oct 1 15:59:04 2023] [drm] radeon: 1024M of GTT memory ready. > [Sun Oct 1 15:59:04 2023] [drm] Loading CEDAR Microcode > [Sun Oct 1 15:59:04 2023] [drm] Internal thermal controller with fan control > [Sun Oct 1 15:59:04 2023] > ================================================================================ > [Sun Oct 1 15:59:04 2023] UBSAN: array-index-out-of-bounds in > drivers/gpu/drm/radeon/radeon_atombios.c:2620:43 > [Sun Oct 1 15:59:04 2023] index 1 is out of range for type 'UCHAR [1]' > [Sun Oct 1 15:59:04 2023] CPU: 5 PID: 1 Comm: swapper/0 Tainted: G > T 6.5.5 #13 55df8de52754ef95effc50a55e9206abdea304ac > [Sun Oct 1 15:59:04 2023] Hardware name: Supermicro X9SRL-F/X9SRL-F, > BIOS 3.3 11/13/2018 > [Sun Oct 1 15:59:04 2023] Call Trace: > [Sun Oct 1 15:59:04 2023] <TASK> > [Sun Oct 1 15:59:04 2023] dump_stack_lvl+0x36/0x50 > [Sun Oct 1 15:59:04 2023] __ubsan_handle_out_of_bounds+0xc7/0x110 > [Sun Oct 1 15:59:04 2023] radeon_atombios_get_power_modes+0x87a/0x8f0 > [Sun Oct 1 15:59:04 2023] radeon_pm_init+0x13a/0x7e0 > [Sun Oct 1 15:59:04 2023] evergreen_init+0x13d/0x3d0 > [Sun Oct 1 15:59:04 2023] radeon_device_init+0x60a/0xbf0 > [Sun Oct 1 15:59:04 2023] radeon_driver_load_kms+0xb1/0x250 > [Sun Oct 1 15:59:04 2023] drm_dev_register+0xfc/0x250 > [Sun Oct 1 15:59:04 2023] radeon_pci_probe+0xd0/0x150 > [Sun Oct 1 15:59:04 2023] pci_device_probe+0x97/0x130 > [Sun Oct 1 15:59:04 2023] really_probe+0xbe/0x2f0 > [Sun Oct 1 15:59:04 2023] ? __pfx___driver_attach+0x10/0x10 > [Sun Oct 1 15:59:04 2023] __driver_probe_device+0x6e/0x120 > [Sun Oct 1 15:59:04 2023] driver_probe_device+0x1a/0x90 > [Sun Oct 1 15:59:04 2023] __driver_attach+0xd4/0x170 > [Sun Oct 1 15:59:04 2023] bus_for_each_dev+0x87/0xe0 > [Sun Oct 1 15:59:04 2023] bus_add_driver+0xf3/0x1f0 > [Sun Oct 1 15:59:04 2023] driver_register+0x58/0x120 > [Sun Oct 1 15:59:04 2023] ? __pfx_radeon_module_init+0x10/0x10 > [Sun Oct 1 15:59:04 2023] do_one_initcall+0x93/0x4a0 > [Sun Oct 1 15:59:04 2023] kernel_init_freeable+0x301/0x580 > [Sun Oct 1 15:59:04 2023] ? __pfx_kernel_init+0x10/0x10 > [Sun Oct 1 15:59:04 2023] kernel_init+0x15/0x1b0 > [Sun Oct 1 15:59:04 2023] ret_from_fork+0x2f/0x50 > [Sun Oct 1 15:59:04 2023] ? __pfx_kernel_init+0x10/0x10 > [Sun Oct 1 15:59:04 2023] ret_from_fork_asm+0x1b/0x30 > [Sun Oct 1 15:59:04 2023] </TASK> > [Sun Oct 1 15:59:04 2023] > ================================================================================ > [Sun Oct 1 15:59:04 2023] [drm] radeon: dpm initialized > [Sun Oct 1 15:59:04 2023] [drm] GART: num cpu pages 262144, num gpu > pages 262144 > [Sun Oct 1 15:59:04 2023] [drm] enabling PCIE gen 2 link speeds, > disable with radeon.pcie_gen2=0 > [Sun Oct 1 15:59:04 2023] [drm] PCIE GART of 1024M enabled (table at > 0x000000000014C000). > [Sun Oct 1 15:59:04 2023] radeon 0000:03:00.0: WB enabled > [Sun Oct 1 15:59:04 2023] radeon 0000:03:00.0: fence driver on ring 0 > use gpu addr 0x0000000040000c00 > [Sun Oct 1 15:59:04 2023] radeon 0000:03:00.0: fence driver on ring 3 > use gpu addr 0x0000000040000c0c > [Sun Oct 1 15:59:04 2023] radeon 0000:03:00.0: fence driver on ring 5 > use gpu addr 0x000000000005c418 > [Sun Oct 1 15:59:04 2023] radeon 0000:03:00.0: radeon: MSI limited to 32-bit > [Sun Oct 1 15:59:04 2023] radeon 0000:03:00.0: radeon: using MSI. > [Sun Oct 1 15:59:04 2023] [drm] radeon: irq initialized. > Please also open an issue on freedesktop tracker [1]. Thanks. [1]: https://gitlab.freedesktop.org/drm/amd/-/issues -- An old man doll... just what I always wanted! - Clara [-- Attachment #2: signature.asc --] [-- Type: application/pgp-signature, Size: 228 bytes --] ^ permalink raw reply [flat|nested] 8+ messages in thread
* Re: 6.5.5: UBSAN: radeon_atombios.c: index 1 is out of range for type 'UCHAR [1]' 2023-10-02 0:00 ` Bagas Sanjaya @ 2023-10-02 0:12 ` Justin Piszcz 2024-04-09 0:45 ` Jeff Johnson 2023-10-02 14:20 ` Alex Deucher 1 sibling, 1 reply; 8+ messages in thread From: Justin Piszcz @ 2023-10-02 0:12 UTC (permalink / raw) To: Bagas Sanjaya Cc: Linux Kernel Mailing List, Linux AMDGPU, Alex Deucher, Dave Airlie, Christian König, Pan, Xinhui > > ================================================================================ > > [Sun Oct 1 15:59:04 2023] UBSAN: array-index-out-of-bounds in > > drivers/gpu/drm/radeon/radeon_atombios.c:2620:43 > > [Sun Oct 1 15:59:04 2023] index 1 is out of range for type 'UCHAR [1]' > > [Sun Oct 1 15:59:04 2023] CPU: 5 PID: 1 Comm: swapper/0 Tainted: G > > T 6.5.5 #13 55df8de52754ef95effc50a55e9206abdea304ac > > [Sun Oct 1 15:59:04 2023] Hardware name: Supermicro X9SRL-F/X9SRL-F, > > BIOS 3.3 11/13/2018 > > [Sun Oct 1 15:59:04 2023] Call Trace: > > [Sun Oct 1 15:59:04 2023] <TASK> > > [Sun Oct 1 15:59:04 2023] dump_stack_lvl+0x36/0x50 > > [Sun Oct 1 15:59:04 2023] __ubsan_handle_out_of_bounds+0xc7/0x110 > > [Sun Oct 1 15:59:04 2023] radeon_atombios_get_power_modes+0x87a/0x8f0 > > [Sun Oct 1 15:59:04 2023] radeon_pm_init+0x13a/0x7e0 > > [Sun Oct 1 15:59:04 2023] evergreen_init+0x13d/0x3d0 > > [Sun Oct 1 15:59:04 2023] radeon_device_init+0x60a/0xbf0 > > [Sun Oct 1 15:59:04 2023] radeon_driver_load_kms+0xb1/0x250 > > [Sun Oct 1 15:59:04 2023] drm_dev_register+0xfc/0x250 > > [Sun Oct 1 15:59:04 2023] radeon_pci_probe+0xd0/0x150 > > [Sun Oct 1 15:59:04 2023] pci_device_probe+0x97/0x130 > > [Sun Oct 1 15:59:04 2023] really_probe+0xbe/0x2f0 > > [Sun Oct 1 15:59:04 2023] ? __pfx___driver_attach+0x10/0x10 > > [Sun Oct 1 15:59:04 2023] __driver_probe_device+0x6e/0x120 > > [Sun Oct 1 15:59:04 2023] driver_probe_device+0x1a/0x90 > > [Sun Oct 1 15:59:04 2023] __driver_attach+0xd4/0x170 > > [Sun Oct 1 15:59:04 2023] bus_for_each_dev+0x87/0xe0 > > [Sun Oct 1 15:59:04 2023] bus_add_driver+0xf3/0x1f0 > > [Sun Oct 1 15:59:04 2023] driver_register+0x58/0x120 > > [Sun Oct 1 15:59:04 2023] ? __pfx_radeon_module_init+0x10/0x10 > > [Sun Oct 1 15:59:04 2023] do_one_initcall+0x93/0x4a0 > > [Sun Oct 1 15:59:04 2023] kernel_init_freeable+0x301/0x580 > > [Sun Oct 1 15:59:04 2023] ? __pfx_kernel_init+0x10/0x10 > > [Sun Oct 1 15:59:04 2023] kernel_init+0x15/0x1b0 > > [Sun Oct 1 15:59:04 2023] ret_from_fork+0x2f/0x50 > > [Sun Oct 1 15:59:04 2023] ? __pfx_kernel_init+0x10/0x10 > > [Sun Oct 1 15:59:04 2023] ret_from_fork_asm+0x1b/0x30 > > [Sun Oct 1 15:59:04 2023] </TASK> > > [Sun Oct 1 15:59:04 2023] > > ================================================================================ > > [Sun Oct 1 15:59:04 2023] [drm] radeon: dpm initialized > > [Sun Oct 1 15:59:04 2023] [drm] GART: num cpu pages 262144, num gpu > > pages 262144 > > [Sun Oct 1 15:59:04 2023] [drm] enabling PCIE gen 2 link speeds, > > disable with radeon.pcie_gen2=0 > > [Sun Oct 1 15:59:04 2023] [drm] PCIE GART of 1024M enabled (table at > > 0x000000000014C000). > > [Sun Oct 1 15:59:04 2023] radeon 0000:03:00.0: WB enabled > > [Sun Oct 1 15:59:04 2023] radeon 0000:03:00.0: fence driver on ring 0 > > use gpu addr 0x0000000040000c00 > > [Sun Oct 1 15:59:04 2023] radeon 0000:03:00.0: fence driver on ring 3 > > use gpu addr 0x0000000040000c0c > > [Sun Oct 1 15:59:04 2023] radeon 0000:03:00.0: fence driver on ring 5 > > use gpu addr 0x000000000005c418 > > [Sun Oct 1 15:59:04 2023] radeon 0000:03:00.0: radeon: MSI limited to 32-bit > > [Sun Oct 1 15:59:04 2023] radeon 0000:03:00.0: radeon: using MSI. > > [Sun Oct 1 15:59:04 2023] [drm] radeon: irq initialized. > > > > Please also open an issue on freedesktop tracker [1]. > > Thanks. > > [1]: https://gitlab.freedesktop.org/drm/amd/-/issues Issue opened: https://gitlab.freedesktop.org/drm/amd/-/issues/2894 Regards, Justin ^ permalink raw reply [flat|nested] 8+ messages in thread
* Re: 6.5.5: UBSAN: radeon_atombios.c: index 1 is out of range for type 'UCHAR [1]' 2023-10-02 0:12 ` Justin Piszcz @ 2024-04-09 0:45 ` Jeff Johnson 2024-04-09 1:45 ` Kees Cook 0 siblings, 1 reply; 8+ messages in thread From: Jeff Johnson @ 2024-04-09 0:45 UTC (permalink / raw) To: Justin Piszcz, Bagas Sanjaya Cc: Pan, Xinhui, Linux Kernel Mailing List, Linux AMDGPU, Alex Deucher, Dave Airlie, Christian König, Kees Cook On 10/1/23 17:12, Justin Piszcz wrote: >>> ================================================================================ >>> [Sun Oct 1 15:59:04 2023] UBSAN: array-index-out-of-bounds in >>> drivers/gpu/drm/radeon/radeon_atombios.c:2620:43 >>> [Sun Oct 1 15:59:04 2023] index 1 is out of range for type 'UCHAR [1]' >>> [Sun Oct 1 15:59:04 2023] CPU: 5 PID: 1 Comm: swapper/0 Tainted: G >>> T 6.5.5 #13 55df8de52754ef95effc50a55e9206abdea304ac >>> [Sun Oct 1 15:59:04 2023] Hardware name: Supermicro X9SRL-F/X9SRL-F, >>> BIOS 3.3 11/13/2018 >>> [Sun Oct 1 15:59:04 2023] Call Trace: >>> [Sun Oct 1 15:59:04 2023] <TASK> >>> [Sun Oct 1 15:59:04 2023] dump_stack_lvl+0x36/0x50 >>> [Sun Oct 1 15:59:04 2023] __ubsan_handle_out_of_bounds+0xc7/0x110 >>> [Sun Oct 1 15:59:04 2023] radeon_atombios_get_power_modes+0x87a/0x8f0 >>> [Sun Oct 1 15:59:04 2023] radeon_pm_init+0x13a/0x7e0 >>> [Sun Oct 1 15:59:04 2023] evergreen_init+0x13d/0x3d0 >>> [Sun Oct 1 15:59:04 2023] radeon_device_init+0x60a/0xbf0 >>> [Sun Oct 1 15:59:04 2023] radeon_driver_load_kms+0xb1/0x250 >>> [Sun Oct 1 15:59:04 2023] drm_dev_register+0xfc/0x250 >>> [Sun Oct 1 15:59:04 2023] radeon_pci_probe+0xd0/0x150 >>> [Sun Oct 1 15:59:04 2023] pci_device_probe+0x97/0x130 >>> [Sun Oct 1 15:59:04 2023] really_probe+0xbe/0x2f0 >>> [Sun Oct 1 15:59:04 2023] ? __pfx___driver_attach+0x10/0x10 >>> [Sun Oct 1 15:59:04 2023] __driver_probe_device+0x6e/0x120 >>> [Sun Oct 1 15:59:04 2023] driver_probe_device+0x1a/0x90 >>> [Sun Oct 1 15:59:04 2023] __driver_attach+0xd4/0x170 >>> [Sun Oct 1 15:59:04 2023] bus_for_each_dev+0x87/0xe0 >>> [Sun Oct 1 15:59:04 2023] bus_add_driver+0xf3/0x1f0 >>> [Sun Oct 1 15:59:04 2023] driver_register+0x58/0x120 >>> [Sun Oct 1 15:59:04 2023] ? __pfx_radeon_module_init+0x10/0x10 >>> [Sun Oct 1 15:59:04 2023] do_one_initcall+0x93/0x4a0 >>> [Sun Oct 1 15:59:04 2023] kernel_init_freeable+0x301/0x580 >>> [Sun Oct 1 15:59:04 2023] ? __pfx_kernel_init+0x10/0x10 >>> [Sun Oct 1 15:59:04 2023] kernel_init+0x15/0x1b0 >>> [Sun Oct 1 15:59:04 2023] ret_from_fork+0x2f/0x50 >>> [Sun Oct 1 15:59:04 2023] ? __pfx_kernel_init+0x10/0x10 >>> [Sun Oct 1 15:59:04 2023] ret_from_fork_asm+0x1b/0x30 >>> [Sun Oct 1 15:59:04 2023] </TASK> >>> [Sun Oct 1 15:59:04 2023] >>> ================================================================================ >>> [Sun Oct 1 15:59:04 2023] [drm] radeon: dpm initialized >>> [Sun Oct 1 15:59:04 2023] [drm] GART: num cpu pages 262144, num gpu >>> pages 262144 >>> [Sun Oct 1 15:59:04 2023] [drm] enabling PCIE gen 2 link speeds, >>> disable with radeon.pcie_gen2=0 >>> [Sun Oct 1 15:59:04 2023] [drm] PCIE GART of 1024M enabled (table at >>> 0x000000000014C000). >>> [Sun Oct 1 15:59:04 2023] radeon 0000:03:00.0: WB enabled >>> [Sun Oct 1 15:59:04 2023] radeon 0000:03:00.0: fence driver on ring 0 >>> use gpu addr 0x0000000040000c00 >>> [Sun Oct 1 15:59:04 2023] radeon 0000:03:00.0: fence driver on ring 3 >>> use gpu addr 0x0000000040000c0c >>> [Sun Oct 1 15:59:04 2023] radeon 0000:03:00.0: fence driver on ring 5 >>> use gpu addr 0x000000000005c418 >>> [Sun Oct 1 15:59:04 2023] radeon 0000:03:00.0: radeon: MSI limited to 32-bit >>> [Sun Oct 1 15:59:04 2023] radeon 0000:03:00.0: radeon: using MSI. >>> [Sun Oct 1 15:59:04 2023] [drm] radeon: irq initialized. >>> >> >> Please also open an issue on freedesktop tracker [1]. >> >> Thanks. >> >> [1]: https://gitlab.freedesktop.org/drm/amd/-/issues > > Issue opened: https://gitlab.freedesktop.org/drm/amd/-/issues/2894 > > Regards, > Justin +Kees since I've worked with him on several of these flexible array issues. I just happened to look at kernel logs today for my ath1*k driver maintenance and see the subject issue is present on my device, running 6.9.0-rc1. The freedesktop issue tracker says the issue is closed, but any fix has not landed in the upstream kernel. Is there a -next patch somewhere? [ 12.105270] UBSAN: array-index-out-of-bounds in drivers/gpu/drm/radeon/radeon_atombios.c:2718:34 [ 12.105272] index 48 is out of range for type 'UCHAR [1]' [ If there isn't really an upstream fix, I can probably supply one. /jeff ^ permalink raw reply [flat|nested] 8+ messages in thread
* Re: 6.5.5: UBSAN: radeon_atombios.c: index 1 is out of range for type 'UCHAR [1]' 2024-04-09 0:45 ` Jeff Johnson @ 2024-04-09 1:45 ` Kees Cook 2024-04-09 4:23 ` Alex Deucher 0 siblings, 1 reply; 8+ messages in thread From: Kees Cook @ 2024-04-09 1:45 UTC (permalink / raw) To: Jeff Johnson, Justin Piszcz, Bagas Sanjaya Cc: Pan, Xinhui, Linux Kernel Mailing List, Linux AMDGPU, Alex Deucher, Dave Airlie, Christian König, Kees Cook On April 8, 2024 5:45:29 PM PDT, Jeff Johnson <quic_jjohnson@quicinc.com> wrote: >On 10/1/23 17:12, Justin Piszcz wrote: >>>> ================================================================================ >>>> [Sun Oct 1 15:59:04 2023] UBSAN: array-index-out-of-bounds in >>>> drivers/gpu/drm/radeon/radeon_atombios.c:2620:43 >>>> [Sun Oct 1 15:59:04 2023] index 1 is out of range for type 'UCHAR [1]' >>>> [Sun Oct 1 15:59:04 2023] CPU: 5 PID: 1 Comm: swapper/0 Tainted: G >>>> T 6.5.5 #13 55df8de52754ef95effc50a55e9206abdea304ac >>>> [Sun Oct 1 15:59:04 2023] Hardware name: Supermicro X9SRL-F/X9SRL-F, >>>> BIOS 3.3 11/13/2018 >>>> [Sun Oct 1 15:59:04 2023] Call Trace: >>>> [Sun Oct 1 15:59:04 2023] <TASK> >>>> [Sun Oct 1 15:59:04 2023] dump_stack_lvl+0x36/0x50 >>>> [Sun Oct 1 15:59:04 2023] __ubsan_handle_out_of_bounds+0xc7/0x110 >>>> [Sun Oct 1 15:59:04 2023] radeon_atombios_get_power_modes+0x87a/0x8f0 >>>> [Sun Oct 1 15:59:04 2023] radeon_pm_init+0x13a/0x7e0 >>>> [Sun Oct 1 15:59:04 2023] evergreen_init+0x13d/0x3d0 >>>> [Sun Oct 1 15:59:04 2023] radeon_device_init+0x60a/0xbf0 >>>> [Sun Oct 1 15:59:04 2023] radeon_driver_load_kms+0xb1/0x250 >>>> [Sun Oct 1 15:59:04 2023] drm_dev_register+0xfc/0x250 >>>> [Sun Oct 1 15:59:04 2023] radeon_pci_probe+0xd0/0x150 >>>> [Sun Oct 1 15:59:04 2023] pci_device_probe+0x97/0x130 >>>> [Sun Oct 1 15:59:04 2023] really_probe+0xbe/0x2f0 >>>> [Sun Oct 1 15:59:04 2023] ? __pfx___driver_attach+0x10/0x10 >>>> [Sun Oct 1 15:59:04 2023] __driver_probe_device+0x6e/0x120 >>>> [Sun Oct 1 15:59:04 2023] driver_probe_device+0x1a/0x90 >>>> [Sun Oct 1 15:59:04 2023] __driver_attach+0xd4/0x170 >>>> [Sun Oct 1 15:59:04 2023] bus_for_each_dev+0x87/0xe0 >>>> [Sun Oct 1 15:59:04 2023] bus_add_driver+0xf3/0x1f0 >>>> [Sun Oct 1 15:59:04 2023] driver_register+0x58/0x120 >>>> [Sun Oct 1 15:59:04 2023] ? __pfx_radeon_module_init+0x10/0x10 >>>> [Sun Oct 1 15:59:04 2023] do_one_initcall+0x93/0x4a0 >>>> [Sun Oct 1 15:59:04 2023] kernel_init_freeable+0x301/0x580 >>>> [Sun Oct 1 15:59:04 2023] ? __pfx_kernel_init+0x10/0x10 >>>> [Sun Oct 1 15:59:04 2023] kernel_init+0x15/0x1b0 >>>> [Sun Oct 1 15:59:04 2023] ret_from_fork+0x2f/0x50 >>>> [Sun Oct 1 15:59:04 2023] ? __pfx_kernel_init+0x10/0x10 >>>> [Sun Oct 1 15:59:04 2023] ret_from_fork_asm+0x1b/0x30 >>>> [Sun Oct 1 15:59:04 2023] </TASK> >>>> [Sun Oct 1 15:59:04 2023] >>>> ================================================================================ >>>> [Sun Oct 1 15:59:04 2023] [drm] radeon: dpm initialized >>>> [Sun Oct 1 15:59:04 2023] [drm] GART: num cpu pages 262144, num gpu >>>> pages 262144 >>>> [Sun Oct 1 15:59:04 2023] [drm] enabling PCIE gen 2 link speeds, >>>> disable with radeon.pcie_gen2=0 >>>> [Sun Oct 1 15:59:04 2023] [drm] PCIE GART of 1024M enabled (table at >>>> 0x000000000014C000). >>>> [Sun Oct 1 15:59:04 2023] radeon 0000:03:00.0: WB enabled >>>> [Sun Oct 1 15:59:04 2023] radeon 0000:03:00.0: fence driver on ring 0 >>>> use gpu addr 0x0000000040000c00 >>>> [Sun Oct 1 15:59:04 2023] radeon 0000:03:00.0: fence driver on ring 3 >>>> use gpu addr 0x0000000040000c0c >>>> [Sun Oct 1 15:59:04 2023] radeon 0000:03:00.0: fence driver on ring 5 >>>> use gpu addr 0x000000000005c418 >>>> [Sun Oct 1 15:59:04 2023] radeon 0000:03:00.0: radeon: MSI limited to 32-bit >>>> [Sun Oct 1 15:59:04 2023] radeon 0000:03:00.0: radeon: using MSI. >>>> [Sun Oct 1 15:59:04 2023] [drm] radeon: irq initialized. >>>> >>> >>> Please also open an issue on freedesktop tracker [1]. >>> >>> Thanks. >>> >>> [1]: https://gitlab.freedesktop.org/drm/amd/-/issues >> >> Issue opened: https://gitlab.freedesktop.org/drm/amd/-/issues/2894 >> >> Regards, >> Justin > >+Kees since I've worked with him on several of these flexible array issues. > >I just happened to look at kernel logs today for my ath1*k driver maintenance and see the subject issue is present on my device, running 6.9.0-rc1. The freedesktop issue tracker says the issue is closed, but any fix has not landed in the upstream kernel. Is there a -next patch somewhere? > >[ 12.105270] UBSAN: array-index-out-of-bounds in drivers/gpu/drm/radeon/radeon_atombios.c:2718:34 >[ 12.105272] index 48 is out of range for type 'UCHAR [1]' >[ > >If there isn't really an upstream fix, I can probably supply one. I would expect this to have fixed it: https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git/commit/drivers/gpu/drm/radeon/pptable.h?id=c63079c61177ba1b17fa05c6875699a36924fe39 If not, there must be something else happening? -Kees -- Kees Cook ^ permalink raw reply [flat|nested] 8+ messages in thread
* Re: 6.5.5: UBSAN: radeon_atombios.c: index 1 is out of range for type 'UCHAR [1]' 2024-04-09 1:45 ` Kees Cook @ 2024-04-09 4:23 ` Alex Deucher 2024-04-09 15:39 ` Jeff Johnson 0 siblings, 1 reply; 8+ messages in thread From: Alex Deucher @ 2024-04-09 4:23 UTC (permalink / raw) To: Kees Cook Cc: Jeff Johnson, Justin Piszcz, Bagas Sanjaya, Pan, Xinhui, Linux Kernel Mailing List, Linux AMDGPU, Alex Deucher, Dave Airlie, Christian König, Kees Cook On Mon, Apr 8, 2024 at 9:45 PM Kees Cook <kees@kernel.org> wrote: > > > > On April 8, 2024 5:45:29 PM PDT, Jeff Johnson <quic_jjohnson@quicinc.com> wrote: > >On 10/1/23 17:12, Justin Piszcz wrote: > >>>> ================================================================================ > >>>> [Sun Oct 1 15:59:04 2023] UBSAN: array-index-out-of-bounds in > >>>> drivers/gpu/drm/radeon/radeon_atombios.c:2620:43 > >>>> [Sun Oct 1 15:59:04 2023] index 1 is out of range for type 'UCHAR [1]' > >>>> [Sun Oct 1 15:59:04 2023] CPU: 5 PID: 1 Comm: swapper/0 Tainted: G > >>>> T 6.5.5 #13 55df8de52754ef95effc50a55e9206abdea304ac > >>>> [Sun Oct 1 15:59:04 2023] Hardware name: Supermicro X9SRL-F/X9SRL-F, > >>>> BIOS 3.3 11/13/2018 > >>>> [Sun Oct 1 15:59:04 2023] Call Trace: > >>>> [Sun Oct 1 15:59:04 2023] <TASK> > >>>> [Sun Oct 1 15:59:04 2023] dump_stack_lvl+0x36/0x50 > >>>> [Sun Oct 1 15:59:04 2023] __ubsan_handle_out_of_bounds+0xc7/0x110 > >>>> [Sun Oct 1 15:59:04 2023] radeon_atombios_get_power_modes+0x87a/0x8f0 > >>>> [Sun Oct 1 15:59:04 2023] radeon_pm_init+0x13a/0x7e0 > >>>> [Sun Oct 1 15:59:04 2023] evergreen_init+0x13d/0x3d0 > >>>> [Sun Oct 1 15:59:04 2023] radeon_device_init+0x60a/0xbf0 > >>>> [Sun Oct 1 15:59:04 2023] radeon_driver_load_kms+0xb1/0x250 > >>>> [Sun Oct 1 15:59:04 2023] drm_dev_register+0xfc/0x250 > >>>> [Sun Oct 1 15:59:04 2023] radeon_pci_probe+0xd0/0x150 > >>>> [Sun Oct 1 15:59:04 2023] pci_device_probe+0x97/0x130 > >>>> [Sun Oct 1 15:59:04 2023] really_probe+0xbe/0x2f0 > >>>> [Sun Oct 1 15:59:04 2023] ? __pfx___driver_attach+0x10/0x10 > >>>> [Sun Oct 1 15:59:04 2023] __driver_probe_device+0x6e/0x120 > >>>> [Sun Oct 1 15:59:04 2023] driver_probe_device+0x1a/0x90 > >>>> [Sun Oct 1 15:59:04 2023] __driver_attach+0xd4/0x170 > >>>> [Sun Oct 1 15:59:04 2023] bus_for_each_dev+0x87/0xe0 > >>>> [Sun Oct 1 15:59:04 2023] bus_add_driver+0xf3/0x1f0 > >>>> [Sun Oct 1 15:59:04 2023] driver_register+0x58/0x120 > >>>> [Sun Oct 1 15:59:04 2023] ? __pfx_radeon_module_init+0x10/0x10 > >>>> [Sun Oct 1 15:59:04 2023] do_one_initcall+0x93/0x4a0 > >>>> [Sun Oct 1 15:59:04 2023] kernel_init_freeable+0x301/0x580 > >>>> [Sun Oct 1 15:59:04 2023] ? __pfx_kernel_init+0x10/0x10 > >>>> [Sun Oct 1 15:59:04 2023] kernel_init+0x15/0x1b0 > >>>> [Sun Oct 1 15:59:04 2023] ret_from_fork+0x2f/0x50 > >>>> [Sun Oct 1 15:59:04 2023] ? __pfx_kernel_init+0x10/0x10 > >>>> [Sun Oct 1 15:59:04 2023] ret_from_fork_asm+0x1b/0x30 > >>>> [Sun Oct 1 15:59:04 2023] </TASK> > >>>> [Sun Oct 1 15:59:04 2023] > >>>> ================================================================================ > >>>> [Sun Oct 1 15:59:04 2023] [drm] radeon: dpm initialized > >>>> [Sun Oct 1 15:59:04 2023] [drm] GART: num cpu pages 262144, num gpu > >>>> pages 262144 > >>>> [Sun Oct 1 15:59:04 2023] [drm] enabling PCIE gen 2 link speeds, > >>>> disable with radeon.pcie_gen2=0 > >>>> [Sun Oct 1 15:59:04 2023] [drm] PCIE GART of 1024M enabled (table at > >>>> 0x000000000014C000). > >>>> [Sun Oct 1 15:59:04 2023] radeon 0000:03:00.0: WB enabled > >>>> [Sun Oct 1 15:59:04 2023] radeon 0000:03:00.0: fence driver on ring 0 > >>>> use gpu addr 0x0000000040000c00 > >>>> [Sun Oct 1 15:59:04 2023] radeon 0000:03:00.0: fence driver on ring 3 > >>>> use gpu addr 0x0000000040000c0c > >>>> [Sun Oct 1 15:59:04 2023] radeon 0000:03:00.0: fence driver on ring 5 > >>>> use gpu addr 0x000000000005c418 > >>>> [Sun Oct 1 15:59:04 2023] radeon 0000:03:00.0: radeon: MSI limited to 32-bit > >>>> [Sun Oct 1 15:59:04 2023] radeon 0000:03:00.0: radeon: using MSI. > >>>> [Sun Oct 1 15:59:04 2023] [drm] radeon: irq initialized. > >>>> > >>> > >>> Please also open an issue on freedesktop tracker [1]. > >>> > >>> Thanks. > >>> > >>> [1]: https://gitlab.freedesktop.org/drm/amd/-/issues > >> > >> Issue opened: https://gitlab.freedesktop.org/drm/amd/-/issues/2894 > >> > >> Regards, > >> Justin > > > >+Kees since I've worked with him on several of these flexible array issues. > > > >I just happened to look at kernel logs today for my ath1*k driver maintenance and see the subject issue is present on my device, running 6.9.0-rc1. The freedesktop issue tracker says the issue is closed, but any fix has not landed in the upstream kernel. Is there a -next patch somewhere? > > > >[ 12.105270] UBSAN: array-index-out-of-bounds in drivers/gpu/drm/radeon/radeon_atombios.c:2718:34 > >[ 12.105272] index 48 is out of range for type 'UCHAR [1]' > >[ > > > >If there isn't really an upstream fix, I can probably supply one. > > I would expect this to have fixed it: > https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git/commit/drivers/gpu/drm/radeon/pptable.h?id=c63079c61177ba1b17fa05c6875699a36924fe39 > > If not, there must be something else happening? This patch should silence it I think: https://patchwork.freedesktop.org/patch/588305/ Alex > > -Kees > > -- > Kees Cook ^ permalink raw reply [flat|nested] 8+ messages in thread
* Re: 6.5.5: UBSAN: radeon_atombios.c: index 1 is out of range for type 'UCHAR [1]' 2024-04-09 4:23 ` Alex Deucher @ 2024-04-09 15:39 ` Jeff Johnson 0 siblings, 0 replies; 8+ messages in thread From: Jeff Johnson @ 2024-04-09 15:39 UTC (permalink / raw) To: Alex Deucher, Kees Cook Cc: Justin Piszcz, Bagas Sanjaya, Pan, Xinhui, Linux Kernel Mailing List, Linux AMDGPU, Alex Deucher, Dave Airlie, Christian König, Kees Cook On 4/8/2024 9:23 PM, Alex Deucher wrote: > On Mon, Apr 8, 2024 at 9:45 PM Kees Cook <kees@kernel.org> wrote: >> >> >> >> On April 8, 2024 5:45:29 PM PDT, Jeff Johnson <quic_jjohnson@quicinc.com> wrote: >>> On 10/1/23 17:12, Justin Piszcz wrote: >>>>>> ================================================================================ >>>>>> [Sun Oct 1 15:59:04 2023] UBSAN: array-index-out-of-bounds in >>>>>> drivers/gpu/drm/radeon/radeon_atombios.c:2620:43 >>>>>> [Sun Oct 1 15:59:04 2023] index 1 is out of range for type 'UCHAR [1]' >>>>>> [Sun Oct 1 15:59:04 2023] CPU: 5 PID: 1 Comm: swapper/0 Tainted: G >>>>>> T 6.5.5 #13 55df8de52754ef95effc50a55e9206abdea304ac >>>>>> [Sun Oct 1 15:59:04 2023] Hardware name: Supermicro X9SRL-F/X9SRL-F, >>>>>> BIOS 3.3 11/13/2018 >>>>>> [Sun Oct 1 15:59:04 2023] Call Trace: >>>>>> [Sun Oct 1 15:59:04 2023] <TASK> >>>>>> [Sun Oct 1 15:59:04 2023] dump_stack_lvl+0x36/0x50 >>>>>> [Sun Oct 1 15:59:04 2023] __ubsan_handle_out_of_bounds+0xc7/0x110 >>>>>> [Sun Oct 1 15:59:04 2023] radeon_atombios_get_power_modes+0x87a/0x8f0 >>>>>> [Sun Oct 1 15:59:04 2023] radeon_pm_init+0x13a/0x7e0 >>>>>> [Sun Oct 1 15:59:04 2023] evergreen_init+0x13d/0x3d0 >>>>>> [Sun Oct 1 15:59:04 2023] radeon_device_init+0x60a/0xbf0 >>>>>> [Sun Oct 1 15:59:04 2023] radeon_driver_load_kms+0xb1/0x250 >>>>>> [Sun Oct 1 15:59:04 2023] drm_dev_register+0xfc/0x250 >>>>>> [Sun Oct 1 15:59:04 2023] radeon_pci_probe+0xd0/0x150 >>>>>> [Sun Oct 1 15:59:04 2023] pci_device_probe+0x97/0x130 >>>>>> [Sun Oct 1 15:59:04 2023] really_probe+0xbe/0x2f0 >>>>>> [Sun Oct 1 15:59:04 2023] ? __pfx___driver_attach+0x10/0x10 >>>>>> [Sun Oct 1 15:59:04 2023] __driver_probe_device+0x6e/0x120 >>>>>> [Sun Oct 1 15:59:04 2023] driver_probe_device+0x1a/0x90 >>>>>> [Sun Oct 1 15:59:04 2023] __driver_attach+0xd4/0x170 >>>>>> [Sun Oct 1 15:59:04 2023] bus_for_each_dev+0x87/0xe0 >>>>>> [Sun Oct 1 15:59:04 2023] bus_add_driver+0xf3/0x1f0 >>>>>> [Sun Oct 1 15:59:04 2023] driver_register+0x58/0x120 >>>>>> [Sun Oct 1 15:59:04 2023] ? __pfx_radeon_module_init+0x10/0x10 >>>>>> [Sun Oct 1 15:59:04 2023] do_one_initcall+0x93/0x4a0 >>>>>> [Sun Oct 1 15:59:04 2023] kernel_init_freeable+0x301/0x580 >>>>>> [Sun Oct 1 15:59:04 2023] ? __pfx_kernel_init+0x10/0x10 >>>>>> [Sun Oct 1 15:59:04 2023] kernel_init+0x15/0x1b0 >>>>>> [Sun Oct 1 15:59:04 2023] ret_from_fork+0x2f/0x50 >>>>>> [Sun Oct 1 15:59:04 2023] ? __pfx_kernel_init+0x10/0x10 >>>>>> [Sun Oct 1 15:59:04 2023] ret_from_fork_asm+0x1b/0x30 >>>>>> [Sun Oct 1 15:59:04 2023] </TASK> >>>>>> [Sun Oct 1 15:59:04 2023] >>>>>> ================================================================================ >>>>>> [Sun Oct 1 15:59:04 2023] [drm] radeon: dpm initialized >>>>>> [Sun Oct 1 15:59:04 2023] [drm] GART: num cpu pages 262144, num gpu >>>>>> pages 262144 >>>>>> [Sun Oct 1 15:59:04 2023] [drm] enabling PCIE gen 2 link speeds, >>>>>> disable with radeon.pcie_gen2=0 >>>>>> [Sun Oct 1 15:59:04 2023] [drm] PCIE GART of 1024M enabled (table at >>>>>> 0x000000000014C000). >>>>>> [Sun Oct 1 15:59:04 2023] radeon 0000:03:00.0: WB enabled >>>>>> [Sun Oct 1 15:59:04 2023] radeon 0000:03:00.0: fence driver on ring 0 >>>>>> use gpu addr 0x0000000040000c00 >>>>>> [Sun Oct 1 15:59:04 2023] radeon 0000:03:00.0: fence driver on ring 3 >>>>>> use gpu addr 0x0000000040000c0c >>>>>> [Sun Oct 1 15:59:04 2023] radeon 0000:03:00.0: fence driver on ring 5 >>>>>> use gpu addr 0x000000000005c418 >>>>>> [Sun Oct 1 15:59:04 2023] radeon 0000:03:00.0: radeon: MSI limited to 32-bit >>>>>> [Sun Oct 1 15:59:04 2023] radeon 0000:03:00.0: radeon: using MSI. >>>>>> [Sun Oct 1 15:59:04 2023] [drm] radeon: irq initialized. >>>>>> >>>>> >>>>> Please also open an issue on freedesktop tracker [1]. >>>>> >>>>> Thanks. >>>>> >>>>> [1]: https://gitlab.freedesktop.org/drm/amd/-/issues >>>> >>>> Issue opened: https://gitlab.freedesktop.org/drm/amd/-/issues/2894 >>>> >>>> Regards, >>>> Justin >>> >>> +Kees since I've worked with him on several of these flexible array issues. >>> >>> I just happened to look at kernel logs today for my ath1*k driver maintenance and see the subject issue is present on my device, running 6.9.0-rc1. The freedesktop issue tracker says the issue is closed, but any fix has not landed in the upstream kernel. Is there a -next patch somewhere? >>> >>> [ 12.105270] UBSAN: array-index-out-of-bounds in drivers/gpu/drm/radeon/radeon_atombios.c:2718:34 >>> [ 12.105272] index 48 is out of range for type 'UCHAR [1]' >>> [ >>> >>> If there isn't really an upstream fix, I can probably supply one. >> >> I would expect this to have fixed it: >> https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git/commit/drivers/gpu/drm/radeon/pptable.h?id=c63079c61177ba1b17fa05c6875699a36924fe39 >> >> If not, there must be something else happening? > > This patch should silence it I think: > https://patchwork.freedesktop.org/patch/588305/ I can confirm that my issues are resolved with that patch Tested-by: Jeff Johnson <quic_jjohnson@quicinc.com> ^ permalink raw reply [flat|nested] 8+ messages in thread
* Re: 6.5.5: UBSAN: radeon_atombios.c: index 1 is out of range for type 'UCHAR [1]' 2023-10-02 0:00 ` Bagas Sanjaya 2023-10-02 0:12 ` Justin Piszcz @ 2023-10-02 14:20 ` Alex Deucher 1 sibling, 0 replies; 8+ messages in thread From: Alex Deucher @ 2023-10-02 14:20 UTC (permalink / raw) To: Bagas Sanjaya Cc: Justin Piszcz, Linux Kernel Mailing List, Linux AMDGPU, Alex Deucher, Dave Airlie, Pan, Xinhui, Christian König On Mon, Oct 2, 2023 at 3:40 AM Bagas Sanjaya <bagasdotme@gmail.com> wrote: > > On Sun, Oct 01, 2023 at 07:05:11PM -0400, Justin Piszcz wrote: > > Hello, > > > > Kernel: 6.5.5 > > Arch: x86_64 > > Distribution: Debian testing > > > > Recently, I enabled UBSAN and noticed the following at boot time with > > an older AMD graphics card, is this considered normal when using the > > AMD firmware-linux-nonfree package? This is actually a variable sized array we are indexing: typedef struct _ATOM_PPLIB_STATE { UCHAR ucNonClockStateIndex; UCHAR ucClockStateIndices[1]; // variable-sized } ATOM_PPLIB_STATE; So it's a false positive. I guess it should be converted to variable sized array changes others have been working on. Alex > > > > [ .. ] > > [Sun Oct 1 15:59:04 2023] ACPI: bus type drm_connector registered > > [Sun Oct 1 15:59:04 2023] [drm] radeon kernel modesetting enabled. > > [Sun Oct 1 15:59:04 2023] [drm] initializing kernel modesetting > > (CEDAR 0x1002:0x68E1 0x1787:0x3000 0x00). > > [Sun Oct 1 15:59:04 2023] ATOM BIOS: PARK > > [Sun Oct 1 15:59:04 2023] radeon 0000:03:00.0: VRAM: 1024M > > 0x0000000000000000 - 0x000000003FFFFFFF (1024M used) > > [Sun Oct 1 15:59:04 2023] radeon 0000:03:00.0: GTT: 1024M > > 0x0000000040000000 - 0x000000007FFFFFFF > > [Sun Oct 1 15:59:04 2023] [drm] Detected VRAM RAM=1024M, BAR=256M > > [Sun Oct 1 15:59:04 2023] [drm] RAM width 64bits DDR > > [Sun Oct 1 15:59:04 2023] [drm] radeon: 1024M of VRAM memory ready > > [Sun Oct 1 15:59:04 2023] [drm] radeon: 1024M of GTT memory ready. > > [Sun Oct 1 15:59:04 2023] [drm] Loading CEDAR Microcode > > [Sun Oct 1 15:59:04 2023] [drm] Internal thermal controller with fan control > > [Sun Oct 1 15:59:04 2023] > > ================================================================================ > > [Sun Oct 1 15:59:04 2023] UBSAN: array-index-out-of-bounds in > > drivers/gpu/drm/radeon/radeon_atombios.c:2620:43 > > [Sun Oct 1 15:59:04 2023] index 1 is out of range for type 'UCHAR [1]' > > [Sun Oct 1 15:59:04 2023] CPU: 5 PID: 1 Comm: swapper/0 Tainted: G > > T 6.5.5 #13 55df8de52754ef95effc50a55e9206abdea304ac > > [Sun Oct 1 15:59:04 2023] Hardware name: Supermicro X9SRL-F/X9SRL-F, > > BIOS 3.3 11/13/2018 > > [Sun Oct 1 15:59:04 2023] Call Trace: > > [Sun Oct 1 15:59:04 2023] <TASK> > > [Sun Oct 1 15:59:04 2023] dump_stack_lvl+0x36/0x50 > > [Sun Oct 1 15:59:04 2023] __ubsan_handle_out_of_bounds+0xc7/0x110 > > [Sun Oct 1 15:59:04 2023] radeon_atombios_get_power_modes+0x87a/0x8f0 > > [Sun Oct 1 15:59:04 2023] radeon_pm_init+0x13a/0x7e0 > > [Sun Oct 1 15:59:04 2023] evergreen_init+0x13d/0x3d0 > > [Sun Oct 1 15:59:04 2023] radeon_device_init+0x60a/0xbf0 > > [Sun Oct 1 15:59:04 2023] radeon_driver_load_kms+0xb1/0x250 > > [Sun Oct 1 15:59:04 2023] drm_dev_register+0xfc/0x250 > > [Sun Oct 1 15:59:04 2023] radeon_pci_probe+0xd0/0x150 > > [Sun Oct 1 15:59:04 2023] pci_device_probe+0x97/0x130 > > [Sun Oct 1 15:59:04 2023] really_probe+0xbe/0x2f0 > > [Sun Oct 1 15:59:04 2023] ? __pfx___driver_attach+0x10/0x10 > > [Sun Oct 1 15:59:04 2023] __driver_probe_device+0x6e/0x120 > > [Sun Oct 1 15:59:04 2023] driver_probe_device+0x1a/0x90 > > [Sun Oct 1 15:59:04 2023] __driver_attach+0xd4/0x170 > > [Sun Oct 1 15:59:04 2023] bus_for_each_dev+0x87/0xe0 > > [Sun Oct 1 15:59:04 2023] bus_add_driver+0xf3/0x1f0 > > [Sun Oct 1 15:59:04 2023] driver_register+0x58/0x120 > > [Sun Oct 1 15:59:04 2023] ? __pfx_radeon_module_init+0x10/0x10 > > [Sun Oct 1 15:59:04 2023] do_one_initcall+0x93/0x4a0 > > [Sun Oct 1 15:59:04 2023] kernel_init_freeable+0x301/0x580 > > [Sun Oct 1 15:59:04 2023] ? __pfx_kernel_init+0x10/0x10 > > [Sun Oct 1 15:59:04 2023] kernel_init+0x15/0x1b0 > > [Sun Oct 1 15:59:04 2023] ret_from_fork+0x2f/0x50 > > [Sun Oct 1 15:59:04 2023] ? __pfx_kernel_init+0x10/0x10 > > [Sun Oct 1 15:59:04 2023] ret_from_fork_asm+0x1b/0x30 > > [Sun Oct 1 15:59:04 2023] </TASK> > > [Sun Oct 1 15:59:04 2023] > > ================================================================================ > > [Sun Oct 1 15:59:04 2023] [drm] radeon: dpm initialized > > [Sun Oct 1 15:59:04 2023] [drm] GART: num cpu pages 262144, num gpu > > pages 262144 > > [Sun Oct 1 15:59:04 2023] [drm] enabling PCIE gen 2 link speeds, > > disable with radeon.pcie_gen2=0 > > [Sun Oct 1 15:59:04 2023] [drm] PCIE GART of 1024M enabled (table at > > 0x000000000014C000). > > [Sun Oct 1 15:59:04 2023] radeon 0000:03:00.0: WB enabled > > [Sun Oct 1 15:59:04 2023] radeon 0000:03:00.0: fence driver on ring 0 > > use gpu addr 0x0000000040000c00 > > [Sun Oct 1 15:59:04 2023] radeon 0000:03:00.0: fence driver on ring 3 > > use gpu addr 0x0000000040000c0c > > [Sun Oct 1 15:59:04 2023] radeon 0000:03:00.0: fence driver on ring 5 > > use gpu addr 0x000000000005c418 > > [Sun Oct 1 15:59:04 2023] radeon 0000:03:00.0: radeon: MSI limited to 32-bit > > [Sun Oct 1 15:59:04 2023] radeon 0000:03:00.0: radeon: using MSI. > > [Sun Oct 1 15:59:04 2023] [drm] radeon: irq initialized. > > > > Please also open an issue on freedesktop tracker [1]. > > Thanks. > > [1]: https://gitlab.freedesktop.org/drm/amd/-/issues > > -- > An old man doll... just what I always wanted! - Clara ^ permalink raw reply [flat|nested] 8+ messages in thread
end of thread, other threads:[~2024-04-09 15:39 UTC | newest] Thread overview: 8+ messages (download: mbox.gz follow: Atom feed -- links below jump to the message on this page -- 2023-10-01 23:05 6.5.5: UBSAN: radeon_atombios.c: index 1 is out of range for type 'UCHAR [1]' Justin Piszcz 2023-10-02 0:00 ` Bagas Sanjaya 2023-10-02 0:12 ` Justin Piszcz 2024-04-09 0:45 ` Jeff Johnson 2024-04-09 1:45 ` Kees Cook 2024-04-09 4:23 ` Alex Deucher 2024-04-09 15:39 ` Jeff Johnson 2023-10-02 14:20 ` Alex Deucher
This is a public inbox, see mirroring instructions for how to clone and mirror all data and code used for this inbox