similar to: [PATCH] drm/nouveau/nvif: Avoid build error due to potential integer overflows

Displaying 20 results from an estimated 1000 matches similar to: "[PATCH] drm/nouveau/nvif: Avoid build error due to potential integer overflows"

2024 May 18
1
[PATCH] drm/nouveau/nvif: Avoid build error due to potential integer overflows
(adding linux-hardening at vger.kernel.org) Le 18/05/2024 ? 16:37, Guenter Roeck a ?crit?: > Trying to build parisc:allmodconfig with gcc 12.x or later results > in the following build error. > > drivers/gpu/drm/nouveau/nvif/object.c: In function 'nvif_object_mthd': > drivers/gpu/drm/nouveau/nvif/object.c:161:9: error: > 'memcpy' accessing 4294967264 or more
2024 May 18
1
[PATCH] drm/nouveau/nvif: Avoid build error due to potential integer overflows
On Sat, May 18, 2024 at 06:54:36PM +0200, Christophe JAILLET wrote: > (adding linux-hardening at vger.kernel.org) > > > Le 18/05/2024 ? 16:37, Guenter Roeck a ?crit?: > > Trying to build parisc:allmodconfig with gcc 12.x or later results > > in the following build error. > > > > drivers/gpu/drm/nouveau/nvif/object.c: In function 'nvif_object_mthd':
2024 May 18
1
[PATCH v2] drm/nouveau/nvif: Avoid build error due to potential integer overflows
Trying to build parisc:allmodconfig with gcc 12.x or later results in the following build error. drivers/gpu/drm/nouveau/nvif/object.c: In function 'nvif_object_mthd': drivers/gpu/drm/nouveau/nvif/object.c:161:9: error: 'memcpy' accessing 4294967264 or more bytes at offsets 0 and 32 overlaps 6442450881 bytes at offset -2147483617 [-Werror=restrict] 161 | memcpy(data,
2024 May 24
1
[PATCH v3] drm/nouveau/nvif: Avoid build error due to potential integer overflows
Trying to build parisc:allmodconfig with gcc 12.x or later results in the following build error. drivers/gpu/drm/nouveau/nvif/object.c: In function 'nvif_object_mthd': drivers/gpu/drm/nouveau/nvif/object.c:161:9: error: 'memcpy' accessing 4294967264 or more bytes at offsets 0 and 32 overlaps 6442450881 bytes at offset -2147483617 [-Werror=restrict] 161 | memcpy(data,
2024 May 18
1
[PATCH] drm/nouveau/nvif: Avoid build error due to potential integer overflows
On 5/18/24 10:32, Kees Cook wrote: > On Sat, May 18, 2024 at 06:54:36PM +0200, Christophe JAILLET wrote: >> (adding linux-hardening at vger.kernel.org) >> >> >> Le 18/05/2024 ? 16:37, Guenter Roeck a ?crit?: >>> Trying to build parisc:allmodconfig with gcc 12.x or later results >>> in the following build error. >>> >>>
2018 Jun 15
2
[PATCH] drm/nouveau/nvif: remove const attribute from nvif_mclass
Similar to commit 0bf8bf50eddc ("module: Remove const attribute from alias for MODULE_DEVICE_TABLE") Fixes many -Wduplicate-decl-specifier warnings due to the combination of const typeof() of already const variables. Signed-off-by: Nick Desaulniers <ndesaulniers at google.com> --- drivers/gpu/drm/nouveau/include/nvif/object.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
2023 May 26
2
[PATCH v2] drm/nouveau: bring back blit subchannel for pre nv50 GPUs
1ba6113a90a0 removed a lot of the kernel GPU channel, but method 0x128 was important as otherwise the GPU spams us with `CACHE_ERROR` messages. We use the blit subchannel inside our vblank handling, so we should keep at least this part. v2: Only do it for NV11+ GPUs Closes: https://gitlab.freedesktop.org/drm/nouveau/-/issues/201 Fixes: 4a16dd9d18a0 ("drm/nouveau/kms: switch to drm fbdev
2015 Jun 08
2
[PATCH RFC 05/20] pm: reorganize the nvif interface
On 8 June 2015 at 06:40, Samuel Pitoiset <samuel.pitoiset at gmail.com> wrote: > This commit introduces the NVIF_IOCTL_NEW_V0_PERFMON class which will be > used in order to query domains, signals and sources. This separates the > querying and the counting interface. Hey Samuel, I've merged patches 1-4 already, I've got some comments on this one, but after they're solved
2023 May 26
1
[PATCH v2] drm/nouveau: bring back blit subchannel for pre nv50 GPUs
On Fri, May 26, 2023 at 5:11?AM Karol Herbst <kherbst at redhat.com> wrote: > > 1ba6113a90a0 removed a lot of the kernel GPU channel, but method 0x128 > was important as otherwise the GPU spams us with `CACHE_ERROR` messages. > > We use the blit subchannel inside our vblank handling, so we should keep > at least this part. > > v2: Only do it for NV11+ GPUs > >
2023 May 15
0
[PATCH] drm/nouveau: bring back blit subchannel for pre nv50 GPUs
1ba6113a90a0 removed a lot of the kernel GPU channel, but method 0x128 was important as otherwise the GPU spams us with `CACHE_ERROR` messages. We use the blit subchannel inside our vblank handling, so we should keep at least this part. Closes: https://gitlab.freedesktop.org/drm/nouveau/-/issues/201 Fixes: 4a16dd9d18a0 ("drm/nouveau/kms: switch to drm fbdev helpers") Signed-off-by:
2018 Mar 10
17
[RFC PATCH 00/13] SVM (share virtual memory) with HMM in nouveau
From: Jérôme Glisse <jglisse at redhat.com> (mm is cced just to allow exposure of device driver work without ccing a long list of peoples. I do not think there is anything usefull to discuss from mm point of view but i might be wrong, so just for the curious :)). git://people.freedesktop.org/~glisse/linux branch: nouveau-hmm-v00
2018 Jun 15
0
[PATCH] drm/nouveau/nvif: remove const attribute from nvif_mclass
On Fri, Jun 15, 2018 at 3:56 PM Nick Desaulniers <ndesaulniers at google.com> wrote: > > Similar to commit 0bf8bf50eddc ("module: Remove > const attribute from alias for MODULE_DEVICE_TABLE") > > Fixes many -Wduplicate-decl-specifier warnings due to the combination of > const typeof() of already const variables. > > Signed-off-by: Nick Desaulniers
2019 Aug 07
0
[PATCH] drm/nouveau/nvif/mmu: Use struct_size() helper
One of the more common cases of allocation size calculations is finding the size of a structure that has a zero-sized array at the end, along with memory for some number of elements for that array. For example: struct nvif_mmu_kind_v0 { ... __u8 data[]; }; Make use of the struct_size() helper instead of an open-coded version in order to avoid any potential type mistakes. So, replace
2018 Jun 15
1
[PATCH v2] drm/nouveau/nvif: remove const attribute from nvif_mclass
Similar to commit 0bf8bf50eddc ("module: Remove const attribute from alias for MODULE_DEVICE_TABLE") Fixes many -Wduplicate-decl-specifier warnings due to the combination of const typeof() of already const variables. Signed-off-by: Nick Desaulniers <ndesaulniers at google.com> --- Changes since v1: added additional space after statements.
2019 May 24
1
[PATCH] drm/nouveau/mmu: use struct_size() helper
Make use of the struct_size() helper instead of an open-coded version in order to avoid any potential type mistakes, in particular in the context in which this code is being used. So, replace the following form: sizeof(*kind) + sizeof(*kind->data) * mmu->kind_nr; with: struct_size(kind, data, mmu->kind_nr) This code was detected with the help of Coccinelle. Signed-off-by: Gustavo A.
2023 Apr 07
3
[PATCH 2/2] drm/nouveau/kms: Add INHERIT ioctl to nvkm/nvif for reading IOR state
Now that we're supporting things like Ada and the GSP, there's situations where we really need to actually know the display state that we're starting with when loading the driver in order to prevent breaking GSP expectations. The first step in doing this is making it so that we can read the current state of IORs from nvkm in DRM, so that we can fill in said into into the atomic state.
2024 May 19
1
[PATCH] drm/nouveau/nvif: Avoid build error due to potential integer overflows
On Sat, 2024-05-18 at 11:23 -0700, Guenter Roeck wrote: > On 5/18/24 10:32, Kees Cook wrote: > [] > > I think the INT_MAX test is actually better in this case because > > nvif_object_ioctl()'s size argument is u32: > > > > ret = nvif_object_ioctl(object, args, sizeof(*args) + size, NULL); > > ^^^^^^^^^^^^^^^^^^^^ >
2015 Nov 27
14
[libdrm v2 01/14] nouveau: import and install a selection of nvif headers from the kernel
From: Ben Skeggs <bskeggs at redhat.com> This commit also modifies the install path of the main libdrm_nouveau header to be under a nouveau/ subdirectory. Signed-off-by: Ben Skeggs <bskeggs at redhat.com> --- include/drm/nouveau_drm.h | 1 + nouveau/Makefile.am | 11 +++- nouveau/libdrm_nouveau.pc.in | 2 +- nouveau/nvif/cl0080.h | 45 ++++++++++++++
2015 Dec 16
16
[libdrm v3 01/14] nouveau: import and install a selection of nvif headers from the kernel
From: Ben Skeggs <bskeggs at redhat.com> This commit also modifies the install path of the main libdrm_nouveau header to be under a nouveau/ subdirectory. Signed-off-by: Ben Skeggs <bskeggs at redhat.com> --- include/drm/nouveau_drm.h | 1 + nouveau/Makefile.am | 11 +++- nouveau/libdrm_nouveau.pc.in | 2 +- nouveau/nvif/cl0080.h | 45 ++++++++++++++
2015 Dec 28
1
Breakage with nvif?
Hi Ben, Karol and Tom are seeing this on init with a nvif-enabled kernel + libdrm. What are we doing wrong? I think that route == NVIF_IOCTL_V0_ROUTE_NVIF (== 0), while owner is apparently 1, whatever that is. [362619.242238] nouveau: glxgears[6096]:00000000:00000000: ioctl: size 32 [362619.242240] nouveau: glxgears[6096]:00000000:00000000: ioctl: vers 0 type 00 object 0000000000000000 owner 00