OSDN Git Service

perf/arm-cci: Remove VLA usage
authorKees Cook <keescook@chromium.org>
Fri, 29 Jun 2018 18:45:36 +0000 (11:45 -0700)
committerWill Deacon <will.deacon@arm.com>
Mon, 2 Jul 2018 11:50:03 +0000 (12:50 +0100)
commit1201a5a25cf0f7d8019d106a81c64f3a7397d17c
tree25b5c6edd320fad677a13c3b33c46718ab253685
parentce397d215ccd07b8ae3f71db689aedb85d56ab40
perf/arm-cci: Remove VLA usage

In the quest to remove all stack VLA usage from the kernel[1], this
removes the VLA in favor of a maximum size and adds a sanity check
at registration time. The sizes are all explicitly enumerated already,
so this just collects them into macros.

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

Signed-off-by: Kees Cook <keescook@chromium.org>
Signed-off-by: Will Deacon <will.deacon@arm.com>
drivers/perf/arm-cci.c