Message ID | 20230927-get_maintainer_add_d-v1-0-28c207229e72@google.com |
---|---|
Headers |
Return-Path: <linux-kernel-owner@vger.kernel.org> Delivered-To: ouuuleilei@gmail.com Received: by 2002:a59:cae8:0:b0:403:3b70:6f57 with SMTP id r8csp2375270vqu; Tue, 26 Sep 2023 21:25:46 -0700 (PDT) X-Google-Smtp-Source: AGHT+IHstm1IrCu/0Ue3kAWeqocVen5Ro2JR4PHnYxxZUh5DL5IABhx/ZulFuKMcujyJjbeWDyri X-Received: by 2002:a17:902:d512:b0:1c3:845d:a4 with SMTP id b18-20020a170902d51200b001c3845d00a4mr782976plg.51.1695788746403; Tue, 26 Sep 2023 21:25:46 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1695788746; cv=none; d=google.com; s=arc-20160816; b=g0J/egJRO3u7GwvvJjwSKHdpbWoigWPok+MI706QtJtUYjoAH8lXjQ4Eu7dciyYzem qLJcutzQMJD3/2xUj3MA9B7vAQOrYzNqjd2A5FP98+TE0EnN2dqclfBQaTpm46Q1fsQd Xi8/jXZvXnkDhKv+M+StdBqt+r4TZzYlwhdWouVEGuKDhG+B6RUUXBvCfjFnjgFT0sVl oVNvmkyczuN0WENZT/HvDhxwf3GOZCXaN6QB8gDKe5kkFbFzKHyUrRa/MMwFoWuzZM0j akahhDGTfvYgjwbFal3nPYOHO3iIKRZpnfxb2QUz0Sp+ofdsbngqPTe5qTup9phsmXuK wiWg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:cc:to:from:subject:message-id:mime-version:date :dkim-signature; bh=DGozN3Q2BjVab5DdC5Xqh5aKsGm98+6kSJqgQyphx4Q=; fh=+nCTt54Nhk0ybOqE59EhWkLgCBS9Lm838M9BUp5KS3k=; b=rxBSOkO0zmPr5OhatEqzpHdzKcKFQqbixh+ZgoepjEGDAixkqknWUekx1J/1ckr/xZ 36GIJD+WHwtELHySNFM+oiEvaij9KTCDPtIcMEYaXF6jNTiZP7rkJmltB55nSa5SE8rT OPvi9crX/Gq7CY8LEOHmphV8jnqXAjwxawLVuLpDixXJRGrYrzc1dd+Zso4G8Vbc88xX fDAJOdyovfcIYKOcDEAzR13tzJufq/f+O+H/EyIpEI8IxuprTvT3eeE72n8qxWVYKhqH BPF7r52kkjpxQRuWVuHsq+7Srr8gIr1EjyOSOm5AEpAA6i/OeYZpBHvI+qv/+qHYKZEO SVDw== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@google.com header.s=20230601 header.b=wWxxFkNR; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::3:7 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=REJECT sp=REJECT dis=NONE) header.from=google.com Received: from snail.vger.email (snail.vger.email. [2620:137:e000::3:7]) by mx.google.com with ESMTPS id q17-20020a17090311d100b001c7269bc9f5si641528plh.152.2023.09.26.21.25.46 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 26 Sep 2023 21:25:46 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::3:7 as permitted sender) client-ip=2620:137:e000::3:7; Authentication-Results: mx.google.com; dkim=pass header.i=@google.com header.s=20230601 header.b=wWxxFkNR; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::3:7 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=REJECT sp=REJECT dis=NONE) header.from=google.com Received: from out1.vger.email (depot.vger.email [IPv6:2620:137:e000::3:0]) by snail.vger.email (Postfix) with ESMTP id 3E64B80A267A; Tue, 26 Sep 2023 21:00:40 -0700 (PDT) X-Virus-Status: Clean X-Virus-Scanned: clamav-milter 0.103.10 at snail.vger.email Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S229742AbjI0EA2 (ORCPT <rfc822;pwkd43@gmail.com> + 26 others); Wed, 27 Sep 2023 00:00:28 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:39588 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229690AbjI0D65 (ORCPT <rfc822;linux-kernel@vger.kernel.org>); Tue, 26 Sep 2023 23:58:57 -0400 Received: from mail-yw1-x1149.google.com (mail-yw1-x1149.google.com [IPv6:2607:f8b0:4864:20::1149]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 126AC1E978 for <linux-kernel@vger.kernel.org>; Tue, 26 Sep 2023 20:19:28 -0700 (PDT) Received: by mail-yw1-x1149.google.com with SMTP id 00721157ae682-597f461adc5so206887297b3.1 for <linux-kernel@vger.kernel.org>; Tue, 26 Sep 2023 20:19:28 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=20230601; t=1695784767; x=1696389567; darn=vger.kernel.org; h=cc:to:from:subject:message-id:mime-version:date:from:to:cc:subject :date:message-id:reply-to; bh=DGozN3Q2BjVab5DdC5Xqh5aKsGm98+6kSJqgQyphx4Q=; b=wWxxFkNRhyFJrl2HT2Y7HKBAuHEyijl48YBQ4zrpWFFvwamXybQrAjZLJz6FJLS8qs 9jjNd38wrNAm6nQSX3ceOHEFR9mmPW2oaddv7AX9KqZLoW7Wa8+JIYO1VkA4idV0gtSB +9W0zcWejYSxex4PV19AQXMQoolXKulgQYZTNqrWCfs2vwDxBJoI5GtsNJE8vjAtxxiC bs4bSMLdiVL5Ov6DK0AE0G0Rr8qDL7qnQt26YhjcZhKOwB/gTTqsjSO0P1FNCwpNMTS4 kLrC5SjVOFkyzSr43c5pQyLl6TGTRdlsxYLBS0sVSAeXBKFTUEpiTC+BIBs7u7Iddebr Gu7g== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1695784767; x=1696389567; h=cc:to:from:subject:message-id:mime-version:date:x-gm-message-state :from:to:cc:subject:date:message-id:reply-to; bh=DGozN3Q2BjVab5DdC5Xqh5aKsGm98+6kSJqgQyphx4Q=; b=tv99oHsWH980fO/SVvn+hmLbokwtcxdk4FuHlkam/ZCrDjVvA0kG5Wopj61MBbwzZ8 LkAjWUHPCA0hugEuzCExr7edHnnuTpqPrKo7/K4hmwJ2Ot+CFeRePuXzCfmSiDwOfw3O GlG414nUVahIHh6O3OlzgqnWLTW+37n1JeHz6sULh5s1kZy66KCP/QRs0a718BRZFxhM rhq8ROSfaLJe/1N1Qh8NirAMzKxzbiAkk3o7/SjMT/vXPJcSUMfAJgj1HeS00mDDXqfF UbxaKdSV8f4LYZMLm7k//OII+m8EvBX68gUsFYLyOADyUXruHfsjIwiNPBAi0eiKHfxX jDUA== X-Gm-Message-State: AOJu0YykcmwdxlVMUMDoQuAKeS4YIIyvQGTlPG5kGj0X9EE73opxPAiE IRGKKd1ypAVHwLfC/USIN7DoMwo+ez8UbEm5CA== X-Received: from jstitt-linux1.c.googlers.com ([fda3:e722:ac3:cc00:2b:ff92:c0a8:23b5]) (user=justinstitt job=sendgmr) by 2002:a25:880b:0:b0:d89:dd12:163d with SMTP id c11-20020a25880b000000b00d89dd12163dmr1445ybl.1.1695784767190; Tue, 26 Sep 2023 20:19:27 -0700 (PDT) Date: Wed, 27 Sep 2023 03:19:13 +0000 Mime-Version: 1.0 X-B4-Tracking: v=1; b=H4sIADGfE2UC/x2MQQqAIBAAvxJ7TrBNsvpKhEhutocsVCKI/p50m MMcZh5IFJkSjNUDkS5OfIQiTV3BstngSbArDiixlQN2wlM2u+WQCxSNdc44IbVCZftGkUYo6Rl p5fvfTvP7fozB+mhmAAAA X-Developer-Key: i=justinstitt@google.com; a=ed25519; pk=tC3hNkJQTpNX/gLKxTNQKDmiQl6QjBNCGKJINqAdJsE= X-Developer-Signature: v=1; a=ed25519-sha256; t=1695784766; l=1608; i=justinstitt@google.com; s=20230717; h=from:subject:message-id; bh=Z/OmsHcYrM5MtXvVa9TZMGeFKOHN5xCyog9zO9xwJV0=; b=lPG98gO1n66aeEpHpqKhRK8xSwE9XYPSVvpQeaoQ1BmEHFgA6zvp7wzCceTBEOWUVNotomdWM vmWsWEkLWirA9uPCL0HWgUEeGew3+yB6ftxyokDo8HNY/g8F8Kwa6gZ X-Mailer: b4 0.12.3 Message-ID: <20230927-get_maintainer_add_d-v1-0-28c207229e72@google.com> Subject: [PATCH 0/3] get_maintainer: add patch-only keyword matching From: Justin Stitt <justinstitt@google.com> To: Joe Perches <joe@perches.com> Cc: linux-kernel@vger.kernel.org, Kees Cook <keescook@chromium.org>, Nick Desaulniers <ndesaulniers@google.com>, Nathan Chancellor <nathan@kernel.org>, Jakub Kicinski <kuba@kernel.org>, Krzysztof Kozlowski <krzysztof.kozlowski@linaro.org>, geert@linux-m68k.org, gregkh@linuxfoundation.org, workflows@vger.kernel.org, mario.limonciello@amd.com, Justin Stitt <justinstitt@google.com> Content-Type: text/plain; charset="utf-8" X-Spam-Status: No, score=-9.6 required=5.0 tests=BAYES_00,DKIMWL_WL_MED, DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF, RCVD_IN_DNSWL_BLOCKED,SPF_HELO_NONE,SPF_PASS,USER_IN_DEF_DKIM_WL autolearn=ham autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on lindbergh.monkeyblade.net Precedence: bulk List-ID: <linux-kernel.vger.kernel.org> X-Mailing-List: linux-kernel@vger.kernel.org X-Greylist: Sender passed SPF test, not delayed by milter-greylist-4.6.4 (snail.vger.email [0.0.0.0]); Tue, 26 Sep 2023 21:00:40 -0700 (PDT) X-getmail-retrieved-from-mailbox: INBOX X-GMAIL-THRID: 1778163380558049211 X-GMAIL-MSGID: 1778163380558049211 |
Series |
get_maintainer: add patch-only keyword matching
|
|
Message
Justin Stitt
Sept. 27, 2023, 3:19 a.m. UTC
This series aims to add "D:" which behaves exactly the same as "K:" but
works only on patch files.
The goal of this is to reduce noise when folks use get_maintainer on
tree files as opposed to patches. This use case should be steered away
from [1] but "D:" should help maintainers reduce noise in their inboxes
regardless, especially when matching omnipresent keywords like [2]. In
the event of [2] Kees would be to/cc'd from folks running get_maintainer
on _any_ file containing "__counted_by". The number of these files is
rising and I fear for his inbox as his goal, as I understand it, is to
simply monitor the introduction of new __counted_by annotations to
ensure accurate semantics.
See [3/3] for an illustrative example.
This series also includes a formatting pass over get_maintainer because
I personally found it difficult to parse with the human eye.
[1]: https://lore.kernel.org/all/20230726151515.1650519-1-kuba@kernel.org/
[2]: https://lore.kernel.org/all/20230925172037.work.853-kees@kernel.org/
Signed-off-by: Justin Stitt <justinstitt@google.com>
---
Justin Stitt (3):
MAINTAINERS: add documentation for D:
get_maintainer: run perltidy
get_maintainer: add patch-only pattern matching type
MAINTAINERS | 3 +
scripts/get_maintainer.pl | 3334 +++++++++++++++++++++++----------------------
2 files changed, 1718 insertions(+), 1619 deletions(-)
---
base-commit: 6465e260f48790807eef06b583b38ca9789b6072
change-id: 20230926-get_maintainer_add_d-07424a814e72
Best regards,
--
Justin Stitt <justinstitt@google.com>
Comments
On Wed, 2023-09-27 at 03:19 +0000, Justin Stitt wrote: > I'm a first time contributor to get_maintainer.pl and the formatting is > suspicious. I am not sure if there is a particular reason it is the way > it is but I let my editor format it and submitted the diff here in this > patch. Capital NACK. Completely unnecessary and adds no value.
On Wed, 2023-09-27 at 03:19 +0000, Justin Stitt wrote: > Document what "D:" does. > > This is more or less the same as what "K:" does but only works for patch > files. Nack. I'd rather just add a !$file test to K: patterns.
On Wed, Sep 27, 2023 at 03:19:16AM +0000, Justin Stitt wrote: > Note that folks really shouldn't be using get_maintainer on tree files > anyways [1]. That's not true, Linus and I use it on a daily basis this way, it's part of our normal workflow, AND the workflow of the kernel security team. So please don't take that valid use-case away from us. thanks, greg k-h
On Wed, Sep 27, 2023 at 3:14 PM Greg KH <gregkh@linuxfoundation.org> wrote: > > On Wed, Sep 27, 2023 at 03:19:16AM +0000, Justin Stitt wrote: > > Note that folks really shouldn't be using get_maintainer on tree files > > anyways [1]. > > That's not true, Linus and I use it on a daily basis this way, it's part > of our normal workflow, AND the workflow of the kernel security team. > > So please don't take that valid use-case away from us. Fair. I'm on the side of keeping the "K:'' behavior the way it is and that's why I'm proposing adding "D:" to provide a more granular content matching type operating strictly on patches. It's purely opt-in. The patch I linked mentioned steering folks away from using tree files but not necessarily removing the behavior. > > thanks, > > greg k-h Thanks Justin
On Wed, Sep 27, 2023 at 03:46:30PM +0900, Justin Stitt wrote: > On Wed, Sep 27, 2023 at 3:14 PM Greg KH <gregkh@linuxfoundation.org> wrote: > > > > On Wed, Sep 27, 2023 at 03:19:16AM +0000, Justin Stitt wrote: > > > Note that folks really shouldn't be using get_maintainer on tree files > > > anyways [1]. > > > > That's not true, Linus and I use it on a daily basis this way, it's part > > of our normal workflow, AND the workflow of the kernel security team. > > > > So please don't take that valid use-case away from us. > > Fair. I'm on the side of keeping the "K:'' behavior the way it is and > that's why I'm proposing adding "D:" to provide a more granular > content matching type operating strictly on patches. It's purely > opt-in. > > The patch I linked mentioned steering folks away from using > tree files but not necessarily removing the behavior. Please don't steer folks away from it, it is a valid use case of the tool, and I would argue, one of the most important ones given how often I use it that way. Hence my objection to this verbage in the changelog, it's not correct. thanks, greg k-h
On Tue, Sep 26, 2023 at 8:19 PM Justin Stitt <justinstitt@google.com> wrote: > > This series aims to add "D:" which behaves exactly the same as "K:" but > works only on patch files. > > The goal of this is to reduce noise when folks use get_maintainer on > tree files as opposed to patches. This use case should be steered away > from [1] but "D:" should help maintainers reduce noise in their inboxes > regardless, especially when matching omnipresent keywords like [2]. In > the event of [2] Kees would be to/cc'd from folks running get_maintainer > on _any_ file containing "__counted_by". The number of these files is > rising and I fear for his inbox as his goal, as I understand it, is to > simply monitor the introduction of new __counted_by annotations to > ensure accurate semantics. Something like this (whether this series or a different approach) would be helpful to me as well; we use K: to get cc'ed on patches mentioning clang or llvm, but our ML also then ends up getting cc'ed on every follow up patch to most files. This is causing excessive posts on our ML. As a result, it's a struggle to get folks to cc themselves to the ML, which puts the code review burden on fewer people. Whether it's a new D: or refinement to the behavior of K:, I applaud the effort. Hopefully we can find an approach that works for everyone. And may God have mercy on your soul for having to touch that much perl. :-P > > See [3/3] for an illustrative example. > > This series also includes a formatting pass over get_maintainer because > I personally found it difficult to parse with the human eye. > > [1]: https://lore.kernel.org/all/20230726151515.1650519-1-kuba@kernel.org/ > [2]: https://lore.kernel.org/all/20230925172037.work.853-kees@kernel.org/ > > Signed-off-by: Justin Stitt <justinstitt@google.com> > --- > Justin Stitt (3): > MAINTAINERS: add documentation for D: > get_maintainer: run perltidy > get_maintainer: add patch-only pattern matching type > > MAINTAINERS | 3 + > scripts/get_maintainer.pl | 3334 +++++++++++++++++++++++---------------------- > 2 files changed, 1718 insertions(+), 1619 deletions(-) > --- > base-commit: 6465e260f48790807eef06b583b38ca9789b6072 > change-id: 20230926-get_maintainer_add_d-07424a814e72 > > Best regards, > -- > Justin Stitt <justinstitt@google.com> >
On Wed, Sep 27, 2023 at 08:24:58AM -0700, Nick Desaulniers wrote: > On Tue, Sep 26, 2023 at 8:19 PM Justin Stitt <justinstitt@google.com> wrote: > > > > This series aims to add "D:" which behaves exactly the same as "K:" but > > works only on patch files. > > > > The goal of this is to reduce noise when folks use get_maintainer on > > tree files as opposed to patches. This use case should be steered away > > from [1] but "D:" should help maintainers reduce noise in their inboxes > > regardless, especially when matching omnipresent keywords like [2]. In > > the event of [2] Kees would be to/cc'd from folks running get_maintainer > > on _any_ file containing "__counted_by". The number of these files is > > rising and I fear for his inbox as his goal, as I understand it, is to > > simply monitor the introduction of new __counted_by annotations to > > ensure accurate semantics. > > Something like this (whether this series or a different approach) > would be helpful to me as well; we use K: to get cc'ed on patches > mentioning clang or llvm, but our ML also then ends up getting cc'ed > on every follow up patch to most files. > > This is causing excessive posts on our ML. As a result, it's a > struggle to get folks to cc themselves to the ML, which puts the code > review burden on fewer people. > > Whether it's a new D: or refinement to the behavior of K:, I applaud > the effort. Hopefully we can find an approach that works for > everyone. Yes, please! I would use this immediately -- there are a bunch of places where pstore, strings, hardening, etc all want review if certain functions or structures are changed in a patch, but we're not maintainers of the files they appear in. > > Justin Stitt (3): > > MAINTAINERS: add documentation for D: > > get_maintainer: add patch-only pattern matching type Can we squash these two changes together, and then likely add some patches for moving things out of K: ?
On Wed, Sep 27, 2023 at 03:19:14AM +0000, Justin Stitt wrote: > Document what "D:" does. > > This is more or less the same as what "K:" does but only works for patch > files. > > See [3/3] for more info and an illustrative example. > --- > MAINTAINERS | 3 +++ > 1 file changed, 3 insertions(+) > > diff --git a/MAINTAINERS b/MAINTAINERS > index b19995690904..de68d2c0cf29 100644 > --- a/MAINTAINERS > +++ b/MAINTAINERS > @@ -59,6 +59,9 @@ 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: *Content regex* (perl extended) pattern match patches only. > + Usage same as K:. > + The "emphasis" tags here are used when rendering: https://docs.kernel.org/process/maintainers.html In this case, I assume "D" is inspired by "Diff", so perhaps reword this to get a proper emphasis hint, and add additional context: 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).
On Wed, 2023-09-27 at 03:19 +0000, Justin Stitt wrote: > Add the "D:" type which behaves the same as "K:" but will only match > content present in a patch file. Likely it'd be less aggravating just to document that K: is only for patches and add a !$file test.
On Wed, 2023-09-27 at 09:15 -0700, Kees Cook wrote: > On Wed, Sep 27, 2023 at 03:19:16AM +0000, Justin Stitt wrote: > > 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 <hansolo@rebelalliance.co> > > 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) > > > > Note that folks really shouldn't be using get_maintainer on tree files > > anyways [1]. > > > > [1]: https://lore.kernel.org/all/20230726151515.1650519-1-kuba@kernel.org/ > > As Greg suggested, please drop the above paragraph and link. Then this > looks good to me. > > I would immediately want to send this patch too, so please feel free to > add this to your series (and I bet many other hints on "git grep 'K:.\\b'" > would want to switch from K: to D: too): > > diff --git a/MAINTAINERS b/MAINTAINERS [] > @@ -5057,7 +5057,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 etc... My assumption is that the K: --file use is just unnecessary and it'd be better to only use the K: lookup on patches. (and I've somehow stuffed up the receiving side of my email configuration so please ignore any emails to me that bounce for a while)