lkdtm: Move crashtype definitions into each category
authorKees Cook <keescook@chromium.org>
Fri, 4 Mar 2022 00:31:16 +0000 (16:31 -0800)
committerKees Cook <keescook@chromium.org>
Tue, 12 Apr 2022 23:16:48 +0000 (16:16 -0700)
commit73f62e60d80c2d74491933ca49006b9e70563738
tree97b072c319bda24f42f7c071bd50009bb98dc29d
parent8bfdbddd68249e0d8598777cca8249619ee51df0
lkdtm: Move crashtype definitions into each category

It's long been annoying that to add a new LKDTM test one had to update
lkdtm.h and core.c to get it "registered". Switch to a per-category
list and update the crashtype walking code in core.c to handle it.

This also means that all the lkdtm_* tests themselves can be static now.

Cc: Arnd Bergmann <arnd@arndb.de>
Cc: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Signed-off-by: Kees Cook <keescook@chromium.org>
drivers/misc/lkdtm/bugs.c
drivers/misc/lkdtm/cfi.c
drivers/misc/lkdtm/core.c
drivers/misc/lkdtm/fortify.c
drivers/misc/lkdtm/heap.c
drivers/misc/lkdtm/lkdtm.h
drivers/misc/lkdtm/perms.c
drivers/misc/lkdtm/powerpc.c
drivers/misc/lkdtm/refcount.c
drivers/misc/lkdtm/stackleak.c
drivers/misc/lkdtm/usercopy.c