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] [day] [month] [year] [list]
Message-ID: <xygbee3xw72kjitwo6xas6cxoqnx4zmny35tqc4anypqdxiow6@ahoenkvggcv2>
Date: Tue, 23 Dec 2025 11:56:02 +0800
From: Coiby Xu <coxu@...hat.com>
To: Christophe JAILLET <christophe.jaillet@...adoo.fr>
Cc: Andrew Morton <akpm@...ux-foundation.org>, Baoquan He <bhe@...hat.com>, 
	Vivek Goyal <vgoyal@...hat.com>, Dave Young <dyoung@...hat.com>, linux-kernel@...r.kernel.org, 
	kernel-janitors@...r.kernel.org, kexec@...ts.infradead.org
Subject: Re: [PATCH] crash_dump: Constify struct configfs_item_operations and
 configfs_group_operations

On Sun, Dec 14, 2025 at 06:57:30PM +0100, Christophe JAILLET wrote:
>'struct configfs_item_operations' and 'configfs_group_operations' are not
>modified in this driver.
>
>Constifying these structures moves some data to a read-only section, so
>increases overall security, especially when the structure holds some
>function pointers.
>
>On a x86_64, with allmodconfig, as an example:
>Before:
>======
>   text	   data	    bss	    dec	    hex	filename
>  16339	  11001	    384	  27724	   6c4c	kernel/crash_dump_dm_crypt.o
>
>After:
>=====
>   text	   data	    bss	    dec	    hex	filename
>  16499	  10841	    384	  27724	   6c4c	kernel/crash_dump_dm_crypt.o
>
>Signed-off-by: Christophe JAILLET <christophe.jaillet@...adoo.fr>
>---
>Compile tested only.
>
>This change is possible since commits f2f36500a63b and f7f78098690d.
>---
> kernel/crash_dump_dm_crypt.c | 4 ++--
> 1 file changed, 2 insertions(+), 2 deletions(-)
>
>diff --git a/kernel/crash_dump_dm_crypt.c b/kernel/crash_dump_dm_crypt.c
>index 401423ba477d..0d23dc1de67c 100644
>--- a/kernel/crash_dump_dm_crypt.c
>+++ b/kernel/crash_dump_dm_crypt.c
>@@ -223,7 +223,7 @@ static void config_key_release(struct config_item *item)
> 	key_count--;
> }
>
>-static struct configfs_item_operations config_key_item_ops = {
>+static const struct configfs_item_operations config_key_item_ops = {
> 	.release = config_key_release,
> };
>
>@@ -298,7 +298,7 @@ static struct configfs_attribute *config_keys_attrs[] = {
>  * Note that, since no extra work is required on ->drop_item(),
>  * no ->drop_item() is provided.
>  */
>-static struct configfs_group_operations config_keys_group_ops = {
>+static const struct configfs_group_operations config_keys_group_ops = {
> 	.make_item = config_keys_make_item,
> };
>
>-- 
>2.52.0

Thanks for the patch!

Reviewed-and-tested-by: Coiby Xu <coxu@...hat.com>


-- 
Best regards,
Coiby


Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ