nouveau/gsp: replace zero-length array with flex-array member and use __counted_byFake flexible arrays (zero-length and one-element arrays) are deprecated,and should be replaced by flexible-array
nouveau/gsp: replace zero-length array with flex-array member and use __counted_byFake flexible arrays (zero-length and one-element arrays) are deprecated,and should be replaced by flexible-array members. So, replacezero-length array with a flexible-array member in `structPACKED_REGISTRY_TABLE`.Also annotate array `entries` with `__counted_by()` to prepare for thecoming implementation by GCC and Clang of the `__counted_by` attribute.Flexible array members annotated with `__counted_by` can have theiraccesses bounds-checked at run-time via `CONFIG_UBSAN_BOUNDS` (for arrayindexing) and `CONFIG_FORTIFY_SOURCE` (for strcpy/memcpy-family functions).This fixes multiple -Warray-bounds warnings:drivers/gpu/drm/nouveau/nvkm/subdev/gsp/r535.c:1069:29: warning: array subscript 0 is outside array bounds of 'PACKED_REGISTRY_ENTRY[0]' [-Warray-bounds=]drivers/gpu/drm/nouveau/nvkm/subdev/gsp/r535.c:1070:29: warning: array subscript 0 is outside array bounds of 'PACKED_REGISTRY_ENTRY[0]' [-Warray-bounds=]drivers/gpu/drm/nouveau/nvkm/subdev/gsp/r535.c:1071:29: warning: array subscript 0 is outside array bounds of 'PACKED_REGISTRY_ENTRY[0]' [-Warray-bounds=]drivers/gpu/drm/nouveau/nvkm/subdev/gsp/r535.c:1072:29: warning: array subscript 0 is outside array bounds of 'PACKED_REGISTRY_ENTRY[0]' [-Warray-bounds=]While there, also make use of the struct_size() helper, and addresscheckpatch.pl warning:WARNING: please, no spaces at the start of a lineThis results in no differences in binary output.Signed-off-by: Gustavo A. R. Silva <[email protected]>Reviewed-by: Kees Cook <[email protected]>Signed-off-by: Danilo Krummrich <[email protected]>Link: https://patchwork.freedesktop.org/patch/msgid/ZVZbX7C5suLMiBf+@work
show more ...
nouveau/gsp: move to 535.113.01This moves the initial effort to the latest 535 firmware.The gsp msg structs have changed, and the message passing also.The wpr also seems to have some struct chan
nouveau/gsp: move to 535.113.01This moves the initial effort to the latest 535 firmware.The gsp msg structs have changed, and the message passing also.The wpr also seems to have some struct changes.This version of the firmware will be what we are stuck on for a while,until we can refactor the driver and work out a better path forward.Reviewed-by: Danilo Krummrich <[email protected]>Signed-off-by: Dave Airlie <[email protected]>