public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
From: Holger Dengler <dengler@linux.ibm.com>
To: "Thomas Weißschuh" <linux@weissschuh.net>,
	"Heiko Carstens" <hca@linux.ibm.com>,
	"Vasily Gorbik" <gor@linux.ibm.com>,
	"Alexander Gordeev" <agordeev@linux.ibm.com>,
	"Christian Borntraeger" <borntraeger@linux.ibm.com>,
	"Sven Schnelle" <svens@linux.ibm.com>,
	"Niklas Schnelle" <schnelle@linux.ibm.com>,
	"Gerald Schaefer" <gerald.schaefer@linux.ibm.com>,
	"Vineeth Vijayan" <vneethv@linux.ibm.com>,
	"Peter Oberparleiter" <oberpar@linux.ibm.com>,
	"Harald Freudenberger" <freude@linux.ibm.com>
Cc: linux-s390@vger.kernel.org, linux-kernel@vger.kernel.org
Subject: Re: [PATCH 5/5] s390/pkey: Constify 'struct bin_attribute'
Date: Thu, 12 Dec 2024 16:03:18 +0100	[thread overview]
Message-ID: <2295c2a4-7d7f-4932-99df-fa9d4b6186ae@linux.ibm.com> (raw)
In-Reply-To: <20241211-sysfs-const-bin_attr-s390-v1-5-be01f66bfcf7@weissschuh.net>

On 11/12/2024 18:54, Thomas Weißschuh wrote:
> The sysfs core now allows instances of 'struct bin_attribute' to be
> moved into read-only memory. Make use of that to protect them against
> accidental or malicious modifications.
> 
> Signed-off-by: Thomas Weißschuh <linux@weissschuh.net>

Thanks for your contribution.

Tested-by: Holger Dengler <dengler@linux.ibm.com>
Reviewed-by: Holger Dengler <dengler@linux.ibm.com>

> ---
>  drivers/s390/crypto/pkey_sysfs.c | 128 +++++++++++++++++++--------------------
>  1 file changed, 64 insertions(+), 64 deletions(-)
> 
> diff --git a/drivers/s390/crypto/pkey_sysfs.c b/drivers/s390/crypto/pkey_sysfs.c
> index a4eb45803f5e6d6b17dec709e6068448973399f6..57edc97bafd29483eedc405d47eabe3d7f6c28fc 100644
> --- a/drivers/s390/crypto/pkey_sysfs.c
> +++ b/drivers/s390/crypto/pkey_sysfs.c
[...]
> @@ -295,9 +295,9 @@ static struct bin_attribute *protkey_attrs[] = {
>  	NULL
>  };
>  
> -static struct attribute_group protkey_attr_group = {
> -	.name	   = "protkey",
> -	.bin_attrs = protkey_attrs,
> +static const struct attribute_group protkey_attr_group = {
> +	.name	       = "protkey",
> +	.bin_attrs_new = protkey_attrs,

This is more a comment to 906c508afdca (\"sysfs: attribute_group: allow registration of const bin_attribute\") than to this patch:
Why have you named the pointer `bin_attrs_new` and not something meaningful e.g. `bin_attrs_const`? I know, it is already in the kernel, but I would highly recommend to rename the pointer in another patch.

[...]

-- 
Mit freundlichen Grüßen / Kind regards
Holger Dengler
--
IBM Systems, Linux on IBM Z Development
dengler@linux.ibm.com


  reply	other threads:[~2024-12-12 15:03 UTC|newest]

Thread overview: 15+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2024-12-11 17:54 [PATCH 0/5] s390: Constify 'struct bin_attribute' Thomas Weißschuh
2024-12-11 17:54 ` [PATCH 1/5] s390/crypto/cpacf: " Thomas Weißschuh
2024-12-12 12:01   ` Finn Callies
2024-12-12 15:06   ` Holger Dengler
2024-12-11 17:54 ` [PATCH 2/5] s390/ipl: " Thomas Weißschuh
2025-01-03 14:12   ` Alexander Gordeev
2024-12-11 17:54 ` [PATCH 3/5] s390/pci: " Thomas Weißschuh
2025-01-03 14:14   ` Alexander Gordeev
2024-12-11 17:54 ` [PATCH 4/5] s390/sclp: " Thomas Weißschuh
2025-01-03 14:13   ` Alexander Gordeev
2024-12-11 17:54 ` [PATCH 5/5] s390/pkey: " Thomas Weißschuh
2024-12-12 15:03   ` Holger Dengler [this message]
2025-01-03 14:21     ` Alexander Gordeev
2025-01-07  8:50       ` Harald Freudenberger
2025-01-07  9:18 ` [PATCH 0/5] s390: " Alexander Gordeev

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=2295c2a4-7d7f-4932-99df-fa9d4b6186ae@linux.ibm.com \
    --to=dengler@linux.ibm.com \
    --cc=agordeev@linux.ibm.com \
    --cc=borntraeger@linux.ibm.com \
    --cc=freude@linux.ibm.com \
    --cc=gerald.schaefer@linux.ibm.com \
    --cc=gor@linux.ibm.com \
    --cc=hca@linux.ibm.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-s390@vger.kernel.org \
    --cc=linux@weissschuh.net \
    --cc=oberpar@linux.ibm.com \
    --cc=schnelle@linux.ibm.com \
    --cc=svens@linux.ibm.com \
    --cc=vneethv@linux.ibm.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