Skip to content

Commit 70de41e

Browse files
tititiou36kuba-moo
authored andcommitted
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 <[email protected]> Reviewed-by: Simon Horman <[email protected]> Link: https://patch.msgid.link/87cda89e4c9414e71d1a54bb1eb491b0e7f70375.1720973029.git.christophe.jaillet@wanadoo.fr Signed-off-by: Jakub Kicinski <[email protected]>
1 parent f96eb11 commit 70de41e

File tree

3 files changed

+262
-262
lines changed

3 files changed

+262
-262
lines changed

include/net/llc_c_st.h

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -44,8 +44,8 @@ struct llc_conn_state_trans {
4444
};
4545

4646
struct llc_conn_state {
47-
u8 current_state;
48-
struct llc_conn_state_trans **transitions;
47+
u8 current_state;
48+
const struct llc_conn_state_trans **transitions;
4949
};
5050

5151
extern struct llc_conn_state llc_conn_state_table[];

0 commit comments

Comments
 (0)