Received: by 2002:a05:7412:518d:b0:e2:908c:2ebd with SMTP id fn13csp533038rdb; Thu, 5 Oct 2023 13:11:26 -0700 (PDT) X-Google-Smtp-Source: AGHT+IHxq43r2f0UmGBlfEJcM+Hc/tR1iTeKP8+JCVZM+iSnMnwNrRBNFugrYsNSoPwuSERxSSEJ X-Received: by 2002:a05:6830:16:b0:6c0:abdd:a875 with SMTP id c22-20020a056830001600b006c0abdda875mr6684940otp.18.1696536686126; Thu, 05 Oct 2023 13:11:26 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1696536686; cv=none; d=google.com; s=arc-20160816; b=MFQokFPPzAS1R5Y3a7loB8VzUgRjuh1zrM1dWVBwc01glBYCuMaievE3coYS/JCyeV i0a96vWcsJ1N5UrnZNnLe0NGQFgHLmCd39h3QY+OWSljBaT0X1rIJiDwWncyKtaQGcXV CGdZazYpHrljaB64/jPXn6h6tAnQu2Q1rqgZjtPCB70p2o1UnGDupzg/ivR4kdDMIwI/ ZGjjKJ02+YAf5sej4epD3cAX6MoFb0j7iyIxsSe4WnatV/cUYkb+BUUO1U25idsNzqeJ PKaJw0tm8t23gBX+Mz3q/4Nu1+acsLhUxqpLj1/KOrqdsq4w5/Yvoxwofz0UqgVxJi6F tDUw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:cc:to:subject :message-id:date:from:in-reply-to:references:mime-version :dkim-signature; bh=SDEWPhSFZT2wrr3lmK3HQACNYGeh2PGdg05lzm75XYw=; fh=xz4t0FARxk3fQoNEXBqfbbqibQ6R+uu4o6PLQyC/fT8=; b=lcjwmj/CMl+R1l2KWQJdg83CnU8P9G32IFt4HVRtO6OwHE5DOBJYPUlkW8ZSxw5PhJ H7xAB5Sm7RpQe57rKN9d1zzOGPPLsYotI7toCN5ws5dySW+yh3MTmpakFC+aBWUXThAD iPTCU7l53CBN+cqdatv9PiFVpfcRLPXYmc5NU3SLXuDfv9uex7Nh0BlngQG4WiHrjniM EZz4tzG9EeTyN6y+hvAN9ZLZ3ln8C31ZiRzQqD7RNE8FDRnV1+guCN6EH+97M4+3DfST IGR0AMvZpuerpjBHKVAr2TdAZnXpJ+anDvjmzNNkl9RAZEGqbcG6geXirbe7ja37zHDm w5Rw== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@google.com header.s=20230601 header.b=ZyxS2oNY; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.35 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=REJECT sp=REJECT dis=NONE) header.from=google.com Return-Path: Received: from groat.vger.email (groat.vger.email. [23.128.96.35]) by mx.google.com with ESMTPS id bk13-20020a056a02028d00b0055fd1bfb109si2052069pgb.679.2023.10.05.13.11.25 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 05 Oct 2023 13:11:26 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.35 as permitted sender) client-ip=23.128.96.35; Authentication-Results: mx.google.com; dkim=pass header.i=@google.com header.s=20230601 header.b=ZyxS2oNY; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.35 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 groat.vger.email (Postfix) with ESMTP id 7CC8B80990FF; Thu, 5 Oct 2023 13:10:55 -0700 (PDT) X-Virus-Status: Clean X-Virus-Scanned: clamav-milter 0.103.10 at groat.vger.email Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S231229AbjJEUKo (ORCPT + 99 others); Thu, 5 Oct 2023 16:10:44 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:48858 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229483AbjJEUKn (ORCPT ); Thu, 5 Oct 2023 16:10:43 -0400 Received: from mail-ed1-x536.google.com (mail-ed1-x536.google.com [IPv6:2a00:1450:4864:20::536]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 84AC8E4 for ; Thu, 5 Oct 2023 13:10:41 -0700 (PDT) Received: by mail-ed1-x536.google.com with SMTP id 4fb4d7f45d1cf-5347e657a11so2385631a12.2 for ; Thu, 05 Oct 2023 13:10:41 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=20230601; t=1696536640; x=1697141440; darn=vger.kernel.org; h=content-transfer-encoding:cc:to:subject:message-id:date:from :in-reply-to:references:mime-version:from:to:cc:subject:date :message-id:reply-to; bh=SDEWPhSFZT2wrr3lmK3HQACNYGeh2PGdg05lzm75XYw=; b=ZyxS2oNYLc1SjY9u5UhomTI2VO1W6BPg0xWKcJAMXGA8eX0e0z1QgSxbQdI3kyl/o5 P24Dq6ejvaiU2gLVEbruuaKxJ3KMhnp/6UfbHgx3y1d+XMejob82saUTU1zHUBem1OZB RRVF/LY6wO0RbwYmV8cR/DPv4yjspwWzH7eG99nF1/dOpiuy8AEg06iTAaqbmyz4ezSH BEA6y1zT363b7kTgn/ui/XCgNz/W/p9xTf4SeBdp2hQvZGO4VA3QR9DM5q2WinIrTwCc H3Y9tbLWYUI57lrOk+vH+YoSOqQWi/6ltyKdO0E/H3o+mcZD86GpPfFCylVWeYh8wKIK U3tQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1696536640; x=1697141440; h=content-transfer-encoding:cc:to:subject:message-id:date:from :in-reply-to:references:mime-version:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=SDEWPhSFZT2wrr3lmK3HQACNYGeh2PGdg05lzm75XYw=; b=qVSvVNJZGIZg3eSY2VglHge/77maZq2k9UEgV349KGK0vb6V4Xzf8AEujjjPnNga3B qBImj9OVolQpQ1w/SiAOx/0g4Vnja8mTDNCLtPTGsneyjYs3LIxdkb80mWlbZV6kAnHs qECVnti0QMZB6M/P6a83HjrZLtgm097xCh6Rr2/+dbXz/F4Fy+hRWVHvyohaTADnmSWy EgWolt3p/HZQg8/wV038N6Mp/Z2exw3/22i+QpOvwpe16ID/UeU2jVAnEUEV8MYtsvgF UwbGVv6lfWSjKQJMmaWDcV9LvsX1s3PhmhSrCl9JRm3KHN5dLZT3awh5bjPNLivRa8aX p1/Q== X-Gm-Message-State: AOJu0Yy7k7iMDGLUUir7962wQ+gAYLyckfUWV2aosOppC+19hW3/LhNy FJHx6IQ4Iytqk1Cc3n47nSG3biLZEIOst33NRocL9w== X-Received: by 2002:aa7:d503:0:b0:538:ae5:6138 with SMTP id y3-20020aa7d503000000b005380ae56138mr6430924edq.34.1696536639868; Thu, 05 Oct 2023 13:10:39 -0700 (PDT) MIME-Version: 1.0 References: <20231004-get_maintainer_change_k-v1-1-ac7ced18306a@google.com> <3dca40b677dd2fef979a5a581a2db91df2c21801.camel@perches.com> <6e13b9b1a964b49079a2f7814c0d65e767cd010a.camel@perches.com> In-Reply-To: From: Justin Stitt Date: Thu, 5 Oct 2023 13:10:28 -0700 Message-ID: Subject: Re: [PATCH] get_maintainer/MAINTAINERS: confine K content matching to patches To: Joe Perches Cc: linux-kernel@vger.kernel.org, Kees Cook , Nick Desaulniers Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable X-Spam-Status: No, score=-8.4 required=5.0 tests=DKIMWL_WL_MED,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,HEADER_FROM_DIFFERENT_DOMAINS, MAILING_LIST_MULTI,SPF_HELO_NONE,SPF_PASS,USER_IN_DEF_DKIM_WL autolearn=unavailable autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on groat.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 (groat.vger.email [0.0.0.0]); Thu, 05 Oct 2023 13:10:55 -0700 (PDT) On Thu, Oct 5, 2023 at 1:05=E2=80=AFPM Joe Perches wrote: > > On Thu, 2023-10-05 at 12:52 -0700, Justin Stitt wrote: > > On Thu, Oct 5, 2023 at 11:42=E2=80=AFAM Joe Perches w= rote: > > > > > > On Thu, 2023-10-05 at 11:30 -0700, Justin Stitt wrote: > > > > On Thu, Oct 5, 2023 at 11:15=E2=80=AFAM Joe Perches wrote: > > > > > > > > > > On Thu, 2023-10-05 at 11:06 -0700, Justin Stitt wrote: > > > > > > On Wed, Oct 4, 2023 at 7:40=E2=80=AFPM 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 a= gainst the > > > > > > > > entire contents of files instead of just against the conten= ts of a > > > > > > > > patch. > > > > > > > > > > > > > > > > This means that a patch with a single character change (fix= ing 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 si= ngle patch > > > > > > > > touching that file will to/cc Nick, Nathan and some lists. > > > > > > > > > > > > > > > > Let's change this behavior to only content match against pa= tches > > > > > > > > (subjects, message, diff) as this is what most people expec= t 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 suggeste= d. > > > > > > > > > > > > Having a command line flag allowing get_maintainer.pl > > > > > > users to decide the behavior of K: is weird to me. If I'm a mai= ntainer setting > > > > > > my K: in MAINTAINERS I want some sort of consistent behavior. S= ome > > > > > > patches will start hitting mailing list that DO have keywords i= n 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 inbo= x > > > > 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 mat= ches. > > > > > 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 i= n > > > > 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. > Dang, we just collided in mid-air. I just sent a new patch. Let's disregard my patch that was sent. Thanks for the efforts here. I appreciate it. > cheers, Joe Thanks Justin