[PATCH 0/3] pinctrl: meson: Constify some structure
Christophe JAILLET
christophe.jaillet at wanadoo.fr
Wed Aug 7 02:30:54 PDT 2024
These 3 patches constify some structures in order to move some data to a
read-only section, so increase overall security.
It is splitted in 3 to ease review.
Patch 1: struct meson_pmx_group and meson_pmx_func
patch 2: struct meson_bank
patch 3: struct meson_pmx_bank
All patches are only compile tested.
In order to compile them, I update Kconfig to add some "| COMPILE_TEST"
on depends line.
Should it be useful, I can send a patch to add it, but I don't think it
would be that useful.
On a x86_64, with allmodconfig:
Before:
======
text data bss dec hex filename
10818 11696 0 22514 57f2 drivers/pinctrl/meson/pinctrl-amlogic-c3.o
17198 17680 0 34878 883e drivers/pinctrl/meson/pinctrl-amlogic-t7.o
14161 11200 0 25361 6311 drivers/pinctrl/meson/pinctrl-meson8b.o
17348 12512 0 29860 74a4 drivers/pinctrl/meson/pinctrl-meson8.o
3070 324 0 3394 d42 drivers/pinctrl/meson/pinctrl-meson8-pmx.o
9317 9648 0 18965 4a15 drivers/pinctrl/meson/pinctrl-meson-a1.o
12115 11664 0 23779 5ce3 drivers/pinctrl/meson/pinctrl-meson-axg.o
2470 120 0 2590 a1e drivers/pinctrl/meson/pinctrl-meson-axg-pmx.o
15125 15224 0 30349 768d drivers/pinctrl/meson/pinctrl-meson-g12a.o
13800 10160 0 23960 5d98 drivers/pinctrl/meson/pinctrl-meson-gxbb.o
13040 9648 0 22688 58a0 drivers/pinctrl/meson/pinctrl-meson-gxl.o
20507 1132 48 21687 54b7 drivers/pinctrl/meson/pinctrl-meson.o
12212 12880 0 25092 6204 drivers/pinctrl/meson/pinctrl-meson-s4.o
After:
=====
text data bss dec hex filename
22114 384 0 22498 57e2 drivers/pinctrl/meson/pinctrl-amlogic-c3.o
34510 384 0 34894 884e drivers/pinctrl/meson/pinctrl-amlogic-t7.o
24945 440 0 25385 6329 drivers/pinctrl/meson/pinctrl-meson8b.o
29412 440 0 29852 749c drivers/pinctrl/meson/pinctrl-meson8.o
3070 324 0 3394 d42 drivers/pinctrl/meson/pinctrl-meson8-pmx.o
18597 384 0 18981 4a25 drivers/pinctrl/meson/pinctrl-meson-a1.o
23315 496 0 23811 5d03 drivers/pinctrl/meson/pinctrl-meson-axg.o
2470 120 0 2590 a1e drivers/pinctrl/meson/pinctrl-meson-axg-pmx.o
29877 504 0 30381 76ad drivers/pinctrl/meson/pinctrl-meson-g12a.o
23496 456 0 23952 5d90 drivers/pinctrl/meson/pinctrl-meson-gxbb.o
22224 456 0 22680 5898 drivers/pinctrl/meson/pinctrl-meson-gxl.o
20507 1132 48 21687 54b7 drivers/pinctrl/meson/pinctrl-meson.o
24692 384 0 25076 61f4 drivers/pinctrl/meson/pinctrl-meson-s4.o
Christophe JAILLET (3):
pinctrl: meson: Constify struct meson_pmx_group and meson_pmx_func
pinctrl: meson: Constify struct meson_bank
pinctrl: meson: Constify struct meson_pmx_bank
drivers/pinctrl/meson/pinctrl-amlogic-c3.c | 8 +++---
drivers/pinctrl/meson/pinctrl-amlogic-t7.c | 8 +++---
drivers/pinctrl/meson/pinctrl-meson-a1.c | 8 +++---
drivers/pinctrl/meson/pinctrl-meson-axg-pmx.c | 12 ++++-----
drivers/pinctrl/meson/pinctrl-meson-axg-pmx.h | 2 +-
drivers/pinctrl/meson/pinctrl-meson-axg.c | 16 ++++++------
drivers/pinctrl/meson/pinctrl-meson-g12a.c | 16 ++++++------
drivers/pinctrl/meson/pinctrl-meson-gxbb.c | 12 ++++-----
drivers/pinctrl/meson/pinctrl-meson-gxl.c | 12 ++++-----
drivers/pinctrl/meson/pinctrl-meson-s4.c | 8 +++---
drivers/pinctrl/meson/pinctrl-meson.c | 25 ++++++++++---------
drivers/pinctrl/meson/pinctrl-meson.h | 6 ++---
drivers/pinctrl/meson/pinctrl-meson8-pmx.c | 6 ++---
drivers/pinctrl/meson/pinctrl-meson8.c | 12 ++++-----
drivers/pinctrl/meson/pinctrl-meson8b.c | 12 ++++-----
15 files changed, 82 insertions(+), 81 deletions(-)
--
2.45.2
More information about the linux-amlogic
mailing list