Linux ARM-MSM sub-architecture
 help / color / mirror / Atom feed
From: Christophe JAILLET <christophe.jaillet@wanadoo.fr>
To: Andrew Lunn <andrew@lunn.ch>
Cc: SkyLake.Huang@mediatek.com, UNGLinuxDriver@microchip.com,
	andrei.botila@oss.nxp.com, andrew@lunn.ch,
	angelogioacchino.delregno@collabora.com,
	arun.ramadoss@microchip.com,
	bcm-kernel-feedback-list@broadcom.com, daniel@makrotopia.org,
	davem@davemloft.net, dqfext@gmail.com, edumazet@google.com,
	florian.fainelli@broadcom.com, heiko@sntech.de,
	hkallweit1@gmail.com, jbrunet@baylibre.com, kabel@kernel.org,
	kernel-janitors@vger.kernel.org, khilman@baylibre.com,
	kuba@kernel.org, linux-amlogic@lists.infradead.org,
	linux-arm-kernel@lists.infradead.org,
	linux-arm-msm@vger.kernel.org, linux-kernel@vger.kernel.org,
	linux-mediatek@lists.infradead.org,
	linux-rockchip@lists.infradead.org, linux@armlinux.org.uk,
	lxu@maxlinear.com, martin.blumenstingl@googlemail.com,
	matthias.bgg@gmail.com, michael.hennerich@analog.com,
	neil.armstrong@linaro.org, netdev@vger.kernel.org,
	pabeni@redhat.com, piergiorgio.beruto@gmail.com,
	richardcochran@gmail.com, rjui@broadcom.com,
	sbranden@broadcom.com
Subject: Re: [PATCH net-next] net: phy: Constify struct mdio_device_id
Date: Sun, 12 Jan 2025 18:03:38 +0100	[thread overview]
Message-ID: <05dfdd2f-e2c2-40ff-8a84-038c4da8385a@wanadoo.fr> (raw)
In-Reply-To: <9dfeb860-3c0c-4f16-a150-fdce133281e8@lunn.ch>

Le 12/01/2025 à 17:46, Andrew Lunn a écrit :
> On Sun, Jan 12, 2025 at 03:14:50PM +0100, Christophe JAILLET wrote:
>> 'struct mdio_device_id' is not modified in these drivers.
>>
>> Constifying these structures moves some data to a read-only section, so
>> increase overall security.
>>
>> On a x86_64, with allmodconfig, as an example:
>> Before:
>> ======
>>     text	   data	    bss	    dec	    hex	filename
>>    27014	  12792	      0	  39806	   9b7e	drivers/net/phy/broadcom.o
>>
>> After:
>> =====
>>     text	   data	    bss	    dec	    hex	filename
>>    27206	  12600	      0	  39806	   9b7e	drivers/net/phy/broadcom.o
>>
>> Signed-off-by: Christophe JAILLET <christophe.jaillet@wanadoo.fr>
> 
> Seems sensible.
> 
> Reviewed-by: Andrew Lunn <andrew@lunn.ch>
> 
> Is the long terms goal to make MODULE_DEVICE_TABLE() enforce the
> const?

It was not my initial goal, but I can give it a look if you think it's 
worth it.

But some other constifications will be needed before that.

CJ

> 
>      Andrew
> 
> 


  reply	other threads:[~2025-01-12 17:03 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2025-01-12 14:14 [PATCH net-next] net: phy: Constify struct mdio_device_id Christophe JAILLET
2025-01-12 16:46 ` Andrew Lunn
2025-01-12 17:03   ` Christophe JAILLET [this message]
2025-01-15  1: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=05dfdd2f-e2c2-40ff-8a84-038c4da8385a@wanadoo.fr \
    --to=christophe.jaillet@wanadoo.fr \
    --cc=SkyLake.Huang@mediatek.com \
    --cc=UNGLinuxDriver@microchip.com \
    --cc=andrei.botila@oss.nxp.com \
    --cc=andrew@lunn.ch \
    --cc=angelogioacchino.delregno@collabora.com \
    --cc=arun.ramadoss@microchip.com \
    --cc=bcm-kernel-feedback-list@broadcom.com \
    --cc=daniel@makrotopia.org \
    --cc=davem@davemloft.net \
    --cc=dqfext@gmail.com \
    --cc=edumazet@google.com \
    --cc=florian.fainelli@broadcom.com \
    --cc=heiko@sntech.de \
    --cc=hkallweit1@gmail.com \
    --cc=jbrunet@baylibre.com \
    --cc=kabel@kernel.org \
    --cc=kernel-janitors@vger.kernel.org \
    --cc=khilman@baylibre.com \
    --cc=kuba@kernel.org \
    --cc=linux-amlogic@lists.infradead.org \
    --cc=linux-arm-kernel@lists.infradead.org \
    --cc=linux-arm-msm@vger.kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-mediatek@lists.infradead.org \
    --cc=linux-rockchip@lists.infradead.org \
    --cc=linux@armlinux.org.uk \
    --cc=lxu@maxlinear.com \
    --cc=martin.blumenstingl@googlemail.com \
    --cc=matthias.bgg@gmail.com \
    --cc=michael.hennerich@analog.com \
    --cc=neil.armstrong@linaro.org \
    --cc=netdev@vger.kernel.org \
    --cc=pabeni@redhat.com \
    --cc=piergiorgio.beruto@gmail.com \
    --cc=richardcochran@gmail.com \
    --cc=rjui@broadcom.com \
    --cc=sbranden@broadcom.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