fortify: Adjust KUnit test for modular build
authorKees Cook <keescook@chromium.org>
Tue, 13 Sep 2022 17:28:56 +0000 (10:28 -0700)
committerKees Cook <keescook@chromium.org>
Wed, 14 Sep 2022 14:04:15 +0000 (07:04 -0700)
commit06c1c49d0cd1d6cec5b78963109ba728e49e0063
tree8533276c139e4224e8530f9ea5311e400e673fea
parentc5783af354688b24abd359f7086c282ec74de993
fortify: Adjust KUnit test for modular build

A much better "unknown size" string pointer is available directly from
struct test, so use that instead of a global that isn't shared with
modules.

Reported-by: Nathan Chancellor <nathan@kernel.org>
Link: https://lore.kernel.org/lkml/YyCOHOchVuE/E7vS@dev-arch.thelio-3990X
Fixes: 875bfd5276f3 ("fortify: Add KUnit test for FORTIFY_SOURCE internals")
Cc: linux-hardening@vger.kernel.org
Build-tested-by: Nathan Chancellor <nathan@kernel.org>
Reviewed-by: David Gow <davidgow@google.com>
Signed-off-by: Kees Cook <keescook@chromium.org>
lib/fortify_kunit.c