powerpc/mpc5200: Remove VLA usage
authorKees Cook <keescook@chromium.org>
Mon, 2 Jul 2018 15:56:21 +0000 (08:56 -0700)
committerMichael Ellerman <mpe@ellerman.id.au>
Tue, 3 Jul 2018 02:00:54 +0000 (12:00 +1000)
commit741c5640a15a23a2ec3a0846668a82e8e3b4314d
tree69a78b8ac8f9b9ef3ee70fbc6d90ba1d0e22c146
parentd497ebf5fb3a026c0817f8c96cde578787f24093
powerpc/mpc5200: Remove VLA usage

In the quest to remove all stack VLA usage from the kernel[1], this
switches to using a stack size large enough for the saved routine and
adds a sanity check making sure the routine doesn't overflow into the
0x600 exception handler.

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

Signed-off-by: Kees Cook <keescook@chromium.org>
Reviewed-by: Arnd Bergmann <arnd@arndb.de>
Signed-off-by: Michael Ellerman <mpe@ellerman.id.au>
arch/powerpc/platforms/52xx/mpc52xx_pm.c