]> www.infradead.org Git - users/dwmw2/linux.git/commit
refscale: Constify struct ref_scale_ops
authorChristophe JAILLET <christophe.jaillet@wanadoo.fr>
Tue, 6 Aug 2024 13:30:16 +0000 (15:30 +0200)
committerNeeraj Upadhyay <neeraj.upadhyay@kernel.org>
Wed, 14 Aug 2024 18:44:48 +0000 (00:14 +0530)
commit8f35fefad06323ab8ad5915bb7c6bc1a684cb8b5
treef894c54bcc4c05fa85554deb1c6d32f384102dde
parentf1fd0e0bb12d09ca0564425b8af76fddf2e380fb
refscale: Constify struct ref_scale_ops

'struct ref_scale_ops' are not modified in these drivers.

Constifying this structure moves some data to a read-only section, so
increase overall security.

On a x86_64, with allmodconfig:
Before:
======
   text    data     bss     dec     hex filename
  34231    4167     736   39134    98de kernel/rcu/refscale.o

After:
=====
   text    data     bss     dec     hex filename
  35175    3239     736   39150    98ee kernel/rcu/refscale.o

Signed-off-by: Christophe JAILLET <christophe.jaillet@wanadoo.fr>
Tested-by: "Paul E. McKenney" <paulmck@kernel.org>
Signed-off-by: Neeraj Upadhyay <neeraj.upadhyay@kernel.org>
kernel/rcu/refscale.c