Received: by 2002:a05:6a10:f3d0:0:0:0:0 with SMTP id a16csp1906396pxv; Fri, 2 Jul 2021 15:47:14 -0700 (PDT) X-Google-Smtp-Source: ABdhPJwD//g6LsMPNNPCqh901qgNsxDHEKHXbeRNHhpb9BfuU3K/E60oqItydgbO5RmGc24rHAKz X-Received: by 2002:a17:907:948a:: with SMTP id dm10mr2055075ejc.200.1625266034745; Fri, 02 Jul 2021 15:47:14 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1625266034; cv=none; d=google.com; s=arc-20160816; b=nTzKxRt+tbxAymqLkZl8pH8Dc0zdpadCAqIgaNpA1N029qwVwi4aMcIyR7NqGHzbsL FQhHrA17/pOKYSUVsmwYDem+8tgyvgUtPIAHLFw3vVBarL5IRF1x+/97dK+6446z26XQ wTJ0Pr4yc/WanZrnqfsAYdpvS3QF2Jcd7DusPVgHfI4trA2VHje/28Y7cog+1z3BMe9/ 2SSypiv8jCyDztct5HfSh4iENypaGF6HpWk68keBZIdazBnKynO5FAAOsaqMA4nZogNz eVFo/pIsgU0RxrGNT7NqdW4f5hj00m7QGSgsFQvS0tWcPaCstyPGW0CNINuPtQp5gH7h VtEw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:mime-version :message-id:date:subject:cc:to:from; bh=XXWhbHuQ6fmMCg537O+GoL96aZWq/+EGuAR22l7Aksk=; b=xyWBYwS/jDCTY3EjqYP0sPqp8/0rnPd3VW55k3pkkyTD7v7q+ebAkhyUx1Z37c9p7c Fge7dCMwjtE/OCFrQiUu8POV7k9F8hDbYATtlu4xpETafFfhZdhpiyDaTlbnGaja+RJD G+WabdIbiV5D+IKUSBeVzuq5qcYzrepKf9M74QlFSggfLdNkf5U+3Vs89Gkj19ka0uJp wDQYx/6F9oO0ePr+O6qEEb4fBoUvonVo2humev69JnKQ/AeWMPodXzlJ7gD9QTckSQhB 2rNg/pFxCN2ggSGH0ojM06PqFNGV4F3dxgGHe+Yd92JFYvbwITHlkPnbNEwIZhtvLylx jUkw== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=eaglescrag.net Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id p3si5043152ejy.228.2021.07.02.15.46.51; Fri, 02 Jul 2021 15:47:14 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) client-ip=23.128.96.18; Authentication-Results: mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=eaglescrag.net Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S230211AbhGBWkU (ORCPT + 99 others); Fri, 2 Jul 2021 18:40:20 -0400 Received: from shards.monkeyblade.net ([23.128.96.9]:43092 "EHLO mail.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S230201AbhGBWkU (ORCPT ); Fri, 2 Jul 2021 18:40:20 -0400 Received: from usagi.middle.earth (ethbase.usagi.not.afront.org [IPv6:2620:137:e001:0:1897:4108:901b:c660]) by mail.monkeyblade.net (Postfix) with ESMTPSA id C8DDF4D252307; Fri, 2 Jul 2021 15:37:45 -0700 (PDT) Received: from usagi.middle.earth (localhost [IPv6:::1]) by usagi.middle.earth (Postfix) with ESMTP id 9132E27AB476; Fri, 2 Jul 2021 15:37:43 -0700 (PDT) From: "John 'Warthog9' Hawley (VMware)" To: linux-kernel@vger.kernel.org, Andy Whitcroft , Joe Perches , Dwaipayan Ray , Lukas Bulwahn Cc: John 'Warthog9' Hawley Subject: [PATCH] checkpatch: Add check for common mailing list helper checks Date: Fri, 2 Jul 2021 15:37:43 -0700 Message-Id: <20210702223743.1240694-1-warthog9@eaglescrag.net> X-Mailer: git-send-email 2.26.3 MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Greylist: Sender succeeded SMTP AUTH, not delayed by milter-greylist-4.6.2 (mail.monkeyblade.net [0.0.0.0]); Fri, 02 Jul 2021 15:37:45 -0700 (PDT) Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org From: John 'Warthog9' Hawley Mailing lists in an attempt to try and avoid sending certain administrative e-mails to the list, will check the first few lines (usually ~10) looking for keywords. If those key words are found it shunts the e-mail to the list admin contact instead of potentially passing it through to the list. This adds a known list of the potential things that are checked for, and while it may search deeper into the message (it goes till it believes it's into the patch section) than the mailing list software this should help give some warning if the wrong word is potentially added in the wrong place in the beginning of a patch message. Signed-off-by: John 'Warthog9' Hawley (VMware) --- scripts/checkpatch.pl | 34 ++++++++++++++++++++++++++++++++++ 1 file changed, 34 insertions(+) diff --git a/scripts/checkpatch.pl b/scripts/checkpatch.pl index 461d4221e4a4..c2f6e349f304 100755 --- a/scripts/checkpatch.pl +++ b/scripts/checkpatch.pl @@ -2852,6 +2852,40 @@ sub process { $cnt_lines++ if ($realcnt != 0); +# check if this may trip up common mailing list helpers to redirect email to the admin contact + if ($in_commit_log && + ($line =~ /\bcancel\b/i || + $line =~ /\badd me\b/i || + $line =~ /\bdelete me\b/i || + $line =~ /\bremove\s+me\b/i || + $line =~ /\bchange\b.*\baddress\b/ || + $line =~ /\bsubscribe\b/i || + $line =~ /^sub\b/i || + $line =~ /\bunsubscribe\b/i || + $line =~ /^unsub\b/i || + $line =~ /^\s*help\s*$/i || + $line =~ /^\s*info\s*$/i || + $line =~ /^\s*info\s+\S+\s*$/i || + $line =~ /^\s*lists\s*$/i || + $line =~ /^\s*which\s*$/i || + $line =~ /^\s*which\s+\S+\s*$/i || + $line =~ /^\s*index\s*$/i || + $line =~ /^\s*index\s+\S+\s*$/i || + $line =~ /^\s*who\s*$/i || + $line =~ /^\s*who\s+\S+\s*$/i || + $line =~ /^\s*get\s+\S+\s*$/i || + $line =~ /^\s*get\s+\S+\s+\S+\s*$/i || + $line =~ /^\s*approve\b/i || + $line =~ /^\s*passwd\b/i || + $line =~ /^\s*newinfo\b/i || + $line =~ /^\s*config\b/i || + $line =~ /^\s*newconfig\b/i || + $line =~ /^\s*writeconfig\b/i || + $line =~ /^\s*mkdigest\b/i)){ + WARN("MAILING LIST HELPER", + "Line matches common mailing list helpers, and may not be delivered correctly. Consider rewording (particularly the first word)\n" . $herecurr); + } + # Verify the existence of a commit log if appropriate # 2 is used because a $signature is counted in $commit_log_lines if ($in_commit_log) { -- 2.26.3