public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
From: Kees Cook <keescook@chromium.org>
To: Dan Carpenter <dan.carpenter@linaro.org>
Cc: Thorsten Leemhuis <linux@leemhuis.info>,
	Andy Whitcroft <apw@canonical.com>, Joe Perches <joe@perches.com>,
	Dwaipayan Ray <dwaipayanray1@gmail.com>,
	Lukas Bulwahn <lukas.bulwahn@gmail.com>,
	linux-kernel@vger.kernel.org,
	Greg Kroah-Hartman <gregkh@linuxfoundation.org>,
	Arnd Bergmann <arnd@arndb.de>, Sasha Levin <sashal@kernel.org>,
	Tom Gall <tom.gall@linaro.org>,
	kernel-janitors@vger.kernel.org
Subject: Re: [PATCH v2] checkpatch: check for missing Fixes tags
Date: Tue, 20 Jun 2023 13:08:15 -0700	[thread overview]
Message-ID: <202306201259.D3E15331@keescook> (raw)
In-Reply-To: <ce2d9aa7-b1e6-402e-8471-ad52a321c008@moroto.mountain>

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

      reply	other threads:[~2023-06-20 20:08 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2023-06-20 11:45 [PATCH v2] checkpatch: check for missing Fixes tags Dan Carpenter
2023-06-20 20:08 ` Kees Cook [this message]

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=202306201259.D3E15331@keescook \
    --to=keescook@chromium.org \
    --cc=apw@canonical.com \
    --cc=arnd@arndb.de \
    --cc=dan.carpenter@linaro.org \
    --cc=dwaipayanray1@gmail.com \
    --cc=gregkh@linuxfoundation.org \
    --cc=joe@perches.com \
    --cc=kernel-janitors@vger.kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux@leemhuis.info \
    --cc=lukas.bulwahn@gmail.com \
    --cc=sashal@kernel.org \
    --cc=tom.gall@linaro.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox