Message ID | 20230925172037.work.853-kees@kernel.org |
---|---|
State | New |
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 r8csp1401744vqu; Mon, 25 Sep 2023 11:25:02 -0700 (PDT) X-Google-Smtp-Source: AGHT+IHzp57svt+z/d9llMYlPjPoFLw/5reWgi+UJdYalggf+odMmaIV/GUySnsj8n6ROnJtAToQ X-Received: by 2002:a05:6a21:18a:b0:13a:6bca:7a84 with SMTP id le10-20020a056a21018a00b0013a6bca7a84mr10660743pzb.44.1695666302149; Mon, 25 Sep 2023 11:25:02 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1695666302; cv=none; d=google.com; s=arc-20160816; b=TIodx3gPoYZIRIBNORX83Rj6rZkwRQp6F7WmAI4gUzL7TusG9Av4QNKVGLFZiQe+ge 16RX5BfcGUI+iQ40Sr5pQKXmQmEqP2qJ0ClAm44tXbb3poAOw9kdhYfk6C/OK2A2wnmE Yi4J5E6gBUIa02a2vP0l6E8pM+FqtrXYQiQFpawPsMluv8QPDGv1cWl8cwrjlws5yZ6J ZTjq1wcIVS9uMEr/KuC7cncOiy0JiI0me5JlzE8Zr6vRspK4gqlU3XEccs+UTWLW9Obu zGjaeKS7aNSWCh2rWhvdc2nJTobRiNU3srycK8SnYpUtBXk15ozxCpvHISWUFNGM+lp8 b7QQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:mime-version :message-id:date:subject:cc:to:from:dkim-signature; bh=kPLbH/Tf+wdfFPVL445Q4TNBVYOrnwBXbZL8JKEtuvw=; fh=kwDGra7vorGCllK5bf0hEnY6UBAhOu2fmaGgLJu9riw=; b=fMfSVUFWyb9ogXMJ0SAqMOQjXAQlsmAmnIOUk0uH/si4Tj+5RZdAdV7J7Z6FZgkXn3 vU9QoKD0wZHNwgpcD+T5XU/5vqWwpLPwIh1G7eJUBlaR6kHqrUBxs9TreJkWHRFvjrgS o4I82WeqFzFa9qsVA81XYUb1VqOKTIXhTJ5ZbX3HNDBlVmqxGQYfthffeJ9EUUWduIou oUn+aXiiJiBLNsR7mqhtMWwWcA6hjdzRns9AP3nyvAoN2TGQw3m/gEDv7bmMAhZ08Z0M Za7n67gSFY25B8hQcfiXCakMGXOjI1o6ti203Y/F7WBZB9oswcJItGQOMYz4VKrmCaUU 7mpg== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@chromium.org header.s=google header.b=iu+sNNU2; 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=NONE sp=NONE dis=NONE) header.from=chromium.org Received: from snail.vger.email (snail.vger.email. [23.128.96.37]) by mx.google.com with ESMTPS id z14-20020a17090ad78e00b002772f04f9bfsi5787668pju.113.2023.09.25.11.25.01 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 25 Sep 2023 11:25:02 -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=@chromium.org header.s=google header.b=iu+sNNU2; 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=NONE sp=NONE dis=NONE) header.from=chromium.org Received: from out1.vger.email (depot.vger.email [IPv6:2620:137:e000::3:0]) by snail.vger.email (Postfix) with ESMTP id D2287813EAA7; Mon, 25 Sep 2023 10:20:53 -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 S232957AbjIYRUy (ORCPT <rfc822;pusanteemu@gmail.com> + 29 others); Mon, 25 Sep 2023 13:20:54 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:50624 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229437AbjIYRUw (ORCPT <rfc822;linux-kernel@vger.kernel.org>); Mon, 25 Sep 2023 13:20:52 -0400 Received: from mail-pl1-x62d.google.com (mail-pl1-x62d.google.com [IPv6:2607:f8b0:4864:20::62d]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 8F109107 for <linux-kernel@vger.kernel.org>; Mon, 25 Sep 2023 10:20:46 -0700 (PDT) Received: by mail-pl1-x62d.google.com with SMTP id d9443c01a7336-1c5bbb205e3so62783005ad.0 for <linux-kernel@vger.kernel.org>; Mon, 25 Sep 2023 10:20:46 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=chromium.org; s=google; t=1695662446; x=1696267246; darn=vger.kernel.org; h=content-transfer-encoding:mime-version:message-id:date:subject:cc :to:from:from:to:cc:subject:date:message-id:reply-to; bh=kPLbH/Tf+wdfFPVL445Q4TNBVYOrnwBXbZL8JKEtuvw=; b=iu+sNNU2PCMSdc4vDSJEV2lj2fW8yaSajEyyasj4YQhtXfTprLeHrZcg8Lw2mypyJ8 kVyEspUVRx45v13jeTtRS9/p1wUN/TuB0aTukwJcFKSvPJ+SOxeEDK3gdN6DnQZm2sxB nm0jWge5ktkN6/shuGjvoxbWv/q8hUBQ7q3Ig= X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1695662446; x=1696267246; h=content-transfer-encoding:mime-version:message-id:date:subject:cc :to:from:x-gm-message-state:from:to:cc:subject:date:message-id :reply-to; bh=kPLbH/Tf+wdfFPVL445Q4TNBVYOrnwBXbZL8JKEtuvw=; b=wYtPKRXw3F3efNE3rzuSAWTozvtiKWh62Ls7I8LxuuGeExZiSqtTO/JX7nLUeoq7kU ZwY67fQaLCMlqVYwE+kHb2MRkuJinQSRqUab2u+P5SJfcDDHq6kiaAYSfqiV3IT9YBbh kgfSQ+/L9400gCbql4u3xyMeE0kiUYkdFwi74l4y5esFpZe6xvkLUDaoVJ5BNBPCV1ck BPL9t7IHnArbLDYFYJodnvTaEHNwgYL26GQAN00GkfsQe7NHJ3NS20YfTkVwgHsmTi2G h3yxBtNAqljTEhc3YryCjU3YfcoxDWv3AyvQZjxfebgdFei+W/Ctj+xxD+XJ7dbAIVJ0 oMfQ== X-Gm-Message-State: AOJu0YxHSV7wmDJ0FkoqXnkZkmmSt8T9H24UB0kl8p7ejG5B+a44nuhb FnEBpAqkOyAmJdUO7Ekx9Aw8OQ== X-Received: by 2002:a17:902:ab1a:b0:1b6:6f12:502e with SMTP id ik26-20020a170902ab1a00b001b66f12502emr7369227plb.49.1695662446062; Mon, 25 Sep 2023 10:20:46 -0700 (PDT) Received: from www.outflux.net (198-0-35-241-static.hfc.comcastbusiness.net. [198.0.35.241]) by smtp.gmail.com with ESMTPSA id u5-20020a170902b28500b001c62b9a51a4sm202654plr.239.2023.09.25.10.20.45 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 25 Sep 2023 10:20:45 -0700 (PDT) From: Kees Cook <keescook@chromium.org> To: Kees Cook <keescook@chromium.org> Cc: linux-kernel@vger.kernel.org, linux-hardening@vger.kernel.org Subject: [PATCH] MAINTAINERS: hardening: Add __counted_by regex Date: Mon, 25 Sep 2023 10:20:41 -0700 Message-Id: <20230925172037.work.853-kees@kernel.org> X-Mailer: git-send-email 2.34.1 MIME-Version: 1.0 X-Developer-Signature: v=1; a=openpgp-sha256; l=680; i=keescook@chromium.org; h=from:subject:message-id; bh=rAmWngsH0Gjx5R0B8Ys0oawcRtQO9WskXs2KSeiUA0Q=; b=owEBbQKS/ZANAwAKAYly9N/cbcAmAcsmYgBlEcFpTbJw89m25nOYSCFD8DEggHluPsQVN8XIj Dd0XtZOxYaJAjMEAAEKAB0WIQSlw/aPIp3WD3I+bhOJcvTf3G3AJgUCZRHBaQAKCRCJcvTf3G3A JliCD/wOfGWDGI4gYxLuP8jKyzmW7RXSI+PJQ5RlwWdPQlrIl+Us8l+/HAoEMqpJ1Ax5Mr3h0+x NpwgnoB1lpv8enkEOTwaZ4CFp8evfv3MwpQhCKJkXKBCix69B+PvOAb2msqVAvT//xFUIUha5go /YuGCwJ9gEMBzY1aJf0AHMZCZi8FhcjxnSy4Wi+SF6l6L4AXqvyW5UwQFJ2bqnUt/i87GeQ7OUu PQ8R7a+yyVGFxJE7W8pZYFNaslP4M7/wpxCBgnR8eLry38r7xYswvFxxK+6IRF0vyG6Oj0Lqy3P Ri2YDmzYXl7+uFLDOmCvVCcpQj2gzlHlwVvhj+q1mo2C0h+QC/wXVj3C+I/ESWFaUXvV9Vw+h/X S9ACAHO6c1vswtu6XHKGj0EQDeb7oUvwh2c2QCo0CB82c/7KxqJ2YhX6ZACogah01ILQfBuxCH+ lCTidggRtPjrcqzAP2n/UYOhRslJgcZWUav64Vj+KcPtg1ub2UBHURQOrjuvpjQC+iCtr61jOjy RkzDM9adZPgS51Tg0EVtDIL4BewxrrgohkdaPd0vFKwlVi/uW9EJ7hP9v0ZA4mcGLPzjBhviR8Q mSrf0DiCHqEFZoNdIyT0gZZAYVnYJfw/xUHv1XTozZ3UfMrzQQamRvLsAUMZnX87iXmQIxcMgUR hk5tj/uB DMwrDKw== X-Developer-Key: i=keescook@chromium.org; a=openpgp; fpr=A5C3F68F229DD60F723E6E138972F4DFDC6DC026 Content-Transfer-Encoding: 8bit X-Spam-Status: No, score=-2.1 required=5.0 tests=BAYES_00,DKIMWL_WL_HIGH, DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF, RCVD_IN_DNSWL_BLOCKED,SPF_HELO_NONE,SPF_PASS autolearn=unavailable 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]); Mon, 25 Sep 2023 10:20:53 -0700 (PDT) X-getmail-retrieved-from-mailbox: INBOX X-GMAIL-THRID: 1778034988652720486 X-GMAIL-MSGID: 1778034988652720486 |
Series |
MAINTAINERS: hardening: Add __counted_by regex
|
|
Commit Message
Kees Cook
Sept. 25, 2023, 5:20 p.m. UTC
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 <keescook@chromium.org>
---
MAINTAINERS | 1 +
1 file changed, 1 insertion(+)
Comments
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 <keescook@chromium.org> > --- > 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. 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 you'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
On Tue, Sep 26, 2023 at 1:57 PM Eric Biggers <ebiggers@kernel.org> 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 <keescook@chromium.org> > > --- > > 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. 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 you'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
On Tue, Sep 26, 2023 at 5:35 PM Justin Stitt <justinstitt@google.com> wrote: > > On Tue, Sep 26, 2023 at 1:57 PM Eric Biggers <ebiggers@kernel.org> 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 <keescook@chromium.org> > > > --- > > > 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 = 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 = 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 you'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
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 KERNEL JANITORS L: kernel-janitors@vger.kernel.org