All of lore.kernel.org
 help / color / mirror / Atom feed
From: Breno Leitao <leitao@debian.org>
To: Christophe JAILLET <christophe.jaillet@wanadoo.fr>
Cc: "David S. Miller" <davem@davemloft.net>,
	Eric Dumazet <edumazet@google.com>,
	Jakub Kicinski <kuba@kernel.org>, Paolo Abeni <pabeni@redhat.com>,
	linux-kernel@vger.kernel.org, kernel-janitors@vger.kernel.org,
	netdev@vger.kernel.org
Subject: Re: [PATCH net-next] net: netconsole: Constify struct config_item_type
Date: Tue, 13 Aug 2024 03:46:15 -0700	[thread overview]
Message-ID: <Zrs5dyMWT5u8qXNV@gmail.com> (raw)
In-Reply-To: <9c205b2b4bdb09fc9e9d2cb2f2936ec053da1b1b.1723325900.git.christophe.jaillet@wanadoo.fr>

Hello Christophe,

On Sat, Aug 10, 2024 at 11:39:04PM +0200, Christophe JAILLET wrote:
> 'struct config_item_type' is not modified in this driver.
> 
> This structure is only used with config_group_init_type_name() which takes
> a const struct config_item_type* as a 3rd argument.
> 
> This also makes things consistent with 'netconsole_target_type' witch is
> already const.
> 
> Constifying this structure moves some data to a read-only section, so
> increase overall security, especially when the structure holds some
> function pointers.
> 
> On a x86_64, with allmodconfig:
> Before:
> ======
>    text	   data	    bss	    dec	    hex	filename
>   33007	   3952	   1312	  38271	   957f	drivers/net/netconsole.o
> 
> After:
> =====
>    text	   data	    bss	    dec	    hex	filename
>   33071	   3888	   1312	  38271	   957f	drivers/net/netconsole.o
> 
> Signed-off-by: Christophe JAILLET <christophe.jaillet@wanadoo.fr>

Reviewed-by: Breno Leitao <leitao@debian.org>

> Compile tested-only.

I've tested it using a selftime I am creating, and it is all good.

Thanks for the patch!
--breno

  reply	other threads:[~2024-08-13 10:46 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2024-08-10 21:39 [PATCH net-next] net: netconsole: Constify struct config_item_type Christophe JAILLET
2024-08-13 10:46 ` Breno Leitao [this message]
2024-08-14  2:30 ` patchwork-bot+netdevbpf

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=Zrs5dyMWT5u8qXNV@gmail.com \
    --to=leitao@debian.org \
    --cc=christophe.jaillet@wanadoo.fr \
    --cc=davem@davemloft.net \
    --cc=edumazet@google.com \
    --cc=kernel-janitors@vger.kernel.org \
    --cc=kuba@kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=netdev@vger.kernel.org \
    --cc=pabeni@redhat.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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.