diff options
author | Christophe JAILLET <christophe.jaillet@wanadoo.fr> | 2024-07-14 18:05:56 +0200 |
---|---|---|
committer | Jakub Kicinski <kuba@kernel.org> | 2024-07-15 08:51:01 -0700 |
commit | 70de41ef78573ce958ac04ecc2b5671851723c59 (patch) | |
tree | 170892633c1db1b91861211131b71b9dd6fec716 /include/net | |
parent | f96eb1172ed8d74cfed7da92d2045ec64028cc38 (diff) |
llc: Constify struct llc_conn_state_trans
'struct llc_conn_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
13923 10896 32 24851 6113 net/llc/llc_c_st.o
After:
=====
text data bss dec hex filename
21859 3328 0 25187 6263 net/llc/llc_c_st.o
Signed-off-by: Christophe JAILLET <christophe.jaillet@wanadoo.fr>
Reviewed-by: Simon Horman <horms@kernel.org>
Link: https://patch.msgid.link/87cda89e4c9414e71d1a54bb1eb491b0e7f70375.1720973029.git.christophe.jaillet@wanadoo.fr
Signed-off-by: Jakub Kicinski <kuba@kernel.org>
Diffstat (limited to 'include/net')
-rw-r--r-- | include/net/llc_c_st.h | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/include/net/llc_c_st.h b/include/net/llc_c_st.h index 53823d61d8b6..a4bea0f33188 100644 --- a/include/net/llc_c_st.h +++ b/include/net/llc_c_st.h @@ -44,8 +44,8 @@ struct llc_conn_state_trans { }; struct llc_conn_state { - u8 current_state; - struct llc_conn_state_trans **transitions; + u8 current_state; + const struct llc_conn_state_trans **transitions; }; extern struct llc_conn_state llc_conn_state_table[]; |