linux/drivers
Joel Granados 1751f872cc treewide: const qualify ctl_tables where applicable
Add the const qualifier to all the ctl_tables in the tree except for
watchdog_hardlockup_sysctl, memory_allocation_profiling_sysctls,
loadpin_sysctl_table and the ones calling register_net_sysctl (./net,
drivers/inifiniband dirs). These are special cases as they use a
registration function with a non-const qualified ctl_table argument or
modify the arrays before passing them on to the registration function.

Constifying ctl_table structs will prevent the modification of
proc_handler function pointers as the arrays would reside in .rodata.
This is made possible after commit 78eb4ea25c ("sysctl: treewide:
constify the ctl_table argument of proc_handlers") constified all the
proc_handlers.

Created this by running an spatch followed by a sed command:
Spatch:
    virtual patch

    @
    depends on !(file in "net")
    disable optional_qualifier
    @

    identifier table_name != {
      watchdog_hardlockup_sysctl,
      iwcm_ctl_table,
      ucma_ctl_table,
      memory_allocation_profiling_sysctls,
      loadpin_sysctl_table
    };
    @@

    + const
    struct ctl_table table_name [] = { ... };

sed:
    sed --in-place \
      -e "s/struct ctl_table .table = &uts_kern/const struct ctl_table *table = \&uts_kern/" \
      kernel/utsname_sysctl.c

Reviewed-by: Song Liu <song@kernel.org>
Acked-by: Steven Rostedt (Google) <rostedt@goodmis.org> # for kernel/trace/
Reviewed-by: Martin K. Petersen <martin.petersen@oracle.com> # SCSI
Reviewed-by: Darrick J. Wong <djwong@kernel.org> # xfs
Acked-by: Jani Nikula <jani.nikula@intel.com>
Acked-by: Corey Minyard <cminyard@mvista.com>
Acked-by: Wei Liu <wei.liu@kernel.org>
Acked-by: Thomas Gleixner <tglx@linutronix.de>
Reviewed-by: Bill O'Donnell <bodonnel@redhat.com>
Acked-by: Baoquan He <bhe@redhat.com>
Acked-by: Ashutosh Dixit <ashutosh.dixit@intel.com>
Acked-by: Anna Schumaker <anna.schumaker@oracle.com>
Signed-off-by: Joel Granados <joel.granados@kernel.org>
2025-01-28 13:48:37 +01:00
..
accel Mainly individually changelogged singleton patches. The patch series in 2025-01-26 17:50:53 -08:00
accessibility
acpi The various patchsets are summarized below. Plus of course many 2025-01-26 18:36:23 -08:00
amba
android Char/Misc/IIO driver updates for 6.14-rc1 2025-01-27 16:51:51 -08:00
ata ata changes for 6.14 2025-01-26 16:22:03 -08:00
atm
auxdisplay auxdisplay for v6.14-1 2025-01-24 08:03:52 -08:00
base treewide: const qualify ctl_tables where applicable 2025-01-28 13:48:37 +01:00
bcma
block virtio: features, fixes, cleanups 2025-01-27 15:26:06 -08:00
bluetooth Bluetooth: qca: Fix poor RF performance for WCN6855 2025-01-15 10:37:23 -05:00
bus
cache
cdrom treewide: const qualify ctl_tables where applicable 2025-01-28 13:48:37 +01:00
cdx
char treewide: const qualify ctl_tables where applicable 2025-01-28 13:48:37 +01:00
clk The various patchsets are summarized below. Plus of course many 2025-01-26 18:36:23 -08:00
clocksource
comedi
connector
counter
cpufreq Power management updates for 6.14-rc1 2025-01-22 11:16:14 -08:00
cpuidle pmdomain core: 2025-01-24 07:43:35 -08:00
crypto This update includes the following changes: 2025-01-24 07:48:10 -08:00
cxl
dax
dca
devfreq Update devfreq next for v6.14 2025-01-13 20:48:34 +01:00
dio
dma - Remove the less generic CPU matching infra around struct x86_cpu_desc and 2025-01-21 09:30:59 -08:00
dma-buf
dpll
edac - The first part of a restructuring of AMD's representation of a northbridge 2025-01-21 09:38:52 -08:00
eisa
extcon
firewire SCSI misc on 20250126 2025-01-26 16:12:44 -08:00
firmware Char/Misc/IIO driver updates for 6.14-rc1 2025-01-27 16:51:51 -08:00
fpga
fsi
gnss
gpio gpio updates for v6.14-rc1 2025-01-22 08:47:54 -08:00
gpu treewide: const qualify ctl_tables where applicable 2025-01-28 13:48:37 +01:00
greybus
hid pci-v6.14-changes 2025-01-25 16:03:40 -08:00
hsi
hte
hv treewide: const qualify ctl_tables where applicable 2025-01-28 13:48:37 +01:00
hwmon I3C for 6.14 2025-01-24 15:48:01 -08:00
hwspinlock
hwtracing
i2c platform-drivers-x86 for v6.14-1 2025-01-24 07:18:39 -08:00
i3c I3C for 6.14 2025-01-24 15:48:01 -08:00
idle Power management updates for 6.14-rc1 2025-01-22 11:16:14 -08:00
iio IIO: 2nd set of fixes for the 6.13 cycle. 2025-01-16 13:46:08 +01:00
infiniband Mainly individually changelogged singleton patches. The patch series in 2025-01-26 17:50:53 -08:00
input platform-drivers-x86 for v6.14-1 2025-01-24 07:18:39 -08:00
interconnect interconnect changes for 6.14 2025-01-16 14:01:40 +01:00
iommu hyperv-next for v6.14 2025-01-25 09:22:55 -08:00
ipack
irqchip Updates for the interrupt subsystem: 2025-01-21 13:51:07 -08:00
isdn
leds - Allow struct bin_attribute instances to be placed in read-only memory for enhanced protection. 2025-01-22 09:19:36 -08:00
macintosh The various patchsets are summarized below. Plus of course many 2025-01-26 18:36:23 -08:00
mailbox mailbox: th1520: Fix memory corruption due to incorrect array size 2025-01-18 16:20:55 -06:00
mcb
md treewide: const qualify ctl_tables where applicable 2025-01-28 13:48:37 +01:00
media [GIT PULL for v6.14] media updates 2025-01-25 15:59:46 -08:00
memory spi: Support DTR in spi-mem 2025-01-15 19:07:39 +01:00
memstick Char/Misc/IIO driver updates for 6.14-rc1 2025-01-27 16:51:51 -08:00
message
mfd - Fix race in device_node_get_regmap() using more extensive locking. 2025-01-22 09:16:02 -08:00
misc treewide: const qualify ctl_tables where applicable 2025-01-28 13:48:37 +01:00
mmc MMC core: 2025-01-22 10:39:17 -08:00
most
mtd * MTD changes 2025-01-25 16:12:07 -08:00
mux
net Mainly individually changelogged singleton patches. The patch series in 2025-01-26 17:50:53 -08:00
nfc nfc: mrvl: Don't use "proxy" headers 2025-01-18 17:10:05 -08:00
ntb PCI: Remove devres from pci_intx() 2025-01-18 14:38:49 -06:00
nubus
nvdimm
nvme for-6.14/io_uring-20250119 2025-01-20 20:27:33 -08:00
nvmem
of The various patchsets are summarized below. Plus of course many 2025-01-26 18:36:23 -08:00
opp PM / OPP: Add reference counting helpers for Rust implementation 2025-01-20 09:05:51 +05:30
parisc
parport
pci pci-v6.14-changes 2025-01-25 16:03:40 -08:00
pcmcia
peci
perf treewide: const qualify ctl_tables where applicable 2025-01-28 13:48:37 +01:00
phy
pinctrl Pin control changes for the v6.14 kernel cycle: 2025-01-24 07:38:50 -08:00
platform USB / Thunderbolt driver updates for 6.14-rc1 2025-01-27 16:29:16 -08:00
pmdomain pmdomain: airoha: Fix compilation error with Clang-20 and Thumb2 mode 2025-01-21 10:45:24 +01:00
pnp
power power supply and reset changes for the 6.14 series 2025-01-27 15:37:16 -08:00
powercap
pps
ps3
ptp Char/Misc/IIO driver updates for 6.14-rc1 2025-01-27 16:51:51 -08:00
pwm pwm: Two fixes for the pwm core and the pwm-microchip-core driver 2025-01-27 15:45:29 -08:00
rapidio
ras
regulator regulator: Updates for v6.14 2025-01-22 09:03:41 -08:00
remoteproc remoteproc: st: Use syscon_regmap_lookup_by_phandle_args 2025-01-15 10:04:27 -07:00
reset soc: driver updates for 6.14 2025-01-24 14:56:59 -08:00
rpmsg
rtc
s390 SCSI misc on 20250126 2025-01-26 16:12:44 -08:00
sbus
scsi treewide: const qualify ctl_tables where applicable 2025-01-28 13:48:37 +01:00
sh
siox
slimbus
soc [GIT PULL for v6.14] media updates 2025-01-25 15:59:46 -08:00
soundwire
spi spi: Fix for v6.14 2025-01-24 16:12:12 -08:00
spmi spmi: hisi-spmi-controller: Drop duplicated OF node assignment in spmi_controller_probe() 2025-01-17 12:58:49 +01:00
ssb
staging Staging driver updates for 6.14-rc1 2025-01-27 16:43:27 -08:00
target SCSI misc on 20250126 2025-01-26 16:12:44 -08:00
tc
tee
thermal Merge branch 'thermal-intel' 2025-01-20 13:10:15 +01:00
thunderbolt
tty treewide: const qualify ctl_tables where applicable 2025-01-28 13:48:37 +01:00
ufs SCSI misc on 20250126 2025-01-26 16:12:44 -08:00
uio Char/Misc/IIO driver updates for 6.14-rc1 2025-01-27 16:51:51 -08:00
usb USB / Thunderbolt driver updates for 6.14-rc1 2025-01-27 16:29:16 -08:00
vdpa virtio: features, fixes, cleanups 2025-01-27 15:26:06 -08:00
vfio The various patchsets are summarized below. Plus of course many 2025-01-26 18:36:23 -08:00
vhost vhost/net: Set num_buffers for virtio 1.0 2025-01-27 09:39:25 -05:00
video fbdev fixes and updates for 6.14-rc1: 2025-01-24 11:32:13 -08:00
virt - A segmented Reverse Map table (RMP) is a across-nodes distributed 2025-01-21 09:00:31 -08:00
virtio virtio: features, fixes, cleanups 2025-01-27 15:26:06 -08:00
w1
watchdog linux-watchdog 6.14-rc1 tag 2025-01-25 16:19:10 -08:00
xen treewide: const qualify ctl_tables where applicable 2025-01-28 13:48:37 +01:00
zorro
Kconfig
Makefile