lib/test_stackinit: Allow building stand-alone
authorKees Cook <keescook@chromium.org>
Fri, 23 Jul 2021 22:19:32 +0000 (15:19 -0700)
committerKees Cook <keescook@chromium.org>
Sun, 22 Aug 2021 07:21:35 +0000 (00:21 -0700)
commit1e2cd3084fff19e12bdf3c83ac1a8d64ef11aa63
tree87ee7c77153e420a5bebf911063c7b01cb589e4d
parentf9398f15605a50110bf570aaa361163a85113dd1
lib/test_stackinit: Allow building stand-alone

Especially now that GCC is developing the -ftrivial-auto-var-init
option[1], it's helpful to have a stand-alone userspace test for stack
variable initialization. Relicense to GPLv2+ (I am the only author),
provide stand-alone kernel macro stubs, and update comments for clarity.

[1] https://gcc.gnu.org/pipermail/gcc-patches/2021-July/575198.html

Signed-off-by: Kees Cook <keescook@chromium.org>
Link: https://lore.kernel.org/r/20210723221933.3431999-3-keescook@chromium.org
lib/test_stackinit.c