llc: Constify struct llc_sap_state_trans
authorChristophe JAILLET <christophe.jaillet@wanadoo.fr>
Sun, 14 Jul 2024 16:15:20 +0000 (18:15 +0200)
committerJakub Kicinski <kuba@kernel.org>
Mon, 15 Jul 2024 15:51:19 +0000 (08:51 -0700)
commit0970bf676f86c2c4d9bf7e672f5504d390c9fce6
treeac24e6e25f35275fbd2defa67a8449733d9295d2
parent70de41ef78573ce958ac04ecc2b5671851723c59
llc: Constify struct llc_sap_state_trans

'struct llc_sap_state_trans' are not modified in this driver.

Constifying this structure 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
    339     456      24     819     333 net/llc/llc_s_st.o

After:
=====
   text    data     bss     dec     hex filename
    683     144       0     827     33b net/llc/llc_s_st.o

Signed-off-by: Christophe JAILLET <christophe.jaillet@wanadoo.fr>
Reviewed-by: Simon Horman <horms@kernel.org>
Link: https://patch.msgid.link/9d17587639195ee94b74ff06a11ef97d1833ee52.1720973710.git.christophe.jaillet@wanadoo.fr
Signed-off-by: Jakub Kicinski <kuba@kernel.org>
include/net/llc_s_st.h
net/llc/llc_s_st.c
net/llc/llc_sap.c