]> git.ipfire.org Git - thirdparty/kernel/linux.git/commit
lkdtm/fortify: Drop unneeded FORTIFY_STR_OBJECT test
authorKees Cook <kees@kernel.org>
Tue, 24 Mar 2026 02:07:30 +0000 (19:07 -0700)
committerKees Cook <kees@kernel.org>
Tue, 31 Mar 2026 23:53:47 +0000 (16:53 -0700)
commitcf2f06f7152d5e38a87aa2e9b8b452714789f6ba
tree58402668bdb292a8be0f98c761e52a34986c99a2
parent00247cbf173a9e1e2304db8e3f9172d36366b255
lkdtm/fortify: Drop unneeded FORTIFY_STR_OBJECT test

The str* family of fortified functions all use member-sized limits
for a while now, so the FORTIFY_STR_OBJECT test is redundant to
FORTIFY_STR_MEMBER. While here, replace the strncpy() use with strscpy(),
as strncpy() is being removed.

Link: https://patch.msgid.link/20260324020726.work.624-kees@kernel.org
Signed-off-by: Kees Cook <kees@kernel.org>
drivers/misc/lkdtm/fortify.c
tools/testing/selftests/lkdtm/tests.txt