From nobody Fri Dec 19 00:08:15 2025 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 747EACE7AFE for ; Thu, 28 Sep 2023 04:23:15 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S230158AbjI1EXO (ORCPT ); Thu, 28 Sep 2023 00:23:14 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:49832 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S230017AbjI1EXJ (ORCPT ); Thu, 28 Sep 2023 00:23:09 -0400 Received: from mail-yb1-xb49.google.com (mail-yb1-xb49.google.com [IPv6:2607:f8b0:4864:20::b49]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 21142121 for ; Wed, 27 Sep 2023 21:23:08 -0700 (PDT) Received: by mail-yb1-xb49.google.com with SMTP id 3f1490d57ef6-d814634fe4bso19615744276.1 for ; Wed, 27 Sep 2023 21:23:08 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=20230601; t=1695874987; x=1696479787; darn=vger.kernel.org; h=cc:to:from:subject:message-id:references:mime-version:in-reply-to :date:from:to:cc:subject:date:message-id:reply-to; bh=himG2EUevZ0nCD5wQ/EEtMYJiUF1xza4FD5wJPxrdQw=; b=UWJbYQh9SIj1SpWpkWBWung+DQntfECaAY+ifuVegnN48ISUdFIWIY6/V2qUN2CBxu P+BMtPamqHFFBP8hoZl+Zgodddm+A8FwCIVXp9EK40LU1lY7/lYLYvHbR/hUegd3gTzb CmDyhhHN2sG7Vh36k5ZB7P9vuwwHyjSqptyzKA3F6Ze48FkuTFiUl4XtE7NHi/1OzOhU l6F5EWT/FRyznsJjS3XkoNTzqrUboKSo5CIhv6mN1fMfmVRLprRL3aApyLDc3W2GWlgr ZQ5ifCvTb5vhCSsgk25z4mVOm5AGfMh2jAaLR+fQObinTGk/Rm13Fe0SnyItM3CKLHMH gACA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1695874987; x=1696479787; h=cc:to:from:subject:message-id:references:mime-version:in-reply-to :date:x-gm-message-state:from:to:cc:subject:date:message-id:reply-to; bh=himG2EUevZ0nCD5wQ/EEtMYJiUF1xza4FD5wJPxrdQw=; b=rDKY8JCYzj0DfgyDCcZud7GuEu3LlZHRyk7EaUbrQYWWTEAWLYjm0x1kEzd1xJ4JOU Q3jIQCSSP7aXp07Wd0pN8+b04+t6YCsA4SO53VmEBLxZiQNBMyURErev8fvWp2o4oU7U mDDTDTVCAvMF0yEadph8L0NwKS/UC3SfbzN5GA2ittrz8H/GiweBom51HLV198Nq1bJk p1TVBzRhO5AAjSJQDzkIBgtyLtsvGuNmxbzRds9w7Eslb6BlPLrMt/kRrg3tR0kyRG3A iJNcFsWC1+FrHwmHoLE/3pMPFSaQGVAB+77fy7VPIMVN4ZiBqQdrB6CZ4q6CRCRYW+Qj cw1w== X-Gm-Message-State: AOJu0YygqH52BfPEeuDTvoy9rcY7v1AzHPxwrItwT64qg9EY5WhPa6CZ Gj7z332ywUGWSjbl0HJ1gUYR/WFRk+CRx3PXjw== X-Google-Smtp-Source: AGHT+IFrIVKw2+EmPNZNHezNbm1WiVv0NLjoNor2pjdg9EKmdrqDih2JZzJ1TzIHqg97E8RGR0YgmBNwAHrmGwOrwA== X-Received: from jstitt-linux1.c.googlers.com ([fda3:e722:ac3:cc00:2b:ff92:c0a8:23b5]) (user=justinstitt job=sendgmr) by 2002:a25:aa8a:0:b0:d80:eb4:9ca with SMTP id t10-20020a25aa8a000000b00d800eb409camr1562ybi.0.1695874987336; Wed, 27 Sep 2023 21:23:07 -0700 (PDT) Date: Thu, 28 Sep 2023 04:23:05 +0000 In-Reply-To: <20230928-get_maintainer_add_d-v2-0-8acb3f394571@google.com> Mime-Version: 1.0 References: <20230928-get_maintainer_add_d-v2-0-8acb3f394571@google.com> X-Developer-Key: i=justinstitt@google.com; a=ed25519; pk=tC3hNkJQTpNX/gLKxTNQKDmiQl6QjBNCGKJINqAdJsE= X-Developer-Signature: v=1; a=ed25519-sha256; t=1695874985; l=2683; i=justinstitt@google.com; s=20230717; h=from:subject:message-id; bh=8gNirzReiW8c5pSV52GSSvvpxk3c6q7GcY+X85S9HH4=; b=xwcKdSmbabKVDWwN+jZOMEgT7h6u6HvkFc9xKfMjjlkxx7J0S4QweUye920eCS7CHIZHGABKT kfvh7sj8MklDQvVoXOoPCKfTde7bv3D+NNiE6uIQI/EhZTcGx27HCsJ X-Mailer: b4 0.12.3 Message-ID: <20230928-get_maintainer_add_d-v2-1-8acb3f394571@google.com> Subject: [PATCH v2 1/2] get_maintainer: add patch-only keyword-matching From: Justin Stitt To: Joe Perches Cc: linux-kernel@vger.kernel.org, Kees Cook , Nick Desaulniers , Nathan Chancellor , Jakub Kicinski , Krzysztof Kozlowski , geert@linux-m68k.org, gregkh@linuxfoundation.org, workflows@vger.kernel.org, mario.limonciello@amd.com, Justin Stitt Content-Type: text/plain; charset="utf-8" Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Transfer-Encoding: quoted-printable Add the "D:" type which behaves the same as "K:" but will only match content present in a patch file. To illustrate: Imagine this entry in MAINTAINERS: NEW REPUBLIC M: Han Solo W: https://www.jointheresistance.org D: \bstrncpy\b Our maintainer, Han, will only be added to the recipients if a patch file is passed to get_maintainer (like what b4 does): $ ./scripts/get_maintainer.pl 0004-some-change.patch If the above patch has a `strncpy` present in the subject, commit log or diff then Han will be to/cc'd. However, in the event of a file from the tree given like: $ ./scripts/get_maintainer.pl ./lib/string.c Han will not be noisily to/cc'd (like a K: type would in this circumstance) Signed-off-by: Justin Stitt --- MAINTAINERS | 5 +++++ scripts/get_maintainer.pl | 12 ++++++++++-- 2 files changed, 15 insertions(+), 2 deletions(-) diff --git a/MAINTAINERS b/MAINTAINERS index b19995690904..94e431daa7c2 100644 --- a/MAINTAINERS +++ b/MAINTAINERS @@ -59,6 +59,11 @@ Descriptions of section entries and preferred order matches patches or files that contain one or more of the words printk, pr_info or pr_err One regex pattern per line. Multiple K: lines acceptable. + D: *Diff content regex* (perl extended) pattern match that applies only = to + patches and not entire files (e.g. when using the get_maintainers.pl + script). + Usage same as K:. + =20 Maintainers List ---------------- diff --git a/scripts/get_maintainer.pl b/scripts/get_maintainer.pl index ab123b498fd9..a3e697926ddd 100755 --- a/scripts/get_maintainer.pl +++ b/scripts/get_maintainer.pl @@ -342,6 +342,7 @@ if ($tree && !top_of_kernel_tree($lk_path)) { =20 my @typevalue =3D (); my %keyword_hash; +my %patch_keyword_hash; my @mfiles =3D (); my @self_test_info =3D (); =20 @@ -369,8 +370,10 @@ sub read_maintainer_file { $value =3D~ s@([^/])$@$1/@; } } elsif ($type eq "K") { - $keyword_hash{@typevalue} =3D $value; - } + $keyword_hash{@typevalue} =3D $value; + } elsif ($type eq "D") { + $patch_keyword_hash{@typevalue} =3D $value; + } push(@typevalue, "$type:$value"); } elsif (!(/^\s*$/ || /^\s*\#/)) { push(@typevalue, $line); @@ -607,6 +610,11 @@ foreach my $file (@ARGV) { push(@keyword_tvi, $line); } } + foreach my $line(keys %patch_keyword_hash) { + if ($patch_line =3D~ m/${patch_prefix}$patch_keyword_hash{$line}/x) { + push(@keyword_tvi, $line); + } + } } } close($patch); --=20 2.42.0.582.g8ccd20d70d-goog From nobody Fri Dec 19 00:08:15 2025 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 379F4CE7AFE for ; Thu, 28 Sep 2023 04:23:20 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S230172AbjI1EXS (ORCPT ); Thu, 28 Sep 2023 00:23:18 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:49866 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S230125AbjI1EXL (ORCPT ); Thu, 28 Sep 2023 00:23:11 -0400 Received: from mail-yb1-xb4a.google.com (mail-yb1-xb4a.google.com [IPv6:2607:f8b0:4864:20::b4a]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id B9718114 for ; Wed, 27 Sep 2023 21:23:09 -0700 (PDT) Received: by mail-yb1-xb4a.google.com with SMTP id 3f1490d57ef6-d7fd4c23315so19806486276.2 for ; Wed, 27 Sep 2023 21:23:09 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=20230601; t=1695874989; x=1696479789; darn=vger.kernel.org; h=cc:to:from:subject:message-id:references:mime-version:in-reply-to :date:from:to:cc:subject:date:message-id:reply-to; bh=It56Gguh650ffaTkOSZVGPYI0c6LZFqw9TQutV5nNWg=; b=SaH29wOd+6o/wD+lXYe9HUk7MM9XTCIb1CCutWuRCUgC5eBj9Cf6bPVNMh2gFd+06o qDJN52VdFGdPimSgc4wGN8iAw5QStz69l7k4PikxzruStK26QDsnHlTbC0sIhcDfZrZe 2mDIabAVR066zlM+Ge9s+7xjxI2x8iPfizwrbn7EPw1SZN0MIc79Qy57QMGOxlg9cF86 63c9npcLxT+zVQ7PH3vLZJQVTcOc1knXYAE6+JvC5SMvrGiALIOo/BLNFtyOxzCWKZ6J jxCP6qhEUHuzKqr3ufZVY5n15PNwldU0mDKFsfnMsDX0wFtE17qOW2DEHG+o9vHE+YN8 z4mw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1695874989; x=1696479789; h=cc:to:from:subject:message-id:references:mime-version:in-reply-to :date:x-gm-message-state:from:to:cc:subject:date:message-id:reply-to; bh=It56Gguh650ffaTkOSZVGPYI0c6LZFqw9TQutV5nNWg=; b=KqVQiY3XJ5zG4UP6vTC1orCoCVBZkqt+FXFMNZVd1gJskTnAOEymO3QglgC5y44ZAD NFo4v/gGTC/9W677WmonPz9xpxZk3Xnl4nMZ8nfkbMcBJG45PKcHUvEP8WAKEa1bpEdN OohoTcen0mQVMfGXHDAHmeMLPzNnWp8QYpfJ1hOuPaP6xOddTOZgVgD+2UXjEbU/YzdO ULO+/sCjSJ4moYkdU0tKZppFLAwEV+UJ9MS0OPY5HxNQB0LH0/lq3+9Whk1PiY0UhKIx 4F+/JbQABVRxtNpnfGdfLVL518gYWuosTxBWexW5zGK9ouVB6Oncv9ayJD/+poismEuG K8hQ== X-Gm-Message-State: AOJu0Yy26wBOVpph9Nq7I8Y0qc+unhF5GGQ/waUXfUwUWwL3ibh1oIrt sm4Dn2rI1olmJYWAXExpqFJAbKhMAQ3sWXDTpg== X-Google-Smtp-Source: AGHT+IFTRC62+VLY1BTpQX7M0NE8NBu7Eq8lACHDawBOl1EaIH77JSN9AdWvwSVQWPQ/nmaoLbuw+K0YZGm9eNyX/g== X-Received: from jstitt-linux1.c.googlers.com ([fda3:e722:ac3:cc00:2b:ff92:c0a8:23b5]) (user=justinstitt job=sendgmr) by 2002:a25:e7ce:0:b0:d85:ae1e:f696 with SMTP id e197-20020a25e7ce000000b00d85ae1ef696mr1475ybh.0.1695874989048; Wed, 27 Sep 2023 21:23:09 -0700 (PDT) Date: Thu, 28 Sep 2023 04:23:06 +0000 In-Reply-To: <20230928-get_maintainer_add_d-v2-0-8acb3f394571@google.com> Mime-Version: 1.0 References: <20230928-get_maintainer_add_d-v2-0-8acb3f394571@google.com> X-Developer-Key: i=justinstitt@google.com; a=ed25519; pk=tC3hNkJQTpNX/gLKxTNQKDmiQl6QjBNCGKJINqAdJsE= X-Developer-Signature: v=1; a=ed25519-sha256; t=1695874985; l=2073; i=justinstitt@google.com; s=20230717; h=from:subject:message-id; bh=4hd7+/dabC4gbCt9QP7ey8KnfpeloJyHMAZcMSG16Pc=; b=5iUwsCmlzFiWkU7VqHvK/fjbdDZIPAvMcq0fNvbGLegNp3sy3Je2cZlK4W5lStx/DivvtSiJP 0jPvoyI5v0BAB72qcEpj2pSgwIV1RR4LX3wsUVjDlHqlC+GDvPzfOwF X-Mailer: b4 0.12.3 Message-ID: <20230928-get_maintainer_add_d-v2-2-8acb3f394571@google.com> Subject: [PATCH v2 2/2] MAINTAINERS: migrate some K to D From: Justin Stitt To: Joe Perches Cc: linux-kernel@vger.kernel.org, Kees Cook , Nick Desaulniers , Nathan Chancellor , Jakub Kicinski , Krzysztof Kozlowski , geert@linux-m68k.org, gregkh@linuxfoundation.org, workflows@vger.kernel.org, mario.limonciello@amd.com, Justin Stitt Content-Type: text/plain; charset="utf-8" Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Transfer-Encoding: quoted-printable Let's get the ball rolling with some changes from K to D. Ultimately, if it turns out that 100% of K users want to change to D then really the behavior of K could just be changed. Signed-off-by: Justin Stitt Original-author: Kees Cook --- MAINTAINERS | 16 +++++++++------- 1 file changed, 9 insertions(+), 7 deletions(-) diff --git a/MAINTAINERS b/MAINTAINERS index 94e431daa7c2..80ffdaa8f044 100644 --- a/MAINTAINERS +++ b/MAINTAINERS @@ -5038,7 +5038,7 @@ F: Documentation/kbuild/llvm.rst F: include/linux/compiler-clang.h F: scripts/Makefile.clang F: scripts/clang-tools/ -K: \b(?i:clang|llvm)\b +D: \b(?i:clang|llvm)\b =20 CLK API M: Russell King @@ -8149,7 +8149,7 @@ F: lib/strcat_kunit.c F: lib/strscpy_kunit.c F: lib/test_fortify/* F: scripts/test_fortify.sh -K: \b__NO_FORTIFY\b +D: \b__NO_FORTIFY\b =20 FPGA DFL DRIVERS M: Wu Hao @@ -11405,8 +11405,10 @@ F: Documentation/ABI/testing/sysfs-kernel-warn_cou= nt F: include/linux/overflow.h F: include/linux/randomize_kstack.h F: mm/usercopy.c -K: \b(add|choose)_random_kstack_offset\b -K: \b__check_(object_size|heap_object)\b +D: \b(add|choose)_random_kstack_offset\b +D: \b__check_(object_size|heap_object)\b +D: \b__counted_by\b + =20 KERNEL JANITORS L: kernel-janitors@vger.kernel.org @@ -17290,7 +17292,7 @@ F: drivers/acpi/apei/erst.c F: drivers/firmware/efi/efi-pstore.c F: fs/pstore/ F: include/linux/pstore* -K: \b(pstore|ramoops) +D: \b(pstore|ramoops) =20 PTP HARDWARE CLOCK SUPPORT M: Richard Cochran @@ -19231,8 +19233,8 @@ F: include/uapi/linux/seccomp.h F: kernel/seccomp.c F: tools/testing/selftests/kselftest_harness.h F: tools/testing/selftests/seccomp/* -K: \bsecure_computing -K: \bTIF_SECCOMP\b +D: \bsecure_computing +D: \bTIF_SECCOMP\b =20 SECURE DIGITAL HOST CONTROLLER INTERFACE (SDHCI) Broadcom BRCMSTB DRIVER M: Kamal Dasu --=20 2.42.0.582.g8ccd20d70d-goog