similar to: [PATCH 48/82] drm/nouveau/mmu: Refactor intentional wrap-around test

Displaying 20 results from an estimated 2000 matches similar to: "[PATCH 48/82] drm/nouveau/mmu: Refactor intentional wrap-around test"

2024 Jan 23
0
[PATCH 16/82] drm/nouveau/mmu: Refactor intentional wrap-around calculation
In an effort to separate intentional arithmetic wrap-around from unexpected wrap-around, we need to refactor places that depend on this kind of math. One of the most common code patterns of this is: VAR + value < VAR Notably, this is considered "undefined behavior" for signed and pointer types, which the kernel works around by using the -fno-strict-overflow option in the build[1]
2017 Nov 28
0
[PATCH] drm/nouveau/mmu: fix odd_ptr_err.cocci warnings (fwd)
Hi julia, I think it would be better to extract the assignment out of the if clause. Then you'll get something like this: memory = ...; if (IS_ERR(memory)) { .... } so, to answer your question: no, it isn't necessary. On Tue, Nov 28, 2017 at 1:56 PM, Julia Lawall <julia.lawall at lip6.fr> wrote: > This is a false positive, but I wonder if it is really necessary to put > the
2017 Nov 28
2
[PATCH] drm/nouveau/mmu: fix odd_ptr_err.cocci warnings (fwd)
This is a false positive, but I wonder if it is really necessary to put the assignment in the conditional test expression. julia ---------- Forwarded message ---------- Date: Tue, 28 Nov 2017 13:23:36 +0800 From: kbuild test robot <fengguang.wu at intel.com> To: kbuild at 01.org Cc: Julia Lawall <julia.lawall at lip6.fr> Subject: [PATCH] drm/nouveau/mmu: fix odd_ptr_err.cocci
2017 Nov 30
1
[PATCH] drm/nouveau/mmu: fix odd_ptr_err.cocci warnings
The kbuild test bot complained about a new coccinelle warning nearby, which sparked a discussion about the assignment to 'memory' inside of the conditional expression. See Link below for the original post. Fix the assignment to silence the coccinelle warning and also make the code look a little nicer. Link: https://lists.freedesktop.org/archives/nouveau/2017-November/029242.html
2019 Dec 17
1
[PATCH] drm/nouveau: Add correct turing page kinds
Turing introduced a new simplified page kind scheme, reducing the number of possible page kinds from 256 to 16. It also is the first NVIDIA GPU in which the highest possible page kind value is not reserved as an "invalid" page kind. To address this, the invalid page kind is made an explicit property of the MMU HAL, and a new table of page kinds is added to the tu102 MMU HAL. One
2020 Jan 13
0
[PATCH v6 5/6] nouveau: use new mmu interval notifiers
Update nouveau to only use the mmu interval notifiers. Signed-off-by: Ralph Campbell <rcampbell at nvidia.com> --- drivers/gpu/drm/nouveau/nouveau_svm.c | 313 +++++++++++++++++--------- 1 file changed, 201 insertions(+), 112 deletions(-) diff --git a/drivers/gpu/drm/nouveau/nouveau_svm.c b/drivers/gpu/drm/nouveau/nouveau_svm.c index df9bf1fd1bc0..0343e48d41d7 100644 ---
2023 Mar 07
1
[PATCH] drm/nouveau/mmu: fix use-after-free bug in nvkm_vmm_pfn_map
Actually - could you resend this with dri-devel at lists.freedesktop.org added to the cc list just to make patchwork happy? On Sat, 2022-10-29 at 15:46 +0800, Zheng Wang wrote: > If it failed in kzalloc, vma will be freed in nvkm_vmm_node_merge. > The later use of vma will casue use after free. > > Reported-by: Zheng Wang <hackerzheng666 at gmail.com> > Reported-by: Zhuorao
2023 Mar 07
0
[PATCH] drm/nouveau/mmu: fix use-after-free bug in nvkm_vmm_pfn_map
Reviewed-by: Lyude Paul <lyude at redhat.com> Will push upstream in a moment On Sat, 2022-10-29 at 15:46 +0800, Zheng Wang wrote: > If it failed in kzalloc, vma will be freed in nvkm_vmm_node_merge. > The later use of vma will casue use after free. > > Reported-by: Zheng Wang <hackerzheng666 at gmail.com> > Reported-by: Zhuorao Yang <alex000young at gmail.com>
2022 Oct 29
3
[PATCH] drm/nouveau/mmu: fix use-after-free bug in nvkm_vmm_pfn_map
If it failed in kzalloc, vma will be freed in nvkm_vmm_node_merge. The later use of vma will casue use after free. Reported-by: Zheng Wang <hackerzheng666 at gmail.com> Reported-by: Zhuorao Yang <alex000young at gmail.com> Fix it by returning to upper caller as soon as error occurs. Signed-off-by: Zheng Wang <zyytlz.wz at 163.com> ---
2020 Jul 01
0
[PATCH v3 3/5] nouveau: fix mapping 2MB sysmem pages
The nvif_object_ioctl() method NVIF_VMM_V0_PFNMAP wasn't correctly setting the hardware specific GPU page table entries for 2MB sized pages. Fix this by adding functions to set and clear PD0 GPU page table entries. Signed-off-by: Ralph Campbell <rcampbell at nvidia.com> --- drivers/gpu/drm/nouveau/nvkm/subdev/mmu/vmm.c | 5 +- .../drm/nouveau/nvkm/subdev/mmu/vmmgp100.c | 82
2020 Jun 19
0
[PATCH 10/16] nouveau/hmm: support mapping large sysmem pages
Nouveau currently only supports mapping PAGE_SIZE sized pages of system memory when shared virtual memory (SVM) is enabled. Use the new HMM_PFN_COMPOUND flag that hmm_range_fault() returns to support mapping system memory pages larger than PAGE_SIZE. Signed-off-by: Ralph Campbell <rcampbell at nvidia.com> --- drivers/gpu/drm/nouveau/nouveau_svm.c | 47 ++++++++++++++-----
2019 Oct 15
0
[PATCH hmm 11/15] nouveau: use mmu_range_notifier instead of hmm_mirror
From: Jason Gunthorpe <jgg at mellanox.com> Remove the hmm_mirror object and use the mmu_range_notifier API instead for the range, and use the normal mmu_notifier API for the general invalidation callback. While here re-organize the pagefault path so the locking pattern is clear. nouveau is the only driver that uses a temporary range object and instead forwards nearly every invalidation
2019 Dec 18
0
[PATCH v2] drm/nouveau/mmu: Remove unneeded semicolon
Reviewed-by: Pierre Moreau <dev at pmoreau.org> On 2019-12-18 ? 09:28, zhengbin wrote: > Fixes coccicheck warning: > > drivers/gpu/drm/nouveau/nvkm/subdev/mmu/vmm.c:583:2-3: Unneeded semicolon > drivers/gpu/drm/nouveau/nvkm/subdev/mmu/vmm.h:307:2-3: Unneeded semicolon > > Reported-by: Hulk Robot <hulkci at huawei.com> > Signed-off-by: zhengbin <zhengbin13 at
2020 May 04
0
[PATCH] drm/nouveau/mmu: remove unneeded semicolon
Fix the following coccicheck warning: drivers/gpu/drm/nouveau/nvkm/subdev/mmu/vmm.h:307:2-3: Unneeded semicolon drivers/gpu/drm/nouveau/nvkm/subdev/mmu/vmm.c:583:2-3: Unneeded semicolon Signed-off-by: Jason Yan <yanaijie at huawei.com> --- drivers/gpu/drm/nouveau/nvkm/subdev/mmu/vmm.c | 2 +- drivers/gpu/drm/nouveau/nvkm/subdev/mmu/vmm.h | 2 +- 2 files changed, 2 insertions(+), 2
2020 Aug 06
4
[RFC] Zeroing Caller Saved Regs
[This feature addresses https://bugs.llvm.org/show_bug.cgi?id=37880 and https://github.com/KSPP/linux/issues/84.] Clang has been ramping up its support of the Linux kernel. We recently added "asm goto with outputs", a long requested feature. We want to continue building our relationship with the Linux community. KSPP is a project to improve security in the Linux kernel, through both
2020 Apr 24
1
[PATCH] drm/nouveau/mmu: Remove unneeded semicolon
Fixes coccicheck warning: drivers/gpu/drm/nouveau/nvkm/subdev/mmu/vmm.h:307:2-3: Unneeded semicolon drivers/gpu/drm/nouveau/nvkm/subdev/mmu/vmm.c:583:2-3: Unneeded semicolon Reported-by: Hulk Robot <hulkci at huawei.com> Signed-off-by: Zheng Bin <zhengbin13 at huawei.com> --- drivers/gpu/drm/nouveau/nvkm/subdev/mmu/vmm.c | 2 +- drivers/gpu/drm/nouveau/nvkm/subdev/mmu/vmm.h | 2 +-
2018 Mar 03
0
[PATCH] mmu: ALIGN_DOWN correct variable
Commit 7110c89bb8852ff8b0f88ce05b332b3fe22bd11e ("mmu: swap out round for ALIGN") replaced two calls to round/rounddown with ALIGN/ALIGN_DOWN, but erroneously applied ALIGN_DOWN to a different variable (addr) and left intended variable (tail) not rounded/ALIGNed. As a result screen corruption, X lockups are observable. An example of kernel log of affected system with NV98 card where it
2019 Dec 18
1
[PATCH v2] drm/nouveau/mmu: Remove unneeded semicolon
Fixes coccicheck warning: drivers/gpu/drm/nouveau/nvkm/subdev/mmu/vmm.c:583:2-3: Unneeded semicolon drivers/gpu/drm/nouveau/nvkm/subdev/mmu/vmm.h:307:2-3: Unneeded semicolon Reported-by: Hulk Robot <hulkci at huawei.com> Signed-off-by: zhengbin <zhengbin13 at huawei.com> --- v1->v2: add missing one space after the closing curly bracket
2019 Dec 16
1
[PATCH] drm/nouveau/mmu: Remove unneeded semicolon
Fixes coccicheck warning: drivers/gpu/drm/nouveau/nvkm/subdev/mmu/vmm.c:583:2-3: Unneeded semicolon drivers/gpu/drm/nouveau/nvkm/subdev/mmu/vmm.h:307:2-3: Unneeded semicolon Reported-by: Hulk Robot <hulkci at huawei.com> Signed-off-by: zhengbin <zhengbin13 at huawei.com> --- drivers/gpu/drm/nouveau/nvkm/subdev/mmu/vmm.c | 2 +- drivers/gpu/drm/nouveau/nvkm/subdev/mmu/vmm.h | 2 +- 2
2018 Feb 13
0
[drm-nouveau-mmu] question about potential NULL pointer dereference
On Wed, Feb 14, 2018 at 1:40 AM, Gustavo A. R. Silva <garsilva at embeddedor.com> wrote: > > Hi all, > > While doing some static analysis I ran into the following piece of code at > drivers/gpu/drm/nouveau/nvkm/subdev/mmu/vmm.c:957: > > 957#define node(root, dir) ((root)->head.dir == &vmm->list) ? NULL : > \ > 958 list_entry((root)->head.dir,