OpenCloudOS-Kernel/drivers/gpu/drm/nouveau
Dave Airlie 692a51bebf nouveau/uvmm: fix addr/range calcs for remap operations
[ Upstream commit be141849ec00ef39935bf169c0f194ac70bf85ce ]

dEQP-VK.sparse_resources.image_rebind.2d_array.r64i.128_128_8
was causing a remap operation like the below.

op_remap: prev: 0000003fffed0000 00000000000f0000 00000000a5abd18a 0000000000000000
op_remap: next:
op_remap: unmap: 0000003fffed0000 0000000000100000 0
op_map: map: 0000003ffffc0000 0000000000010000 000000005b1ba33c 00000000000e0000

This was resulting in an unmap operation from 0x3fffed0000+0xf0000, 0x100000
which was corrupting the pagetables and oopsing the kernel.

Fixes the prev + unmap range calcs to use start/end and map back to addr/range.

Signed-off-by: Dave Airlie <airlied@redhat.com>
Fixes: b88baab828 ("drm/nouveau: implement new VM_BIND uAPI")
Cc: Danilo Krummrich <dakr@redhat.com>
Signed-off-by: Danilo Krummrich <dakr@redhat.com>
Link: https://patchwork.freedesktop.org/patch/msgid/20240328024317.2041851-1-airlied@gmail.com
Signed-off-by: Sasha Levin <sashal@kernel.org>
2024-04-10 16:35:58 +02:00
..
dispnv04 drm/nouveau: fence: fix undefined fence state after emit 2023-08-31 00:46:23 +02:00
dispnv50 drm/dp_mst: Fix fractional DSC bpp handling 2024-01-25 15:35:31 -08:00
include nouveau: lock the client object tree. 2024-04-03 15:28:40 +02:00
nvif drm/nouveau: nvkm/vmm: implement raw ops to manage uvmm 2023-08-04 20:34:39 +02:00
nvkm nouveau: lock the client object tree. 2024-04-03 15:28:40 +02:00
Kbuild drm/nouveau: implement new VM_BIND uAPI 2023-08-04 20:34:41 +02:00
Kconfig drm/nouveau: implement new VM_BIND uAPI 2023-08-04 20:34:41 +02:00
nouveau_abi16.c drm/nouveau: exec: report max pushs through getparam 2023-10-04 00:10:18 +02:00
nouveau_abi16.h drm/nouveau: implement new VM_BIND uAPI 2023-08-04 20:34:41 +02:00
nouveau_acpi.c drm/nouveau: don't detect DSM for non-NVIDIA device 2023-06-13 12:18:08 +02:00
nouveau_acpi.h drm/nouveau: Register ACPI video backlight when nv_backlight registration fails (v2) 2022-09-03 12:17:26 +02:00
nouveau_backlight.c drm/nouveau/kms: Fix backlight registration 2023-03-29 12:02:47 +02:00
nouveau_bios.c drm/nouveau/disp: add output class 2022-07-27 09:05:49 +10:00
nouveau_bios.h
nouveau_bo.c nouveau: reset the bo resource bus info after an eviction 2024-03-26 18:20:07 -04:00
nouveau_bo.h drm/nouveau: implement new VM_BIND uAPI 2023-08-04 20:34:41 +02:00
nouveau_bo0039.c drm/ttm: rework on ttm_resource to use size_t type 2022-10-27 11:42:58 +02:00
nouveau_bo74c1.c drm/ttm: rework on ttm_resource to use size_t type 2022-10-27 11:42:58 +02:00
nouveau_bo85b5.c drm/ttm: rework on ttm_resource to use size_t type 2022-10-27 11:42:58 +02:00
nouveau_bo90b5.c drm/ttm: rework on ttm_resource to use size_t type 2022-10-27 11:42:58 +02:00
nouveau_bo5039.c drm/ttm: rework on ttm_resource to use size_t type 2022-10-27 11:42:58 +02:00
nouveau_bo9039.c drm/ttm: rework on ttm_resource to use size_t type 2022-10-27 11:42:58 +02:00
nouveau_boa0b5.c drm/ttm: rework on ttm_resource to use size_t type 2022-10-27 11:42:58 +02:00
nouveau_chan.c drm/nouveau: exec: report max pushs through getparam 2023-10-04 00:10:18 +02:00
nouveau_chan.h drm/nouveau: chan: provide nouveau_channel_kill() 2023-08-04 20:34:38 +02:00
nouveau_connector.c Linux 6.5-rc7 2023-08-24 07:26:06 +10:00
nouveau_connector.h drm/nouveau/disp: expose conn event class 2022-11-09 10:44:27 +10:00
nouveau_crtc.h drm/nouveau/disp: expose head event class 2022-11-09 10:44:27 +10:00
nouveau_debugfs.c drm/nouveau: debugfs: implement DRM GPU VA debugfs 2023-08-04 20:34:45 +02:00
nouveau_debugfs.h
nouveau_display.c drm/nouveau/disp: use drm_kms_helper_connector_hotplug_event() 2023-07-10 09:45:56 +02:00
nouveau_display.h
nouveau_dma.c drm/nouveau: uapi: don't pass NO_PREFETCH flag implicitly 2023-08-24 02:57:50 +02:00
nouveau_dma.h drm/nouveau: exec: report max pushs through getparam 2023-10-04 00:10:18 +02:00
nouveau_dmem.c nouveau/dmem: handle kcalloc() allocation failure 2024-04-03 15:28:56 +02:00
nouveau_dmem.h
nouveau_dp.c drm/nouveau/disp: drop unused argument in nv50_dp_mode_valid 2023-07-06 17:22:33 +02:00
nouveau_drm.c drm/nouveau: don't fini scheduler before entity flush 2024-03-06 14:48:45 +00:00
nouveau_drv.h nouveau/u_memcpya: fix NULL vs error pointer bug 2023-09-20 00:20:08 +02:00
nouveau_encoder.h drm/nouveau/disp: drop unused argument in nv50_dp_mode_valid 2023-07-06 17:22:33 +02:00
nouveau_exec.c drm/nouveau: exec: report max pushs through getparam 2023-10-04 00:10:18 +02:00
nouveau_exec.h drm/nouveau: exec: report max pushs through getparam 2023-10-04 00:10:18 +02:00
nouveau_fence.c nouveau: offload fence uevents work to workqueue 2024-02-23 09:24:54 +01:00
nouveau_fence.h nouveau: offload fence uevents work to workqueue 2024-02-23 09:24:54 +01:00
nouveau_gem.c drm/nouveau: fix stale locked mutex in nouveau_gem_ioctl_pushbuf 2024-04-03 15:28:40 +02:00
nouveau_gem.h drm/nouveau: implement new VM_BIND uAPI 2023-08-04 20:34:41 +02:00
nouveau_hwmon.c drm/nouveau: constify pointers to hwmon_channel_info 2023-05-22 16:39:04 +02:00
nouveau_hwmon.h
nouveau_ioc32.c
nouveau_ioctl.h
nouveau_led.c
nouveau_led.h drm/nouveau/led: explicitly include linux/leds.h 2023-02-15 18:05:57 -05:00
nouveau_mem.c drm/ttm: merge ttm_bo_api.h and ttm_bo_driver.h v2 2022-12-06 12:54:14 +01:00
nouveau_mem.h drm/nouveau: implement new VM_BIND uAPI 2023-08-04 20:34:41 +02:00
nouveau_nvif.c drm/nouveau/nvkm: rip out old notify 2022-11-09 10:44:27 +10:00
nouveau_platform.c
nouveau_platform.h
nouveau_prime.c drm/nouveau: implement new VM_BIND uAPI 2023-08-04 20:34:41 +02:00
nouveau_reg.h
nouveau_sched.c drm/nouveau: sched: fix leaking memory of timedout job 2023-09-20 00:15:50 +02:00
nouveau_sched.h drm/nouveau: implement new VM_BIND uAPI 2023-08-04 20:34:41 +02:00
nouveau_sgdma.c drm/ttm: merge ttm_bo_api.h and ttm_bo_driver.h v2 2022-12-06 12:54:14 +01:00
nouveau_svm.c nouveau/svm: fix kvcalloc() argument order 2024-02-23 09:24:53 +01:00
nouveau_svm.h
nouveau_ttm.c drm/nouveau: stop using is_swiotlb_active 2023-06-07 15:11:26 +02:00
nouveau_ttm.h
nouveau_usif.c drm/nouveau/nvkm: rip out old notify 2022-11-09 10:44:27 +10:00
nouveau_usif.h
nouveau_uvmm.c nouveau/uvmm: fix addr/range calcs for remap operations 2024-04-10 16:35:58 +02:00
nouveau_uvmm.h drm/nouveau: uvmm: remove dedicated VM pointer from VMAs 2023-08-08 04:47:19 +02:00
nouveau_vga.c drm/nouveau: Remove unnecessary include statements for drm_crtc_helper.h 2023-01-18 09:25:31 +01:00
nouveau_vga.h
nouveau_vmm.c nouveau/vmm: don't set addr on the fail path to avoid warning 2024-01-31 16:18:56 -08:00
nouveau_vmm.h
nv04_fence.c drm/nouveau/fence:: fix warning directly dereferencing a rcu pointer 2024-01-25 15:35:31 -08:00
nv10_fence.c
nv10_fence.h
nv17_fence.c
nv50_display.h drm/nouveau: dispnv50: fix missing-prototypes warning 2023-05-22 16:39:04 +02:00
nv50_fence.c
nv84_fence.c drm/nouveau/fifo/ga100-: initial support 2022-11-09 10:44:50 +10:00
nvc0_fence.c