linux-yocto/arch/s390
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
..
appldata treewide: const qualify ctl_tables where applicable 2025-01-28 13:48:37 +01:00
boot s390 updates for 6.14 merge window 2025-01-20 21:14:49 -08:00
configs This update includes the following changes: 2025-01-24 07:48:10 -08:00
crypto CRC updates for 6.14 2025-01-22 19:55:08 -08:00
hypfs [tree-wide] finally take no_llseek out 2024-09-27 08:18:43 -07:00
include The various patchsets are summarized below. Plus of course many 2025-01-26 18:36:23 -08:00
kernel treewide: const qualify ctl_tables where applicable 2025-01-28 13:48:37 +01:00
kvm KVM: s390: Reject KVM_SET_GSI_ROUTING on ucontrol VMs 2025-01-07 16:36:11 +01:00
lib CRC updates for 6.14 2025-01-22 19:55:08 -08:00
mm treewide: const qualify ctl_tables where applicable 2025-01-28 13:48:37 +01:00
net s390/bpf: Implement exceptions 2024-07-08 16:39:35 +02:00
pci s390/pci: Constify 'struct bin_attribute' 2025-01-07 10:05:35 +01:00
purgatory s390: Fix various typos 2024-10-25 16:03:23 +02:00
tools KVM: s390: add gen17 facilities to CPU model 2024-11-11 12:07:51 +00:00
Kbuild
Kconfig virtio: features, fixes, cleanups 2025-01-27 15:26:06 -08:00
Kconfig.debug
Makefile s390/Kconfig: Select VMAP_STACK unconditionally 2024-12-10 15:41:58 +01:00
Makefile.postlink s390/build: Avoid relocation information in final vmlinux 2024-08-27 20:16:48 +02:00