Re: [PATCH v2] checkpatch: check for missing Fixes tags

From: Kees Cook
Date: Tue Jun 20 2023 - 16:08:21 EST


On Tue, Jun 20, 2023 at 02:45:12PM +0300, Dan Carpenter wrote:
> This check looks for common words that probably indicate a patch
> is a fix. For now the regex is:
>
> (?:BUG: KASAN|Call Trace:|stable\@|syzkaller)

I thought the bare word "syzkaller" was going to match too much, but
looking through commit logs, it seems fine. If it does end up too noisy,
perhaps "@syzkaller"?

For "BUG: KASAN", though, I think we need to make this more general to
catch KCSAN, KMSAN, UBSAN, etc:

(?:(?:BUG: K.|UB)SAN: |Call Trace:|stable\@|syzkaller)

UBSAN does not prefix itself with "BUG: " like the others:

$ git grep 'pr_err(".*SAN:'
kernel/kcsan/report.c: pr_err("BUG: KCSAN: %s in %ps / %ps\n",
kernel/kcsan/report.c: pr_err("BUG: KCSAN: %s in %pS\n", get_bug_type(ai->access_type),
lib/ubsan.c: pr_err("UBSAN: %s in %s:%d:%d\n", reason, loc->file_name,
mm/kasan/report.c: pr_err("BUG: KASAN: %s in %pS\n", info->bug_type, (void *)info->ip);
mm/kasan/report.c: pr_err("BUG: KASAN: invalid-access\n");
mm/kmsan/report.c: pr_err("BUG: KMSAN: %s in %pSb\n", bug_type,

But, yes, please, I love this idea. :)

-Kees

--
Kees Cook