diff options
author | Christophe JAILLET <christophe.jaillet@wanadoo.fr> | 2024-07-14 18:15:20 +0200 |
---|---|---|
committer | Jakub Kicinski <kuba@kernel.org> | 2024-07-15 08:51:19 -0700 |
commit | 0970bf676f86c2c4d9bf7e672f5504d390c9fce6 (patch) | |
tree | ac24e6e25f35275fbd2defa67a8449733d9295d2 /include/net/llc_s_st.h | |
parent | 70de41ef78573ce958ac04ecc2b5671851723c59 (diff) |
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>
Diffstat (limited to 'include/net/llc_s_st.h')
-rw-r--r-- | include/net/llc_s_st.h | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/include/net/llc_s_st.h b/include/net/llc_s_st.h index ed5b2fa40d32..fca49d483d20 100644 --- a/include/net/llc_s_st.h +++ b/include/net/llc_s_st.h @@ -29,8 +29,8 @@ struct llc_sap_state_trans { }; struct llc_sap_state { - u8 curr_state; - struct llc_sap_state_trans **transitions; + u8 curr_state; + const struct llc_sap_state_trans **transitions; }; /* only access to SAP state table */ |