]> git.baikalelectronics.ru Git - kernel.git/commit
drm/nouveau/secboot/acr: Remove VLA usage
authorKees Cook <keescook@chromium.org>
Thu, 24 May 2018 17:24:36 +0000 (10:24 -0700)
committerBen Skeggs <bskeggs@redhat.com>
Mon, 16 Jul 2018 08:06:30 +0000 (18:06 +1000)
commit79fa01e5f7c206ef7c6f44a82e786d9f4571abe5
tree2b76649f448fcfb1a026d3a755225b4c69263317
parentc88fe0a9f6e41b0fdb23a87511a33336802afb8a
drm/nouveau/secboot/acr: Remove VLA usage

In the quest to remove all stack VLA usage from the kernel[1], this
allocates the working buffers before starting the writing so it won't
abort in the middle. This needs an initial walk of the lists to figure
out how large the buffer should be.

[1] https://lkml.kernel.org/r/CA+55aFzCG-zNmZwX4A2FQpadafLfEzK6CC=qPXydAacU1RqZWA@mail.gmail.com

Signed-off-by: Kees Cook <keescook@chromium.org>
Signed-off-by: Ben Skeggs <bskeggs@redhat.com>
drivers/gpu/drm/nouveau/nvkm/subdev/secboot/acr_r352.c
drivers/gpu/drm/nouveau/nvkm/subdev/secboot/acr_r367.c