From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by smtp.lore.kernel.org (Postfix) with ESMTP id 963F3C001DD for ; Tue, 11 Jul 2023 12:42:23 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S231486AbjGKMmW convert rfc822-to-8bit (ORCPT ); Tue, 11 Jul 2023 08:42:22 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:46776 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229983AbjGKMmU (ORCPT ); Tue, 11 Jul 2023 08:42:20 -0400 X-Greylist: delayed 601 seconds by postgrey-1.37 at lindbergh.monkeyblade.net; Tue, 11 Jul 2023 05:42:19 PDT Received: from relay.hostedemail.com (smtprelay0016.hostedemail.com [216.40.44.16]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id A4331B0; Tue, 11 Jul 2023 05:42:19 -0700 (PDT) Received: from omf05.hostedemail.com (a10.router.float.18 [10.200.18.1]) by unirelay04.hostedemail.com (Postfix) with ESMTP id 089D61A0244; Tue, 11 Jul 2023 12:31:18 +0000 (UTC) Received: from [HIDDEN] (Authenticated sender: joe@perches.com) by omf05.hostedemail.com (Postfix) with ESMTPA id 078BD2000E; Tue, 11 Jul 2023 12:31:14 +0000 (UTC) Message-ID: <07bfc0b4676d07274acdcdf38752f73573938382.camel@perches.com> Subject: Re: [PATCH v3] checkpatch: check for missing Fixes tags From: Joe Perches To: Dan Carpenter , Thorsten Leemhuis , Andy Whitcroft , Dwaipayan Ray , Lukas Bulwahn , linux-kernel@vger.kernel.org Cc: Greg Kroah-Hartman , Arnd Bergmann , Kees Cook , Sasha Levin , Tom Gall , kernel-janitors@vger.kernel.org Date: Tue, 11 Jul 2023 05:31:14 -0700 In-Reply-To: <756970eb-6204-415a-a997-d67a14ba6584@moroto.mountain> References: <756970eb-6204-415a-a997-d67a14ba6584@moroto.mountain> Content-Type: text/plain; charset="ISO-8859-1" Content-Transfer-Encoding: 8BIT User-Agent: Evolution 3.48.4 (3.48.4-1.fc38) MIME-Version: 1.0 X-Rspamd-Queue-Id: 078BD2000E X-Stat-Signature: bntx7nnfjs8pgkaxre5rphbiyjb1h1rx X-Rspamd-Server: rspamout01 X-Session-Marker: 6A6F6540706572636865732E636F6D X-Session-ID: U2FsdGVkX19x2gh+vWixMU+NLw21/2xbr+6SUctP47I= X-HE-Tag: 1689078674-258117 X-HE-Meta: U2FsdGVkX19WJVhw/iKSXETy0xJZnvCDQiiGHuoBIfwUnZePzCs0/u1bKh+ihRC5iT82hWN6003xPJD/GV85un13yIrw8x0IJAEu0kVmlrqqztUPVGG7SNvieWp/7DzKrgukrQXPKhBeFCaPPk6gA+r6wnwR+wfyTJpI5LwaGdJmOuLu/Vr2RZQC281UzdEyZR1JUTkf93hvyMEWehnAiZrfMQ55zmK50YwbvfyP2igwlXPchYSQjV/fsFg3v8PV6GeZJ4s+Ll/s6oCv77sEtHf3wHlBlHs4LoBMObbJn/aTZs33NUGxEnd5YIl0hxRoOOdD7/sxmgdH7r68JFH/XUdnffQlpM0wN4wG7C9zxLck8PJ61ozqkY086aq0vQxphc7fRZFZWZ2iG4DHQIYvOAIYQ/t00tpvMr5iBw85BelsGVPxSlG+cbrQEPHoYK3s Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Tue, 2023-07-11 at 10:44 +0300, Dan Carpenter wrote: > This check looks for common words that probably indicate a patch > is a fix. For now the regex is: > > (?:(?:BUG: K.|UB)SAN: |Call Trace:|stable\@|syzkaller)/) > > Why are stable patches encouraged to have a fixes tag? Some people mark > their stable patches as "# 5.10" etc. This is useful but a Fixes tag is > still a good idea. For example, the Fixes tag helps in review. It > helps people to not cherry-pick buggy patches without also > cherry-picking the fix. > > Also if a bug affects the 5.7 kernel some people will round it up to > 5.10+ because 5.7 is not supported on kernel.org. It's possible the Bad > Binder bug was caused by this sort of gap where companies outside of > kernel.org are supporting different kernels from kernel.org. > > Should it be counted as a Fix when a patch just silences harmless > WARN_ON() stack trace. Yes. Definitely. > > Is silencing compiler warnings a fix? It seems unfair to the original > authors, but we use -Werror now, and warnings break the build so let's > just add Fixes tags. I tell people that silencing static checker > warnings is not a fix but the rules on this vary by subsystem. > > Is fixing a minor LTP issue (Linux Test Project) a fix? Probably? It's > hard to know what to do if the LTP test has technically always been > broken. > > One clear false positive from this check is when someone updated their > debug output and included before and after Call Traces. Or when crashes > are introduced deliberately for testing. In those cases, you should > just ignore checkpatch. > > Signed-off-by: Dan Carpenter > --- > v3: Add UBSAN to the regex as Kees suggested. > > v2: I fixed the formatting issues Joe pointed out. But just added another. > diff --git a/scripts/checkpatch.pl b/scripts/checkpatch.pl [] > @@ -3186,6 +3193,16 @@ sub process { > } > } > > +# These indicate a bug fix > + if (!$in_header_lines && !$is_patch && > + $line =~ /^This reverts commit/) { > + $is_revert = 1; > + } > + > + if (!$in_header_lines && !$is_patch && > + $line =~ /(?:(?:BUG: K.|UB)SAN: |Call Trace:|stable\@|syzkaller)/) { align to open parenthesis please