linux/arch/s390/kernel
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
..
diag s390/diag: Add memory topology information via diag310 2025-01-15 13:59:08 +01:00
syscalls s390 updates for 6.13 merge window 2024-11-18 17:45:41 -08:00
vdso32 s390/vdso: Drop LBASE_VDSO 2024-11-02 12:37:32 +01:00
vdso64 s390/Kconfig: Select VMAP_STACK unconditionally 2024-12-10 15:41:58 +01:00
.gitignore
abs_lowcore.c s390: Remove __bootdata annotations from declarations 2024-12-15 16:19:04 +01:00
alternative.c s390: Add infrastructure to patch lowcore accesses 2024-07-23 16:02:32 +02:00
asm-offsets.c fgraph: Replace fgraph_ret_regs with ftrace_regs 2024-12-26 10:50:02 -05:00
audit.c
audit.h
cache.c
cert_store.c
compat_audit.c
compat_linux.c
compat_linux.h
compat_ptrace.h
compat_signal.c s390/vdso: Move vdso symbol handling to separate header file 2024-09-13 17:28:36 +02:00
cpacf.c s390/crypto/cpacf: Constify 'struct bin_attribute' 2025-01-07 10:05:35 +01:00
cpcmd.c s390/cpcmd: Convert to use flag output macros 2024-11-13 14:31:32 +01:00
cpufeature.c
crash_dump.c virtio: features, fixes, cleanups 2025-01-27 15:26:06 -08:00
ctlreg.c
debug.c treewide: const qualify ctl_tables where applicable 2025-01-28 13:48:37 +01:00
dis.c s390/disassembler: Remove duplicate instruction format RSY_RDRU 2024-09-12 14:13:27 +02:00
dumpstack.c
early.c s390/setup: Recognize sequential instruction fetching facility 2024-08-29 22:56:34 +02:00
early_printk.c s390/early: Dump register contents and call trace for early crashes 2024-08-22 19:28:11 +02:00
ebcdic.c
entry.h s390/tracing: Enable HAVE_FTRACE_GRAPH_FUNC 2024-12-26 10:50:05 -05:00
entry.S s390/Kconfig: Select VMAP_STACK unconditionally 2024-12-10 15:41:58 +01:00
facility.c
fpu.c s390/fpu: Re-add exception handling in load_fpu_state() 2024-07-31 16:30:20 +02:00
ftrace.c s390/tracing: Enable HAVE_FTRACE_GRAPH_FUNC 2024-12-26 10:50:05 -05:00
ftrace.h s390/ftrace: Remove unused ftrace_plt_template* 2024-08-27 20:16:48 +02:00
guarded_storage.c
head64.S s390/head64: Make startup code ready for lowcore relocation 2024-07-23 16:02:32 +02:00
hiperdispatch.c treewide: const qualify ctl_tables where applicable 2025-01-28 13:48:37 +01:00
idle.c
ima_arch.c
ipl.c s390 updates for 6.14 merge window 2025-01-20 21:14:49 -08:00
ipl_vmparm.c
irq.c A set of updates for the interrupt subsystem: 2024-11-19 15:54:19 -08:00
jump_label.c
kdebugfs.c
kexec_elf.c
kexec_image.c
kprobes.c s390/entry: Mark IRQ entries to fix stack depot warnings 2024-11-21 12:44:07 +01:00
lgr.c s390: kernel: convert timeouts to use secs_to_jiffies() 2025-01-12 20:21:01 -08:00
machine_kexec.c s390/kdump: Make kdump ready for lowcore relocation 2024-07-23 16:02:32 +02:00
machine_kexec_file.c
machine_kexec_reloc.c
Makefile s390/diag: Move diag.c to diag specific folder 2024-12-17 12:46:14 +01:00
mcount.S s390/tracing: Enable HAVE_FTRACE_GRAPH_FUNC 2024-12-26 10:50:05 -05:00
module.c
nmi.c
nospec-branch.c s390/nospec: Push down alternative handling 2024-07-23 16:02:31 +02:00
nospec-sysfs.c s390/nospec: Switch over to sysfs_emit() 2024-10-25 16:03:24 +02:00
numa.c mm/memblock: add memblock_alloc_or_panic interface 2025-01-25 20:22:38 -08:00
os_info.c s390: Remove __bootdata annotations from declarations 2024-12-15 16:19:04 +01:00
perf_cpum_cf.c Linux 6.13-rc1 2024-12-02 11:52:59 +01:00
perf_cpum_cf_events.c
perf_cpum_sf.c perf/core: Export perf_exclude_event() 2024-12-09 15:50:31 +01:00
perf_event.c Performance events changes for v6.13: 2024-11-19 13:34:06 -08:00
perf_pai_crypto.c perf/core: Save raw sample data conditionally based on sample type 2024-11-19 09:23:42 +01:00
perf_pai_ext.c perf/core: Save raw sample data conditionally based on sample type 2024-11-19 09:23:42 +01:00
perf_regs.c
process.c
processor.c s390/alternatives: Move text sync functions 2024-07-23 16:02:31 +02:00
ptrace.c
reipl.S s390/kdump: Make kdump ready for lowcore relocation 2024-07-23 16:02:32 +02:00
relocate_kernel.S
rethook.c
rethook.h
runtime_instr.c
setup.c The various patchsets are summarized below. Plus of course many 2025-01-26 18:36:23 -08:00
signal.c s390/vdso: Move vdso symbol handling to separate header file 2024-09-13 17:28:36 +02:00
smp.c mm/memblock: add memblock_alloc_or_panic interface 2025-01-25 20:22:38 -08:00
stacktrace.c s390/stacktrace: Use break instead of return statement 2024-11-21 12:44:07 +01:00
sthyi.c s390/sthyi: Convert to use flag output macros 2024-11-13 14:31:31 +01:00
syscall.c
sysinfo.c [tree-wide] finally take no_llseek out 2024-09-27 08:18:43 -07:00
text_amode31.S s390/amode31: Use exrl instead of ex 2025-01-13 09:50:17 +01:00
time.c s390: kernel: convert timeouts to use secs_to_jiffies() 2025-01-12 20:21:01 -08:00
topology.c treewide: const qualify ctl_tables where applicable 2025-01-28 13:48:37 +01:00
trace.c
traps.c s390/mm/fault: Handle guest-related program interrupts in KVM 2024-10-29 11:49:18 +01:00
unwind_bc.c
uprobes.c
uv.c s390/uv: Retrieve UV secrets sysfs support 2024-10-29 11:17:17 +01:00
vdso.c s390/vdso: Wire up getrandom() vdso implementation 2024-09-13 20:57:31 +02:00
vmcore_info.c s390: Remove __bootdata annotations from declarations 2024-12-15 16:19:04 +01:00
vmlinux.lds.S asm-generic updates for 6.12 2024-09-26 11:54:40 -07:00
vtime.c
wti.c s390/wti: Add debugfs file to display missed grace periods per cpu 2024-08-29 22:56:35 +02:00