linux_dsm_epyc7002/drivers/gpu/drm/nouveau/nvif
Arnd Bergmann 9dfbd73199 drm/nouveau: nouveau: use larger buffer in nvif_vmm_map
gcc points out a buffer that is clearly too small to be used
in a meaningful way, as the 'sizeof(*args) + argc > sizeof(stack)'
will always fail:

In function 'memcpy',
    inlined from 'nvif_vmm_map' at drivers/gpu/drm/nouveau/nvif/vmm.c:55:2:
include/linux/string.h:353:9: error: '__builtin_memcpy' offset 40 is out of the bounds [0, 16] of object 'stack' with type 'u8[16]' {aka 'unsigned char[16]'} [-Werror=array-bounds]
  return __builtin_memcpy(p, q, size);
         ^~~~~~~~~~~~~~~~~~~~~~~~~~~~
drivers/gpu/drm/nouveau/nvif/vmm.c: In function 'nvif_vmm_map':
drivers/gpu/drm/nouveau/nvif/vmm.c:40:5: note: 'stack' declared here

This makes the buffer large enough so it should serve the purpose
that the author presumably had in mind. Alternatively we could
just get rid of it completely and simplify the code at the cost
of always doing the kmalloc (as we do in the current version).

Fixes: 920d2b5ef2 ("drm/nouveau/mmu: define user interfaces to mmu vmm opertaions")
Signed-off-by: Arnd Bergmann <arnd@arndb.de>
Signed-off-by: Ben Skeggs <bskeggs@redhat.com>
2018-05-18 15:01:19 +10:00
..
client.c drm/nouveau/core/client: allow creation of subclients 2017-02-17 15:15:00 +10:00
device.c drm/nouveau/nvif: device time mthd 2015-08-28 12:40:33 +10:00
driver.c drm/nouveau/core/client: allow creation of subclients 2017-02-17 15:15:00 +10:00
Kbuild drm/nouveau/mmu: define user interfaces to mmu vmm opertaions 2017-11-02 13:32:31 +10:00
mem.c drm/nouveau/mmu: define user interfaces to mmu memory allocation 2017-11-02 13:32:31 +10:00
mmu.c drm/nouveau/mmu: define user interfaces to mmu 2017-11-02 13:32:31 +10:00
notify.c drm/nouveau: fix notify data leak 2016-11-07 14:04:37 +10:00
object.c drm/nouveau/core/object: allow arguments to be passed to map function 2017-11-02 13:32:16 +10:00
vmm.c drm/nouveau: nouveau: use larger buffer in nvif_vmm_map 2018-05-18 15:01:19 +10:00