]> Gentwo Git Trees - linux/.git/commit
sctp: Constify struct sctp_sched_ops
authorChristophe JAILLET <christophe.jaillet@wanadoo.fr>
Sat, 25 Oct 2025 07:40:59 +0000 (09:40 +0200)
committerJakub Kicinski <kuba@kernel.org>
Wed, 29 Oct 2025 00:50:55 +0000 (17:50 -0700)
commit294bfe0343da3b59db040c3a4dac05b4c91ce013
treed54feaa16e94f20caf625523194ba6b1b37ddb90
parent8443c3160858b860bfc2db6a8397c72c9f6b513e
sctp: Constify struct sctp_sched_ops

'struct sctp_sched_ops' is not modified in these drivers.

Constifying this structure moves some data to a read-only section, so
increases overall security, especially when the structure holds some
function pointers.

On a x86_64, with allmodconfig, as an example:
Before:
======
   text    data     bss     dec     hex filename
   8019     568       0    8587    218b net/sctp/stream_sched_fc.o

After:
=====
   text    data     bss     dec     hex filename
   8275     312       0    8587    218b net/sctp/stream_sched_fc.o

Signed-off-by: Christophe JAILLET <christophe.jaillet@wanadoo.fr>
Link: https://patch.msgid.link/dce03527eb7b7cc8a3c26d5cdac12bafe3350135.1761377890.git.christophe.jaillet@wanadoo.fr
Signed-off-by: Jakub Kicinski <kuba@kernel.org>
include/net/sctp/stream_sched.h
include/net/sctp/structs.h
net/sctp/stream.c
net/sctp/stream_sched.c
net/sctp/stream_sched_fc.c
net/sctp/stream_sched_prio.c
net/sctp/stream_sched_rr.c