Received: by 2002:a05:7412:2a8c:b0:e2:908c:2ebd with SMTP id u12csp1944186rdh; Tue, 26 Sep 2023 08:01:00 -0700 (PDT) X-Google-Smtp-Source: AGHT+IG2czbxZs0bS4uWFbogHGvJLfrSaYqRC/45GL83HPfHopR+OgjnpGohpfTA04UZgQXpI40U X-Received: by 2002:a17:90b:b83:b0:267:faf1:21bb with SMTP id bd3-20020a17090b0b8300b00267faf121bbmr7255717pjb.15.1695740459943; Tue, 26 Sep 2023 08:00:59 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1695740459; cv=none; d=google.com; s=arc-20160816; b=vqH7Fm4HRRC2/tKDQCMlY837NbbZvjPHAxPK3vYLygECwdko9s6ccVsn21lgCFWfVX OlO9535ffNdxdhQFxzi7HL/X74rXLKbNECDy0o+9tjOT8GgDdzIU4aJ0U8Ph+Kl2LOwa BOwC7uXnm5o/+0JCzQscxnWe97dp950kTlZa6hXhyr+XgETyFeUtKxaWLPQVcmSbBWOe uSUwAQCLVmbfstxmDhAjHWWLVYlZ4Z/TgQ452O0dbJGfQAmIvvWSsNvdrMW94/6rwPjy u1VTt2rfJHfwX8aDVEIldwmj0RhtEa/C0PiG4tm+KRqDcFUFU5oZ1AS4vr0DJ3nNnj4i jfaQ== 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=uFWrsoW4uNhqV0CxpxdAxPRUEmdQJwwmxY6JAL4tAZc=; fh=YS4skS6N6J6LaCvQh9RoGcRrJsZnYWmO3o3fwboBC+s=; b=A+daCNwQJI0btKyraChwxKDSMKBzB51iSfZRLNzVmvqHmhI4kq8lijjpiQFK7iUcb5 W5EouXSUyX/qtJPLQI4wvwlPbPC2bmzK+SqSy3w8ITP2LSnuO9NRp6o6aW3G5vXQcYy/ H+J9a0GZRk2Kzz5/pqnettPx8Bc4V8gHClSPO4Ewuu0cL/5CWrIrQDxGrOVHD2Rp62Os XCMLssWaBnsy7hjFCUybgRVJ3Ykj2llBm/yi4JQbEto2qb+g1sPI+dmlJcmKEr2TtSdy W7W/yGe2Veg9d7spe+6jzxDEgfJijws0UEjCdJuklV9vYp8qOOhf3opB/DgfnuEiIxG8 UW9Q== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@google.com header.s=20230601 header.b=4y76pwsS; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.36 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 pete.vger.email (pete.vger.email. [23.128.96.36]) by mx.google.com with ESMTPS id na5-20020a17090b4c0500b002613720fcd5si16620208pjb.35.2023.09.26.08.00.59 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 26 Sep 2023 08:00:59 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.36 as permitted sender) client-ip=23.128.96.36; Authentication-Results: mx.google.com; dkim=pass header.i=@google.com header.s=20230601 header.b=4y76pwsS; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.36 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 pete.vger.email (Postfix) with ESMTP id B43CC817732D; Tue, 26 Sep 2023 01:41:40 -0700 (PDT) X-Virus-Status: Clean X-Virus-Scanned: clamav-milter 0.103.10 at pete.vger.email Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S233986AbjIZIll (ORCPT + 99 others); Tue, 26 Sep 2023 04:41:41 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:40028 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229725AbjIZIlk (ORCPT ); Tue, 26 Sep 2023 04:41:40 -0400 Received: from mail-ej1-x633.google.com (mail-ej1-x633.google.com [IPv6:2a00:1450:4864:20::633]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 1DADD97 for ; Tue, 26 Sep 2023 01:41:33 -0700 (PDT) Received: by mail-ej1-x633.google.com with SMTP id a640c23a62f3a-9ad810be221so1030564466b.2 for ; Tue, 26 Sep 2023 01:41:33 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=20230601; t=1695717691; x=1696322491; 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=uFWrsoW4uNhqV0CxpxdAxPRUEmdQJwwmxY6JAL4tAZc=; b=4y76pwsSHQ1jolHRYQ9LBmyEoooVg5c6W0oMp675RqvV5Vv9Shbd4FP/PYdA0Ds5Lb OvxOYgrZnnvjqkyoYbK6ELnTm94uXfAmuORz8gxCWu4WsrGtJN8KjrIYcp6STosOlSCS 7jRanLsqujZ+l5fktqpQB66OdEeuH0aCuGqqr3j9TnjPC+ji3LY7iBfulXdaJZBkKqtX cjysTbNajf6Y58STfRf7JZ758Lsa6mDku0J0MZMzfZLmK6uo0XlEkj6XfMTjWP9PgrDx QZYLVoWgcUluLd6YItUHAH2HbtYMkv0H4My0/SNExOX2eFncUIwrQuu0q/wH/VUEq1gO S57g== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1695717691; x=1696322491; 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=uFWrsoW4uNhqV0CxpxdAxPRUEmdQJwwmxY6JAL4tAZc=; b=O2ZgEIFYDXO8sSRhAQZXSd4bp1wD83wvdVsZWIyXy8qqQwZVrVOfOfE1FGpoAgABGJ Ec4vD0NXMMOkC4zBBqbtnuMajucPfPS1rnmumvIwdUOLJvOncYqca3oFbmP5JPCgRHfw NmFH4mDIx9YIksqFtr8eOvutX2qDpKpqMa1GsIcVypUiQhVI9/unK//OG5BUj/Emxz3w /cjl5ZW00UbI4qsbSxnNLaJLojOyabNN0KOwOwsplHCpgjjlRXfljvM1/BJjsRlLldkH ngFS8gcRyYT6rdeiFLt2CdAaqOlesbaVjTPH5D1Y6jN8PS0vB8sn0rZTMMtVS3NTY5D+ 3fKA== X-Gm-Message-State: AOJu0Yzb3cEHK13NDt3VN79j+HuGGvFTTJcH5tfKQ80h1Whez6FR+t5I 2fz1kYEHep+n/QzDt7hLzr5xsK9qneTdqzDGfOxmIQ== X-Received: by 2002:a17:906:2202:b0:9a4:88af:b7b with SMTP id s2-20020a170906220200b009a488af0b7bmr8190922ejs.62.1695717691523; Tue, 26 Sep 2023 01:41:31 -0700 (PDT) MIME-Version: 1.0 References: <20230925172037.work.853-kees@kernel.org> <20230926045721.GA3118@sol.localdomain> In-Reply-To: From: Justin Stitt Date: Tue, 26 Sep 2023 17:41:19 +0900 Message-ID: Subject: Re: [PATCH] MAINTAINERS: hardening: Add __counted_by regex To: Eric Biggers Cc: Kees Cook , linux-kernel@vger.kernel.org, linux-hardening@vger.kernel.org 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 pete.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 (pete.vger.email [0.0.0.0]); Tue, 26 Sep 2023 01:41:40 -0700 (PDT) On Tue, Sep 26, 2023 at 5:35=E2=80=AFPM Justin Stitt wrote: > > On Tue, Sep 26, 2023 at 1:57=E2=80=AFPM Eric Biggers wrote: > > > > Hi Kees, > > > > On Mon, Sep 25, 2023 at 10:20:41AM -0700, Kees Cook wrote: > > > Since __counted_by annotations may also require that code be changed = to > > > get initialization ordering correct, let's get an extra group of eyes= on > > > code that is working on these annotations. > > > > > > Signed-off-by: Kees Cook > > > --- > > > MAINTAINERS | 1 + > > > 1 file changed, 1 insertion(+) > > > > > > diff --git a/MAINTAINERS b/MAINTAINERS > > > index 737dcc7a2155..741285b8246e 100644 > > > --- a/MAINTAINERS > > > +++ b/MAINTAINERS > > > @@ -11405,6 +11405,7 @@ F: kernel/configs/hardening.config > > > F: mm/usercopy.c > > > K: \b(add|choose)_random_kstack_offset\b > > > K: \b__check_(object_size|heap_object)\b > > > +K: \b__counted_by\b > > > > > > > Are you sure you want to volunteer to maintain every file that contains > > "__counted_by"? That's what "K" does; get_maintainer.pl will list you = (and > > linux-hardening@vger.kernel.org) for every such file. > > Do people call get_maintainer.pl on specific tree files as opposed to > invoking it against a .patch file? In the event of the .patch file > "K:" should only pick-up what's in the patch and not read into the > files outside of the context that the diff provides. FWIW, b4 just uses the patches and not entire files: ... try: tos, ccs, tag_msg, patches =3D get_prep_branch_as_patches() except RuntimeError: logger.info('No commits in branch') return logger.info('Collecting To/Cc addresses') # Go through the messages to make to/cc headers for commit, msg in patches: if not msg or not commit: continue logger.debug('Collecting from: %s', msg.get('subject')) msgbytes =3D msg.as_bytes() ... > > If needed, I could send a patch adding a "D:" which would only > consider patches and not tree files -- reducing noise. > > > > > Other users of "K" have been surprised by this behavior. It seems that= most > > people expect it to only apply to patches, not to files. Given that yo= u're > > interested in using this functionality, have you considered updating > > checkpatch.pl to handle it in the way that you probably expect that it = works? > > > > - Eric > > > > Thanks > Justin