linux-security-module.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Mimi Zohar <zohar@linux.ibm.com>
To: Gaosheng Cui <cuigaosheng1@huawei.com>,
	dmitry.kasatkin@gmail.com, paul@paul-moore.com,
	jmorris@namei.org, serge@hallyn.com
Cc: linux-integrity@vger.kernel.org,
	linux-security-module@vger.kernel.org,
	linux-kernel@vger.kernel.org
Subject: Re: [PATCH -next 1/4] ima: Use DECLARE_FLEX_ARRAY() helper in ima_modsig
Date: Fri, 23 Sep 2022 16:28:28 -0400	[thread overview]
Message-ID: <0f9387c9ceec0819de7bdb8b3635af8fa8236973.camel@linux.ibm.com> (raw)
In-Reply-To: <20220905075837.1083216-2-cuigaosheng1@huawei.com>

Hi Gaosheng,

Thank you for the patches.

On Mon, 2022-09-05 at 15:58 +0800, Gaosheng Cui wrote:
> Zero-length arrays are deprecated and we are moving towards adopting
> C99 flexible-array members instead. So, replace zero-length array
> declaration with the new DECLARE_FLEX_ARRAY() helper macro in struct
> modsig.
> 
> This helper allows for a flexible-array member in a union.
> 
> Link: KSPP#21
> Link: KSPP#193
> Link: KSPP#197

The above shortened link is a bit confusing.  The #193 complete link is
mentioned in the cover letter.  In all cases being modified the "[]" 
notation is used.  Is this a boiler plate patch description or are all
three of these links really applicable to each of the patches?  

- Eliminate fake flexible arrays from the kernel ("variable length"
one-element and zero-length arrays) #21
- Replace fake flexible-array declarations with the
DECLARE_FLEX_ARRAY() helper macro #193
- Address -Wzero-length-array warnings reported by Clang #197

> Link: https://gcc.gnu.org/onlinedocs/gcc/Zero-Length.html

Shouldn't this link be in the cover letter?  And the applicable
link(s), as shown in the cover letter, here in the patches?

-- 
thanks,

Mimi

> Signed-off-by: Gaosheng Cui <cuigaosheng1@huawei.com>
> ---
>  security/integrity/ima/ima_modsig.c | 2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)
> 
> diff --git a/security/integrity/ima/ima_modsig.c b/security/integrity/ima/ima_modsig.c
> index fb25723c65bc..d132383dbb64 100644
> --- a/security/integrity/ima/ima_modsig.c
> +++ b/security/integrity/ima/ima_modsig.c
> @@ -29,7 +29,7 @@ struct modsig {
>  	 * storing the signature.
>  	 */
>  	int raw_pkcs7_len;
> -	u8 raw_pkcs7[];
> +	DECLARE_FLEX_ARRAY(u8, raw_pkcs7);
>  };
>  
>  /*



  reply	other threads:[~2022-09-23 20:35 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2022-09-05  7:58 [PATCH -next 0/4] Use DECLARE_FLEX_ARRAY() helper for ima Gaosheng Cui
2022-09-05  7:58 ` [PATCH -next 1/4] ima: Use DECLARE_FLEX_ARRAY() helper in ima_modsig Gaosheng Cui
2022-09-23 20:28   ` Mimi Zohar [this message]
2022-09-05  7:58 ` [PATCH -next 2/4] ima: Use DECLARE_FLEX_ARRAY() helper in ima_template_entry Gaosheng Cui
2022-09-05  7:58 ` [PATCH -next 3/4] ima: Use DECLARE_FLEX_ARRAY() helper in ima_policy Gaosheng Cui
2022-09-05  7:58 ` [PATCH -next 4/4] integrity: Use DECLARE_FLEX_ARRAY() helper in integrity.h Gaosheng Cui

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=0f9387c9ceec0819de7bdb8b3635af8fa8236973.camel@linux.ibm.com \
    --to=zohar@linux.ibm.com \
    --cc=cuigaosheng1@huawei.com \
    --cc=dmitry.kasatkin@gmail.com \
    --cc=jmorris@namei.org \
    --cc=linux-integrity@vger.kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-security-module@vger.kernel.org \
    --cc=paul@paul-moore.com \
    --cc=serge@hallyn.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).