Dave Airlie
be585921f2
drm/amdgpu/cs: make commands with 0 chunks illegal behaviour.
commit 31ab27b14daaa75541a415c6794d6f3567fea44a upstream.
Submitting a cs with 0 chunks, causes an oops later, found trying
to execute the wrong userspace driver.
MESA_LOADER_DRIVER_OVERRIDE=v3d glxinfo
[172536.665184] BUG: kernel NULL pointer dereference, address: 00000000000001d8
[172536.665188] #PF: supervisor read access in kernel mode
[172536.665189] #PF: error_code(0x0000) - not-present page
[172536.665191] PGD 6712a0067 P4D 6712a0067 PUD 5af9ff067 PMD 0
[172536.665195] Oops: 0000 [#1] SMP NOPTI
[172536.665197] CPU: 7 PID: 2769838 Comm: glxinfo Tainted: P O 5.10.81 #1-NixOS
[172536.665199] Hardware name: To be filled by O.E.M. To be filled by O.E.M./CROSSHAIR V FORMULA-Z, BIOS 2201 03/23/2015
[172536.665272] RIP: 0010:amdgpu_cs_ioctl+0x96/0x1ce0 [amdgpu]
[172536.665274] Code: 75 18 00 00 4c 8b b2 88 00 00 00 8b 46 08 48 89 54 24 68 49 89 f7 4c 89 5c 24 60 31 d2 4c 89 74 24 30 85 c0 0f 85 c0 01 00 00 <48> 83 ba d8 01 00 00 00 48 8b b4 24 90 00 00 00 74 16 48 8b 46 10
[172536.665276] RSP: 0018:ffffb47c0e81bbe0 EFLAGS: 00010246
[172536.665277] RAX: 0000000000000000 RBX: 0000000000000000 RCX: 0000000000000000
[172536.665278] RDX: 0000000000000000 RSI: ffffb47c0e81be28 RDI: ffffb47c0e81bd68
[172536.665279] RBP: ffff936524080010 R08: 0000000000000000 R09: ffffb47c0e81be38
[172536.665281] R10: ffff936524080010 R11: ffff936524080000 R12: ffffb47c0e81bc40
[172536.665282] R13: ffffb47c0e81be28 R14: ffff9367bc410000 R15: ffffb47c0e81be28
[172536.665283] FS: 00007fe35e05d740(0000) GS:ffff936c1edc0000(0000) knlGS:0000000000000000
[172536.665284] CS: 0010 DS: 0000 ES: 0000 CR0: 0000000080050033
[172536.665286] CR2: 00000000000001d8 CR3: 0000000532e46000 CR4: 00000000000406e0
[172536.665287] Call Trace:
[172536.665322] ? amdgpu_cs_find_mapping+0x110/0x110 [amdgpu]
[172536.665332] drm_ioctl_kernel+0xaa/0xf0 [drm]
[172536.665338] drm_ioctl+0x201/0x3b0 [drm]
[172536.665369] ? amdgpu_cs_find_mapping+0x110/0x110 [amdgpu]
[172536.665372] ? selinux_file_ioctl+0x135/0x230
[172536.665399] amdgpu_drm_ioctl+0x49/0x80 [amdgpu]
[172536.665403] __x64_sys_ioctl+0x83/0xb0
[172536.665406] do_syscall_64+0x33/0x40
[172536.665409] entry_SYSCALL_64_after_hwframe+0x44/0xa9
Bug: https://gitlab.freedesktop.org/drm/amd/-/issues/2018
Signed-off-by: Dave Airlie <airlied@redhat.com>
Cc: stable@vger.kernel.org
Reviewed-by: Alex Deucher <alexander.deucher@amd.com>
Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2022-06-09 10:21:24 +02:00
..
2021-09-15 09:50:34 +02:00
2020-10-09 15:16:10 -04:00
2019-06-10 23:02:48 +02:00
2020-08-26 16:40:18 -04:00
2019-01-14 15:04:29 -05:00
2020-10-15 10:46:16 -07:00
2020-10-15 10:46:16 -07:00
2020-10-15 10:46:16 -07:00
2020-10-15 10:46:16 -07:00
2021-06-03 09:00:31 +02:00
2020-10-15 10:46:16 -07:00
2022-04-20 09:23:08 +02:00
2021-12-14 11:32:35 +01:00
2021-12-14 11:32:35 +01:00
2020-08-24 13:06:06 -04:00
2020-07-21 15:37:37 -04:00
2020-10-01 10:43:02 -04:00
2020-07-01 01:59:14 -04:00
2020-09-15 17:52:43 -04:00
2020-04-28 16:20:29 -04:00
2020-08-14 17:03:20 -04:00
2021-11-18 14:04:04 +01:00
2021-11-18 14:04:04 +01:00
2020-04-09 10:43:18 -04:00
2022-01-27 10:53:52 +01:00
2022-06-09 10:21:24 +02:00
2019-10-25 11:40:50 +02:00
2018-11-05 14:21:50 -05:00
2021-06-10 13:39:27 +02:00
2020-04-09 10:43:14 -04:00
2021-03-09 11:11:13 +01:00
2020-05-18 11:23:37 -04:00
2021-12-14 11:32:36 +01:00
2020-09-15 17:52:42 -04:00
2022-01-05 12:40:32 +01:00
2020-07-02 12:02:51 -04:00
2020-09-29 17:09:22 -04:00
2019-07-30 23:48:32 -05:00
2021-06-30 08:47:16 -04:00
2020-08-11 11:47:35 -04:00
2020-07-01 01:59:07 -04:00
2022-04-20 09:23:20 +02:00
2020-08-24 13:06:06 -04:00
2021-06-03 09:00:44 +02:00
2021-05-11 14:47:23 +02:00
2021-06-18 10:00:06 +02:00
2020-09-29 16:11:50 -04:00
2019-11-13 15:29:44 -05:00
2018-11-05 14:21:16 -05:00
2019-08-12 12:47:47 -05:00
2020-12-09 10:06:40 -05:00
2019-09-16 09:59:21 -05:00
2022-04-13 21:01:03 +02:00
2020-12-30 11:53:09 +01:00
2020-09-30 13:50:13 -04:00
2020-12-30 11:53:54 +01:00
2020-09-25 16:55:16 -04:00
2020-10-28 11:41:15 -06:00
2021-09-18 13:40:28 +02:00
2021-07-19 09:44:45 +02:00
2021-05-14 09:50:01 +02:00
2020-09-17 19:21:16 +02:00
2019-11-19 10:12:54 -05:00
2019-03-19 15:36:58 -05:00
2019-06-10 23:02:48 +02:00
2022-01-27 10:54:12 +01:00
2019-02-13 17:47:11 -05:00
2020-08-18 18:20:17 -04:00
2020-04-28 16:20:29 -04:00
2020-07-01 01:59:19 -04:00
2020-07-01 01:59:19 -04:00
2022-02-16 12:54:17 +01:00
2020-07-01 01:59:11 -04:00
2020-03-10 15:55:11 -04:00
2020-09-22 17:37:38 -04:00
2019-11-23 19:56:45 -04:00
2019-11-23 19:56:45 -04:00
2020-09-15 17:52:39 -04:00
2020-03-10 15:55:11 -04:00
2020-04-01 14:44:42 -04:00
2022-04-13 21:00:56 +02:00
2020-08-06 13:19:21 +10:00
2019-06-10 23:02:48 +02:00
2020-08-24 13:06:06 -04:00
2019-06-20 11:36:22 -05:00
2021-01-19 18:27:27 +01:00
2021-06-18 10:00:06 +02:00
2020-08-24 13:06:06 -04:00
2020-08-14 16:22:40 -04:00
2021-09-18 13:40:17 +02:00
2020-08-04 17:26:54 -04:00
2021-03-04 11:37:42 +01:00
2020-12-09 10:06:39 -05:00
2020-08-24 13:06:06 -04:00
2020-08-18 18:20:17 -04:00
2019-12-03 11:57:00 -05:00
2020-10-21 17:33:42 -04:00
2019-06-10 23:02:48 +02:00
2020-08-24 13:06:06 -04:00
2020-08-18 18:20:26 -04:00
2020-03-10 15:55:11 -04:00
2020-04-28 16:20:29 -04:00
2019-06-21 18:59:34 -05:00
2020-07-01 01:59:22 -04:00
2020-07-01 01:59:22 -04:00
2020-04-28 16:20:30 -04:00
2019-06-10 23:02:48 +02:00
2021-03-04 11:37:38 +01:00
2022-02-23 12:01:00 +01:00
2020-09-14 18:11:40 +02:00
2022-06-09 10:20:53 +02:00
2020-10-21 17:33:42 -04:00
2020-08-04 17:27:20 -04:00
2021-07-19 09:44:51 +02:00
2021-05-11 14:47:30 +02:00
2020-11-24 12:29:35 -05:00
2020-04-28 16:20:30 -04:00
2019-10-25 16:15:00 -04:00
2020-11-04 08:33:47 -05:00
2020-10-14 15:27:50 -04:00
2021-03-07 12:34:12 +01:00
2020-09-25 17:03:22 -04:00
2020-09-15 17:52:42 -04:00
2020-09-15 17:52:42 -04:00
2022-03-08 19:09:37 +01:00
2021-05-14 09:50:01 +02:00
2020-10-28 11:41:15 -06:00
2021-12-08 09:03:19 +01:00
2020-08-24 12:24:14 -04:00
2021-09-22 12:27:55 +02:00
2020-09-25 16:55:44 -04:00
2019-10-03 09:11:05 -05:00
2020-08-24 13:06:05 -04:00
2019-08-12 12:47:48 -05:00
2020-01-22 16:55:27 -05:00
2019-06-20 21:35:29 -05:00
2020-07-15 12:47:25 -04:00
2020-07-01 01:59:07 -04:00
2020-08-14 16:22:40 -04:00
2019-06-10 23:00:01 +02:00
2020-08-24 13:06:06 -04:00
2020-09-08 16:40:13 +10:00
2020-08-24 13:06:06 -04:00
2018-03-14 15:39:51 -05:00
2020-08-24 13:06:06 -04:00
2020-09-22 17:37:37 -04:00
2020-10-30 01:16:54 -04:00
2020-10-30 01:17:43 -04:00
2020-01-14 10:18:08 -05:00
2020-07-02 12:02:50 -04:00
2019-06-20 21:16:37 -05:00
2021-03-07 12:34:11 +01:00
2020-08-24 13:06:06 -04:00
2020-08-24 13:06:06 -04:00
2020-08-24 13:06:06 -04:00
2020-08-24 13:06:06 -04:00
2020-10-09 15:15:48 -04:00
2020-01-14 10:18:58 -05:00
2018-04-11 13:07:54 -05:00
2020-09-15 17:52:42 -04:00
2019-06-20 11:35:45 -05:00
2018-02-19 14:19:49 -05:00
2020-05-18 11:24:21 -04:00
2020-07-02 12:02:50 -04:00
2020-12-30 11:53:09 +01:00
2022-04-20 09:23:28 +02:00
2020-09-30 13:50:06 -04:00
2020-09-22 17:37:38 -04:00
2020-09-22 17:37:38 -04:00
2021-07-28 14:35:47 +02:00
2019-06-21 18:59:23 -05:00
2020-09-30 13:50:13 -04:00
2020-09-30 13:50:13 -04:00
2020-09-30 13:50:13 -04:00
2020-09-30 13:50:13 -04:00
2020-09-30 13:50:13 -04:00
2020-09-30 13:50:13 -04:00
2020-09-30 13:50:13 -04:00
2020-09-30 13:50:13 -04:00
2021-11-18 14:04:12 +01:00
2020-08-24 12:22:56 -04:00
2022-01-27 10:54:19 +01:00
2021-10-17 10:43:33 +02:00
2020-08-26 16:40:18 -04:00
2021-10-17 10:43:33 +02:00
2019-06-20 21:35:29 -05:00
2021-03-07 12:34:11 +01:00
2020-10-14 15:27:50 -04:00
2019-11-19 10:12:49 -05:00
2021-06-03 09:00:31 +02:00
2019-11-19 10:12:50 -05:00
2021-06-10 13:39:23 +02:00
2019-11-19 10:12:50 -05:00
2021-06-10 13:39:23 +02:00
2020-07-01 01:59:09 -04:00
2019-12-11 15:22:08 -05:00
2020-08-14 16:22:41 -04:00
2020-07-01 01:59:11 -04:00
2020-09-22 17:37:37 -04:00
2019-07-08 13:56:02 -05:00
2020-09-25 16:55:16 -04:00
2020-08-14 16:22:40 -04:00
2020-09-25 16:55:16 -04:00
2020-08-14 16:22:40 -04:00
2020-09-25 16:55:16 -04:00
2020-08-14 16:22:40 -04:00
2019-12-18 16:33:26 -05:00
2020-03-06 14:34:42 -05:00
2020-07-15 12:45:05 -04:00
2020-09-15 17:24:18 -04:00
2020-04-24 11:42:11 -04:00
2020-09-15 17:24:18 -04:00
2020-04-24 11:42:11 -04:00
2019-04-19 11:33:27 -05:00
2020-04-01 14:44:43 -04:00
2020-09-03 14:47:48 -04:00
2019-06-20 21:35:30 -05:00
2019-10-03 09:11:05 -05:00
2020-04-28 15:58:12 -04:00
2019-10-03 09:11:05 -05:00
2019-10-03 09:11:05 -05:00
2020-07-01 01:59:07 -04:00
2019-09-13 17:11:03 -05:00
2020-04-01 14:44:42 -04:00
2019-09-13 17:11:03 -05:00
2020-04-01 14:44:42 -04:00
2019-09-13 17:11:03 -05:00
2020-08-14 16:12:22 -04:00
2019-09-13 17:11:03 -05:00
2021-03-09 11:11:12 +01:00
2020-07-02 12:02:50 -04:00
2020-05-14 16:42:43 -04:00
2022-04-20 09:23:18 +02:00
2021-01-27 11:55:02 +01:00
2021-06-18 10:00:06 +02:00
2018-02-19 14:18:31 -05:00
2020-05-22 13:41:53 -04:00
2018-02-19 14:18:31 -05:00
2021-06-18 10:00:06 +02:00
2018-08-27 11:10:34 -05:00
2021-08-04 12:46:41 +02:00
2019-08-12 12:47:50 -05:00
2020-06-03 13:52:04 -04:00
2020-04-28 16:20:29 -04:00
2020-04-28 16:20:29 -04:00
2021-07-19 09:44:57 +02:00
2021-05-26 12:06:53 +02:00
2020-06-03 13:52:04 -04:00
2021-06-03 09:00:45 +02:00
2020-06-03 13:52:04 -04:00
2020-04-28 16:20:29 -04:00
2020-07-02 12:02:50 -04:00
2020-07-01 01:59:24 -04:00
2020-09-15 17:52:43 -04:00
2018-02-19 14:18:08 -05:00
2020-07-02 12:02:50 -04:00
2020-06-03 13:52:00 -04:00
2020-08-14 16:22:41 -04:00
2020-07-21 15:37:49 -04:00
2020-07-01 01:59:24 -04:00
2022-03-02 11:42:46 +01:00
2020-07-02 12:02:50 -04:00
2020-05-14 16:42:43 -04:00
2020-08-14 16:22:39 -04:00
2020-04-30 16:48:27 -04:00
2018-11-06 14:02:41 -05:00
2021-03-07 12:34:11 +01:00
2019-10-03 09:11:01 -05:00
2019-10-03 09:11:01 -05:00
2020-07-23 10:45:00 -04:00
2019-12-11 15:22:07 -05:00
2021-07-19 09:44:51 +02:00
2020-07-27 16:23:00 -04:00
2020-11-24 12:30:37 -05:00
2020-07-01 01:59:24 -04:00
2020-09-22 17:37:38 -04:00
2020-09-22 17:37:38 -04:00
2021-06-10 13:39:27 +02:00
2020-09-22 17:37:38 -04:00
2020-04-09 10:43:14 -04:00
2020-04-09 10:43:14 -04:00
2020-07-08 09:03:25 -04:00
2022-01-05 12:40:32 +01:00
2020-10-14 15:27:50 -04:00
2021-11-18 14:03:54 +01:00
2020-01-27 16:46:44 -05:00
2021-11-18 14:03:54 +01:00
2019-07-18 14:18:05 -05:00
2022-04-20 09:23:20 +02:00
2020-07-01 01:59:09 -04:00
2020-01-22 16:55:27 -05:00
2019-10-03 09:11:05 -05:00
2019-10-03 09:11:05 -05:00
2020-08-26 16:40:18 -04:00
2020-07-02 12:02:50 -04:00
2020-07-02 12:02:50 -04:00