Received: by 2002:a05:7412:518d:b0:e2:908c:2ebd with SMTP id fn13csp524129rdb; Thu, 5 Oct 2023 12:53:04 -0700 (PDT) X-Google-Smtp-Source: AGHT+IFP77UBH4NsZ5aZaYLcSe3MqZbCfFoOuVU9wRwiW7mqjwR3bDZcN3eo/WGq8W/DMnoxNrXL X-Received: by 2002:a17:902:ecc9:b0:1c1:f15c:976f with SMTP id a9-20020a170902ecc900b001c1f15c976fmr6774780plh.26.1696535584386; Thu, 05 Oct 2023 12:53:04 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1696535584; cv=none; d=google.com; s=arc-20160816; b=piwcD/3cUhafCy8as/eQDRG5Jh9TihnO1Kqnksv1bt2G+mj7wtp4uOdnkxOmlmGhZ/ D/LdSYWO8wPnmlD5alsVa2xWPREcs84DTiac8K1EqKb98WLZc9wSetnugcMRqwjLmYIO 3E9VO3kkJlivcYobOEDAgMVzo0I3uTDA/ch2VlL5FuW7Zt8jo31eUaxtqfI+hI3UgHgc ktfIuKy3c/koaD6Vr5+7SU17KaYF1C0gPiMDZGy771O5IyDVqpl9YAi1QRX9hcL8BOMo C3Nhy3NsHAFi0KuCWWZnm7XPvxptgO9BK1Od5Hl77kUOwCEFCWWfoXj96aSuQvrLFmTx haJw== 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=FxDtktB+suAurP27xOoQABfqd/VT1E6iw5B33oUMYZQ=; fh=xz4t0FARxk3fQoNEXBqfbbqibQ6R+uu4o6PLQyC/fT8=; b=tZk75clMhKV+pe2oCL6B8zLbmk/VTjQ/UFKktFi5mp0V9LRITW+yPLqQZ259cV64o6 Ecsmi+3SsYebF/W5iiKohBpCjzmGKsqsg5PBKy1bmJeRrPVnupmgIb4VsFJ5m4YN5s9N Et1M+nssFblr0Msu11SQFHuYx7wE3P/ulGuVcDPFSCXjvCmkjkNeaMo4Wj+VrDSA5ho3 GNnEKb4yjOxM01SEedahBvDwz+g00trIt9ef/yZfWKSi/8rw55Lng1qMS9CiGdBXlxms 5fKmMZdMgdzdjpoItEPK5YzcqjnxES3eJmYIWuqZpPS8wloRB6BkepaGfjzl2LAdSg2g rhAw== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@google.com header.s=20230601 header.b=Z3VjpX+W; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.37 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 snail.vger.email (snail.vger.email. [23.128.96.37]) by mx.google.com with ESMTPS id x6-20020a170902a38600b001c5f9de7a35si2053242pla.109.2023.10.05.12.53.03 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 05 Oct 2023 12:53:04 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.37 as permitted sender) client-ip=23.128.96.37; Authentication-Results: mx.google.com; dkim=pass header.i=@google.com header.s=20230601 header.b=Z3VjpX+W; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.37 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 88ABF8364D63; Thu, 5 Oct 2023 12:53:01 -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 S231614AbjJETwv (ORCPT + 99 others); Thu, 5 Oct 2023 15:52:51 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:53468 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229437AbjJETwu (ORCPT ); Thu, 5 Oct 2023 15:52:50 -0400 Received: from mail-ej1-x635.google.com (mail-ej1-x635.google.com [IPv6:2a00:1450:4864:20::635]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 26B3FCE for ; Thu, 5 Oct 2023 12:52:48 -0700 (PDT) Received: by mail-ej1-x635.google.com with SMTP id a640c23a62f3a-9ada2e6e75fso258841466b.2 for ; Thu, 05 Oct 2023 12:52:48 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=20230601; t=1696535566; x=1697140366; 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=FxDtktB+suAurP27xOoQABfqd/VT1E6iw5B33oUMYZQ=; b=Z3VjpX+WiZ31yf3GivCjjyE01cCcmRAKGK9RONxSKea/zlvMzgc2NNuw8iy5DCJ2hW ZM5qh03qAUwAOA/BZBBSmo8K+PaIMOsBGRmyhu0owsWNz4PZKUDxh8PWR+wR0VMRY/Bc 0zZs5EFjboWMuANe1vRdDBmuRZSlSoth1XKe7PGs5/4NxhjLHJ0FUeCUoNrVCUIPGiTL rRTGa3E79OW4FxARCoJEeRs9MitzsLp1TKr2/TPHiuWYTYoNwDG96fBX879Q8+yiqFTC 835OSQrtXKKxsiaDidzuH2oc0xZBz3yEGmS42lkU9yPjc94x2SpSH/hu1xam7/uMJddf OWuQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1696535566; x=1697140366; 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=FxDtktB+suAurP27xOoQABfqd/VT1E6iw5B33oUMYZQ=; b=Lm0BUU+aB35w137M2Fy76J/qAzObBSq1FRsyNEm0l4oe4oOzLYAFacZdVSQFydxOiN IFd6MHpeTXwBhLHkT/ivLgM72FBU5hMUsJ/txIlac0lOsxo+BcNDfQT+/2rAgHAI7AV1 XgYLcZKRZQO5D07BsNfCyemDlKhg8NGPfs6evyFMt9swk7aXyI3QQCaTeJteTxOL+Qn0 fQ8ZDprTifQv04rYG6eqHpth9XN9apEB121nlk1tsMep+trDQ5eSwc2FWc/ZojA0L1Ru Ylm0z/B5J4+K+0xKEaK4/FDeLi1xIoliieGm1SaKkiU9PrVlE9Sm6iyd4paoFclN2ABC N3Ww== X-Gm-Message-State: AOJu0Ywm/WemYd5cTQeMYL1VQ/FBcTB5UlUprWxeSTCU1YIgVe/uCFii hu6SPMiq43yV/NsVlJLtLdB1Usp6duoJUPAEfEeHiw== X-Received: by 2002:a17:906:3012:b0:9ae:4054:5d2a with SMTP id 18-20020a170906301200b009ae40545d2amr5322327ejz.16.1696535566465; Thu, 05 Oct 2023 12:52:46 -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 12:52:34 -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,T_SCC_BODY_TEXT_LINE, 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 snail.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 (snail.vger.email [0.0.0.0]); Thu, 05 Oct 2023 12:53:01 -0700 (PDT) On Thu, Oct 5, 2023 at 11:42=E2=80=AFAM Joe Perches wrote= : > > 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 w= rote: > > > > > > 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 again= st the > > > > > > entire contents of files instead of just against the contents o= f 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 list= s if the > > > > > > affected file matched against the regex pattern given in K:. Fo= r > > > > > > 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 patche= s > > > > > > (subjects, message, diff) as this is what most people expect th= e > > > > > > 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 maintai= ner setting > > > > my K: in MAINTAINERS I want some sort of consistent behavior. Some > > > > patches will start hitting mailing list that DO have keywords in th= e 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 thei= r > > > > 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 wel= l. > > > > > > > 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. Thanks Justin