Received: by 2002:a05:7412:518d:b0:e2:908c:2ebd with SMTP id fn13csp530648rdb; Thu, 5 Oct 2023 13:06:25 -0700 (PDT) X-Google-Smtp-Source: AGHT+IGmTdBctzp2LQ4C9vh87FjBLr29Ylruz3G/JKDgwNeB5IO3GD0RhAoPUINfU1C7AlOAxahT X-Received: by 2002:a05:6a20:3d03:b0:15e:bb88:b76e with SMTP id y3-20020a056a203d0300b0015ebb88b76emr6761763pzi.14.1696536385463; Thu, 05 Oct 2023 13:06:25 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1696536385; cv=none; d=google.com; s=arc-20160816; b=evYJW5NWA8clSOaIHSVpODw6BRgrEJJphTGwKQEUVuueq/KU8jXQKkKSOM1JNnKtm0 LsXuqoPewf7ZVMDCYY6GG4V2R1gtf6WBRpcVgoGGoRMJHOLfA8f3fO0uGaQvcPmxLLHc sMNeroJ/zuPNx3FFUu3lwI0PlTNnj9apgSgrIHOVseuaJQ2/1GHgAKRbn0x9zGC53opr YyKjbGUVh35I54S03kdIVchvIYW8Eu5MnTAsnCtUV6Lr3A6WkEHqD+Skgzsp7NbwhQoL k4/ZFBZ/sIIJbJIdLIns/byn0ZcuvIOjx0elRkg7KFKlJ2yBlRnBkIvQpw3k5Fhutihw kLHg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:mime-version:user-agent :content-transfer-encoding:references:in-reply-to:date:cc:to:from :subject:message-id; bh=EmMysnRaVdBizNIayUWZhVpeg1zTpsgipdt4FqsRDwM=; fh=vCHp1B/yOxJybSYDuu2xEeOpLDVL/FilIk5XOdtpryM=; b=zdikPpOnVsL1EpwKplIKT52e3GYtQOnrm7efRPXXDHi9Ebbi5B5DMTQma2idl8vWQe TFJq13qX0gttQZKM42yHcbuLjEhAxZCHR7vAgskWygsmFVBCGv9FIX+TpZ3w5tiLVPF/ 1N6b8fiPFFwTNq37i2AsZK+ZiSUt+iSuIf2TPx/cT8AGoYzTZ+nV44XtXd4UJYREfiJv pQXj3sqoHpQM2bkefkKMO4o7Ng0wVW6CxmlxAo5kHZoz0+SQ4AHx0kEbtJGNrT6RDIBJ GhN4yifFfAPVVAERP9pc69uPiOzBvQqjMA35OkDz0cVevoqqwtuGO1k7G0GKeh8PPxe+ P+JA== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.31 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Return-Path: Received: from morse.vger.email (morse.vger.email. [23.128.96.31]) by mx.google.com with ESMTPS id r199-20020a632bd0000000b00578d7a3a4fdsi2096457pgr.563.2023.10.05.13.06.24 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 05 Oct 2023 13:06:25 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.31 as permitted sender) client-ip=23.128.96.31; Authentication-Results: mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.31 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: from out1.vger.email (depot.vger.email [IPv6:2620:137:e000::3:0]) by morse.vger.email (Postfix) with ESMTP id 01BA48078659; Thu, 5 Oct 2023 13:06:23 -0700 (PDT) X-Virus-Status: Clean X-Virus-Scanned: clamav-milter 0.103.10 at morse.vger.email Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S231837AbjJEUGE convert rfc822-to-8bit (ORCPT + 99 others); Thu, 5 Oct 2023 16:06:04 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:50074 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229500AbjJEUGD (ORCPT ); Thu, 5 Oct 2023 16:06:03 -0400 Received: from relay.hostedemail.com (smtprelay0011.hostedemail.com [216.40.44.11]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 7722ACE for ; Thu, 5 Oct 2023 13:05:58 -0700 (PDT) Received: from omf19.hostedemail.com (a10.router.float.18 [10.200.18.1]) by unirelay07.hostedemail.com (Postfix) with ESMTP id 72B9F160421; Thu, 5 Oct 2023 20:05:57 +0000 (UTC) Received: from [HIDDEN] (Authenticated sender: joe@perches.com) by omf19.hostedemail.com (Postfix) with ESMTPA id 1BE892002D; Thu, 5 Oct 2023 20:05:54 +0000 (UTC) Message-ID: Subject: Re: [PATCH] get_maintainer/MAINTAINERS: confine K content matching to patches From: Joe Perches To: Justin Stitt Cc: linux-kernel@vger.kernel.org, Kees Cook , Nick Desaulniers Date: Thu, 05 Oct 2023 13:05:53 -0700 In-Reply-To: References: <20231004-get_maintainer_change_k-v1-1-ac7ced18306a@google.com> <3dca40b677dd2fef979a5a581a2db91df2c21801.camel@perches.com> <6e13b9b1a964b49079a2f7814c0d65e767cd010a.camel@perches.com> Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: 8BIT User-Agent: Evolution 3.48.4 (3.48.4-1.fc38) MIME-Version: 1.0 X-Rspamd-Server: rspamout03 X-Rspamd-Queue-Id: 1BE892002D X-Stat-Signature: pwf4o46ayjstbkyxc9z58umnspw6hctt X-Spam-Status: No, score=-0.8 required=5.0 tests=HEADER_FROM_DIFFERENT_DOMAINS, MAILING_LIST_MULTI,SPF_HELO_NONE,SPF_PASS,UNPARSEABLE_RELAY autolearn=unavailable autolearn_force=no version=3.4.6 X-Session-Marker: 6A6F6540706572636865732E636F6D X-Session-ID: U2FsdGVkX1/1VlcfI30pytACJfVJd+MYNwCJK4b7g5I= X-HE-Tag: 1696536354-269339 X-HE-Meta: U2FsdGVkX1+WfrL/Nr/SqgpAzh0ggajZ0mOPMMrHUHfIroDj3aNY0pp04WVVAlpeFRzrXzYhTaQ+HRAN1VK7JjazQgHCnhdn8nYlEd/Ms2rv9llin/AlILVu2zBXh3q8MgyzRJb3lY9GgrrYC9sml/uihVH38p9RXc5Eb6dDdM/xvxAE36BgvPPkbemFCbyLwGN69dJ9d314PWsEtfJVi1vAlet4v2EyGT667m7vdqArQlsu0DfhD+D/G5zjUxyl3morSbdeVgVa3flbBvhsMBoTA2VG4msp1V56Xr5vgGczY4UafrX2E6w8Hf9c14VDXZosWgRe3k24LxZWqCFX1pBXj3r0QwanE+p4KZtwS8QCTiniCzTYgU+UFafw6dIg X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on morse.vger.email Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org X-Greylist: Sender passed SPF test, not delayed by milter-greylist-4.6.4 (morse.vger.email [0.0.0.0]); Thu, 05 Oct 2023 13:06:23 -0700 (PDT) On Thu, 2023-10-05 at 12:52 -0700, Justin Stitt wrote: > On Thu, Oct 5, 2023 at 11:42 AM Joe Perches wrote: > > > > On Thu, 2023-10-05 at 11:30 -0700, Justin Stitt wrote: > > > On Thu, Oct 5, 2023 at 11:15 AM Joe Perches wrote: > > > > > > > > On Thu, 2023-10-05 at 11:06 -0700, Justin Stitt wrote: > > > > > On Wed, Oct 4, 2023 at 7:40 PM Joe Perches wrote: > > > > > > > > > > > > On Wed, 2023-10-04 at 21:21 +0000, Justin Stitt wrote: > > > > > > > The current behavior of K: is a tad bit noisy. It matches against the > > > > > > > entire contents of files instead of just against the contents of a > > > > > > > patch. > > > > > > > > > > > > > > This means that a patch with a single character change (fixing a typo or > > > > > > > whitespace or something) would still to/cc maintainers and lists if the > > > > > > > affected file matched against the regex pattern given in K:. For > > > > > > > example, if a file has the word "clang" in it then every single patch > > > > > > > touching that file will to/cc Nick, Nathan and some lists. > > > > > > > > > > > > > > Let's change this behavior to only content match against patches > > > > > > > (subjects, message, diff) as this is what most people expect the > > > > > > > behavior already is. Most users of "K:" would prefer patch-only content > > > > > > > matching. If this is not the case let's add a new matching type as > > > > > > > proposed in [1]. > > > > > > > > > > > > I'm glad to know you are coming around to my suggestion. > > > > > :) > > > > > > > > > > > > > > > > > I believe the file-based keyword matching should _not_ be > > > > > > removed and the option should be added for it like I suggested. > > > > > > > > > > Having a command line flag allowing get_maintainer.pl > > > > > users to decide the behavior of K: is weird to me. If I'm a maintainer setting > > > > > my K: in MAINTAINERS I want some sort of consistent behavior. Some > > > > > patches will start hitting mailing list that DO have keywords in the patch > > > > > and others, confusingly, not. > > > > > > > > Not true. > > > > > > > > If a patch contains a keyword match, get_maintainers will _always_ > > > > show the K: keyword maintainers unless --nokeywords is specified > > > > on the command line. > > > > > > ... > > > > > > > > > > > If a file contains a keyword match, it'll only show the K: > > > > keyword if --keywords-in-file is set. > > > > > > Right, what I'm saying is a patch can arrive in a maintainer's inbox > > > wherein the patch itself has no mention of the keyword (if > > > get_maintainer user opted for --keywords-in-file). Just trying to > > > avoid some cases of the question: "Why is this in my inbox?" > > > > Because the script user specifically asked for it. > > > > > > > To note, we get some speed-up here as pattern matching a patch that > > > > > touches lots of files would result in searching all of them in their > > > > > entirety. Just removing this behavior _might_ have a measurable > > > > > speed-up for patch series touching dozens of files. > > > > > > > > Again, not true. > > > > > > > > Patches do _not_ scan the original modified files for keyword matches. > > > > Only the patch itself is scanned. That's the current behavior as well. > > > > > > > > > > Feel like I'm missing something here. How is K: matching keywords in > > > files without reading them. > > > > > > If my patch touches 10 files then all 10 of those files are scanned for > > > K: matches right? > > > > Nope. > > > > Understand the patches are the input to get_maintainer and not > > just files. > > > > If a patch is fed to get_maintainer then any files modified by > > the patch are _not_ scanned. > > > > Only the patch _content_ is used for keyword matches. > > > > Got it. I'll roll your patch into a v3. > Actually, I have a slightly improved patch as the actual keyword is shown too. I'll get it uploaded and make sure you are credited with the effort to make the change. cheers, Joe