lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Date:   Fri, 5 Feb 2021 04:04:18 +0200
From:   Jarkko Sakkinen <jarkko@...nel.org>
To:     Rikard Falkeborn <rikard.falkeborn@...il.com>
Cc:     Peter Huewe <peterhuewe@....de>, Jason Gunthorpe <jgg@...pe.ca>,
        linux-integrity@...r.kernel.org, linux-kernel@...r.kernel.org
Subject: Re: [PATCH] tpm/ppi: Constify static struct attribute_group

On Thu, Feb 04, 2021 at 10:54:27PM +0100, Rikard Falkeborn wrote:
> The only usage of ppi_attr_grp is to put its address in an array of
> pointers to const struct attribute_group. Make it const to allow the
> compiler to put it in read-only memory.
> 
> Signed-off-by: Rikard Falkeborn <rikard.falkeborn@...il.com>

Thanks.

Reviewed-by: Jarkko Sakkinen <jarkko@...nel.org>

/Jarkko

> ---
>  drivers/char/tpm/tpm_ppi.c | 2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)
> 
> diff --git a/drivers/char/tpm/tpm_ppi.c b/drivers/char/tpm/tpm_ppi.c
> index b2dab941cb7f..40018a73b3cb 100644
> --- a/drivers/char/tpm/tpm_ppi.c
> +++ b/drivers/char/tpm/tpm_ppi.c
> @@ -358,7 +358,7 @@ static struct attribute *ppi_attrs[] = {
>  	&dev_attr_tcg_operations.attr,
>  	&dev_attr_vs_operations.attr, NULL,
>  };
> -static struct attribute_group ppi_attr_grp = {
> +static const struct attribute_group ppi_attr_grp = {
>  	.name = "ppi",
>  	.attrs = ppi_attrs
>  };
> -- 
> 2.30.0
> 
> 

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ