Skip to content

Commit 231dc3f

Browse files
nathanchancekees
authored andcommitted
lkdtm/bugs: Improve warning message for compilers without counted_by support
The current message for telling the user that their compiler does not support the counted_by attribute in the FAM_BOUNDS test does not make much sense either grammatically or semantically. Fix it to make it correct in both aspects. Signed-off-by: Nathan Chancellor <[email protected]> Reviewed-by: Gustavo A. R. Silva <[email protected]> Link: https://lore.kernel.org/r/20240321-lkdtm-improve-lack-of-counted_by-msg-v1-1-0fbf7481a29c@kernel.org Signed-off-by: Kees Cook <[email protected]>
1 parent d8e45f2 commit 231dc3f

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

drivers/misc/lkdtm/bugs.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -417,7 +417,7 @@ static void lkdtm_FAM_BOUNDS(void)
417417
pr_err("FAIL: survived access of invalid flexible array member index!\n");
418418

419419
if (!__has_attribute(__counted_by__))
420-
pr_warn("This is expected since this %s was built a compiler supporting __counted_by\n",
420+
pr_warn("This is expected since this %s was built with a compiler that does not support __counted_by\n",
421421
lkdtm_kernel_info);
422422
else if (IS_ENABLED(CONFIG_UBSAN_BOUNDS))
423423
pr_expected_config(CONFIG_UBSAN_TRAP);

0 commit comments

Comments
 (0)