linux_dsm_epyc7002/drivers/gpu/drm/vc4
Gustavo A. R. Silva 0126b23c55 drm/vc4_validate: Remove VLA usage
In preparation to enabling -Wvla, remove VLA. In this particular
case use macro ARRAY_SIZE so the length of array _bo_ can be
computed at preprocessing time.

The use of stack Variable Length Arrays needs to be avoided, as they
can be a vector for stack exhaustion, which can be both a runtime bug
or a security flaw. Also, in general, as code evolves it is easy to
lose track of how big a VLA can get. Thus, we can end up having runtime
failures that are hard to debug.

Also, fixed as part of the directive to remove all VLAs from
the kernel: https://lkml.org/lkml/2018/3/7/621

Signed-off-by: Gustavo A. R. Silva <gustavo@embeddedor.com>
Signed-off-by: Eric Anholt <eric@anholt.net>
Reviewed-by: Eric Anholt <eric@anholt.net>
Link: https://patchwork.freedesktop.org/patch/msgid/20180313143151.GA27486@embeddedgus
2018-03-16 15:51:52 -07:00
..
Kconfig
Makefile
vc4_bo.c
vc4_crtc.c drm/vc4: Enable background color fill when necessary 2018-03-09 11:25:11 -08:00
vc4_debugfs.c
vc4_dpi.c
vc4_drv.c
vc4_drv.h drm/vc4: Move plane state to header 2018-03-09 11:25:06 -08:00
vc4_dsi.c
vc4_fence.c
vc4_gem.c
vc4_hdmi.c drm/vc4: Replace long HDMI udelay with usleep_range 2018-03-05 10:19:21 -08:00
vc4_hvs.c
vc4_irq.c
vc4_kms.c
vc4_packet.h
vc4_perfmon.c
vc4_plane.c drm/vc4: Move plane state to header 2018-03-09 11:25:06 -08:00
vc4_qpu_defines.h
vc4_regs.h drm/vc4: Set premultiplied for alpha formats 2018-03-09 11:24:53 -08:00
vc4_render_cl.c
vc4_trace_points.c
vc4_trace.h
vc4_v3d.c
vc4_validate_shaders.c
vc4_validate.c drm/vc4_validate: Remove VLA usage 2018-03-16 15:51:52 -07:00
vc4_vec.c