summaryrefslogtreecommitdiffstats
path: root/drivers/misc/lkdtm/fortify.c
diff options
context:
space:
mode:
authorKees Cook <keescook@chromium.org>2021-06-23 13:39:34 -0700
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>2021-06-24 15:32:08 +0200
commit5b777131bd8005acaf7e9d6e7690214155f42890 (patch)
tree4b3e3a8e9964132b55e5d9fc56ca91e8cea9d7dd /drivers/misc/lkdtm/fortify.c
parentf123c42bbeff26bfe8bdb08a01307e92d51eec39 (diff)
downloadcachepc-linux-5b777131bd8005acaf7e9d6e7690214155f42890.tar.gz
cachepc-linux-5b777131bd8005acaf7e9d6e7690214155f42890.zip
lkdtm: Add CONFIG hints in errors where possible
For various failure conditions, try to include some details about where to look for reasons about the failure. Signed-off-by: Kees Cook <keescook@chromium.org> Link: https://lore.kernel.org/r/20210623203936.3151093-8-keescook@chromium.org Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Diffstat (limited to 'drivers/misc/lkdtm/fortify.c')
-rw-r--r--drivers/misc/lkdtm/fortify.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/drivers/misc/lkdtm/fortify.c b/drivers/misc/lkdtm/fortify.c
index faf29cf04baa..0f51d31b57ca 100644
--- a/drivers/misc/lkdtm/fortify.c
+++ b/drivers/misc/lkdtm/fortify.c
@@ -76,7 +76,8 @@ void lkdtm_FORTIFIED_STRSCPY(void)
*/
strscpy(dst, src, strlen(src));
- pr_warn("FAIL: No overflow in above strscpy()\n");
+ pr_err("FAIL: strscpy() overflow not detected!\n");
+ pr_expected_config(CONFIG_FORTIFY_SOURCE);
kfree(src);
}