mirror_ubuntu-kernels/drivers/gpu/drm/nouveau/include/nvif
Kees Cook 25feda6fbd drm/nouveau/disp: More DP_RECEIVER_CAP_SIZE array fixes
More arrays (and arguments) for dcpd were set to 16, when it looks like
DP_RECEIVER_CAP_SIZE (15) should be used. Fix the remaining cases, seen
with GCC 13:

../drivers/gpu/drm/nouveau/nvif/outp.c: In function 'nvif_outp_acquire_dp':
../include/linux/fortify-string.h:57:33: warning: array subscript 'unsigned char[16][0]' is partly outside array bounds of 'u8[15]' {aka 'unsigned char[15]'} [-Warray-bounds=]
   57 | #define __underlying_memcpy     __builtin_memcpy
      |                                 ^
...
../drivers/gpu/drm/nouveau/nvif/outp.c:140:9: note: in expansion of macro 'memcpy'
  140 |         memcpy(args.dp.dpcd, dpcd, sizeof(args.dp.dpcd));
      |         ^~~~~~
../drivers/gpu/drm/nouveau/nvif/outp.c:130:49: note: object 'dpcd' of size [0, 15]
  130 | nvif_outp_acquire_dp(struct nvif_outp *outp, u8 dpcd[DP_RECEIVER_CAP_SIZE],
      |                                              ~~~^~~~~~~~~~~~~~~~~~~~~~~~~~

Fixes: 8134437213 ("drm/nouveau/disp: move DP link config into acquire")
Cc: Ben Skeggs <bskeggs@redhat.com>
Cc: Lyude Paul <lyude@redhat.com>
Cc: Karol Herbst <kherbst@redhat.com>
Cc: David Airlie <airlied@gmail.com>
Cc: Daniel Vetter <daniel@ffwll.ch>
Cc: Dave Airlie <airlied@redhat.com>
Cc: "Gustavo A. R. Silva" <gustavo@embeddedor.com>
Cc: dri-devel@lists.freedesktop.org
Cc: nouveau@lists.freedesktop.org
Signed-off-by: Kees Cook <keescook@chromium.org>
Reviewed-by: Gustavo A. R. Silva <gustavoars@kernel.org>
Reviewed-by: Karol Herbst <kherbst@redhat.com>
Signed-off-by: Karol Herbst <git@karolherbst.de>
Link: https://patchwork.freedesktop.org/patch/msgid/20230204184307.never.825-kees@kernel.org
2023-04-28 20:01:53 +02:00
..
cl0002.h
cl0046.h drm/nouveau/disp: expose head event class 2022-11-09 10:44:27 +10:00
cl0080.h drm/nouveau/fifo: expose per-runlist CHID information 2022-11-09 10:44:47 +10:00
cl9097.h
class.h drm/nouveau/gr/ga102: initial support 2022-11-09 10:45:21 +10:00
clb069.h drm/nouveau/fault: expose replayable fault buffer event class 2022-11-09 10:44:27 +10:00
client.h drm/nouveau: rip out nvkm_client.super 2021-08-18 19:00:15 +10:00
conn.h drm/nouveau/disp: expose conn event class 2022-11-09 10:44:27 +10:00
device.h
disp.h drm/nouveau/disp: add head class 2022-11-09 10:43:10 +10:00
driver.h drm/nouveau: rip out nvkm_client.super 2021-08-18 19:00:15 +10:00
event.h drm/nouveau/nvkm: rip out old notify 2022-11-09 10:44:27 +10:00
fifo.h drm/nouveau/fifo/gk104-: remove use of subdev index in runlist topology info 2021-02-11 11:49:58 +10:00
head.h drm/nouveau/disp: expose head event class 2022-11-09 10:44:27 +10:00
if000a.h
if000b.h
if000c.h nouveau/svm: implement atomic SVM access 2021-07-01 11:06:04 -07:00
if000d.h
if000e.h drm/nouveau/nvkm: add a replacement for nvkm_notify 2022-11-09 10:44:26 +10:00
if500b.h
if500d.h
if900b.h
if900d.h
if0000.h
if0001.h
if0002.h
if0003.h
if0004.h drm/nouveau/disp: expose page flip event class 2022-11-09 10:44:27 +10:00
if0005.h
if0008.h
if0010.h drm/nouveau/disp: add head class 2022-11-09 10:43:10 +10:00
if0011.h drm/nouveau/disp: expose conn event class 2022-11-09 10:44:27 +10:00
if0012.h drm/nouveau/disp: More DP_RECEIVER_CAP_SIZE array fixes 2023-04-28 20:01:53 +02:00
if0013.h drm/nouveau/disp: expose head event class 2022-11-09 10:44:27 +10:00
if0014.h drm/nouveau/disp: add common channel class handling 2022-07-27 09:05:48 +10:00
if0020.h drm/nouveau/fifo: add new channel classes 2022-11-09 10:44:50 +10:00
if0021.h drm/nouveau/fifo: add new channel classes 2022-11-09 10:44:50 +10:00
ifb00d.h
ifc00d.h
ioctl.h drm/nouveau/nvkm: rip out old notify 2022-11-09 10:44:27 +10:00
mem.h
mmu.h
object.h drm/nouveau/nvif: add wrapper for open-coded nvif_object_constructed() 2022-07-13 13:55:12 +10:00
os.h
outp.h drm/nouveau/disp: Fix nvif_outp_acquire_dp() argument size 2023-01-27 11:42:41 -08:00
parent.h
printf.h drm/nouveau/disp: add common class handling between <nv50 and >=nv50 2022-07-27 09:05:46 +10:00
push006c.h
push206e.h
push507c.h
push906f.h
push.h drm/nouveau/nvif: fix method count when pushing an array 2021-01-19 16:08:41 +10:00
pushc37b.h
timer.h
unpack.h
user.h
vmm.h