linux/arch/powerpc/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
..
ptrace
syscalls fs/xattr: add *at family syscalls 2024-11-06 12:59:44 -05:00
trace fgraph: Pass ftrace_regs to entryfunc 2024-12-26 10:50:02 -05:00
vdso powerpc/Makefile: Allow overriding CPP 2024-11-15 11:59:55 +11:00
.gitignore
85xx_entry_mapping.S
align.c
asm-offsets.c powerpc/vdso: Remove unused clockmode asm offsets 2024-11-14 12:31:02 +11:00
audit.c
audit_32.h
btext.c
cacheinfo.c powerpc: Constify struct kobj_type 2024-09-05 22:25:36 +10:00
cacheinfo.h
compat_audit.c
cpu_setup_6xx.S
cpu_setup_44x.S
cpu_setup_e500.S
cpu_setup_pa6t.S
cpu_setup_power.c
cpu_setup_ppc970.S
cpu_specs.h
cpu_specs_8xx.h
cpu_specs_44x.h
cpu_specs_47x.h
cpu_specs_85xx.h
cpu_specs_book3s_32.h
cpu_specs_book3s_64.h
cpu_specs_e500mc.h
cputable.c
crash_dump.c asm-generic: introduce text-patching.h 2024-11-07 14:25:15 -08:00
dawr.c
dbell.c
dexcr.c
dma-iommu.c
dma-mask.c
dma-swiotlb.c
dt_cpu_ftrs.c mm/memblock: add memblock_alloc_or_panic interface 2025-01-25 20:22:38 -08:00
early_32.c
eeh.c powerpc/pseries/eeh: move pseries_eeh_err_inject() outside CONFIG_DEBUG_FS block 2024-09-20 19:06:25 +10:00
eeh_cache.c
eeh_driver.c
eeh_event.c
eeh_pe.c
eeh_sysfs.c
entry_32.S
epapr_hcalls.S
epapr_paravirt.c asm-generic: introduce text-patching.h 2024-11-07 14:25:15 -08:00
exceptions-64e.S
exceptions-64s.S powerpc/64s: Remove the "fast endian switch" syscall 2024-09-05 22:30:05 +10:00
fadump.c fadump: reserve param area if below boot_mem_top 2024-11-10 22:33:52 +11:00
firmware.c
fpu.S
head_8xx.S powerpc/8xx: Fix kernel DTLB miss on dcbz 2024-10-11 15:53:06 +11:00
head_32.h
head_44x.S
head_64.S
head_85xx.S
head_book3s_32.S powerpc/603: Inconditionally use task PGDIR in DTLB misses 2024-08-30 21:29:55 +10:00
head_booke.h
hw_breakpoint.c
hw_breakpoint_constraints.c
idle.c treewide: const qualify ctl_tables where applicable 2025-01-28 13:48:37 +01:00
idle_6xx.S
idle_64e.S
idle_85xx.S
idle_book3s.S
ima_arch.c
interrupt.c powerpc: Add preempt lazy support 2024-12-19 14:21:08 +05:30
interrupt_64.S
io-workarounds.c
io.c
iomap.c
iommu.c powerpc/pseries/iommu: IOMMU incorrectly marks MMIO range in DDW 2025-01-11 10:39:10 +05:30
irq.c powerpc/irq: use seq_put_decimal_ull_width() for decimal values 2024-11-10 22:33:52 +11:00
irq_64.c
isa-bridge.c
jump_label.c asm-generic: introduce text-patching.h 2024-11-07 14:25:15 -08:00
kdebugfs.c
kgdb.c asm-generic: introduce text-patching.h 2024-11-07 14:25:15 -08:00
kprobes-ftrace.c
kprobes.c powerpc updates for 6.13 2024-11-23 10:44:31 -08:00
kvm.c
kvm_emul.S
l2cr_6xx.S
legacy_serial.c
Makefile powerpc: Replace kretprobe code with rethook on powerpc 2024-09-05 22:25:36 +10:00
mce.c
mce_power.c
misc.S
misc_32.S powerpc/32: Replace mulhdu() by mul_u64_u64_shr() 2024-12-10 08:15:30 +05:30
misc_64.S powerpc/64: Remove maple platform 2024-10-29 23:01:52 +11:00
module.c
module_32.c asm-generic: introduce text-patching.h 2024-11-07 14:25:15 -08:00
module_64.c powerpc updates for 6.13 2024-11-23 10:44:31 -08:00
msi.c
note.S
nvram_64.c
of_platform.c
optprobes.c asm-generic: introduce text-patching.h 2024-11-07 14:25:15 -08:00
optprobes_head.S
paca.c
pci-common.c
pci-hotplug.c
pci_32.c mm/memblock: add memblock_alloc_or_panic interface 2025-01-25 20:22:38 -08:00
pci_64.c
pci_dn.c
pci_of_scan.c
pmc.c
ppc_save_regs.S
proc_powerpc.c powerpc: Split systemcfg struct definitions out from vdso 2024-11-02 12:37:36 +01:00
process.c powerpc/64: Use get_user() in start_thread() 2024-12-18 13:41:57 +05:30
prom.c powerpc updates for 6.13 2024-11-23 10:44:31 -08:00
prom_entry_64.S
prom_init.c powerpc/prom_init: Use IS_ENABLED() 2025-01-11 10:39:35 +05:30
prom_init_check.sh
prom_parse.c
reloc_32.S
reloc_64.S
rethook.c powerpc: Replace kretprobe code with rethook on powerpc 2024-09-05 22:25:36 +10:00
rtas-proc.c
rtas-rtc.c
rtas.c powerpc/rtas: Use fsleep() to minimize additional sleep duration 2024-10-16 00:36:48 +02:00
rtas_entry.S
rtas_flash.c
rtas_pci.c
rtasd.c
secure_boot.c powerpc: Use str_enabled_disabled() helper function 2024-11-05 20:48:20 +11:00
security.c asm-generic: introduce text-patching.h 2024-11-07 14:25:15 -08:00
secvar-ops.c
secvar-sysfs.c powerpc: Constify struct kobj_type 2024-09-05 22:25:36 +10:00
setup-common.c The various patchsets are summarized below. Plus of course many 2025-01-26 18:36:23 -08:00
setup.h
setup_32.c mm/memblock: add memblock_alloc_or_panic interface 2025-01-25 20:22:38 -08:00
setup_64.c powerpc updates for 6.13 2024-11-23 10:44:31 -08:00
signal.c
signal.h
signal_32.c
signal_64.c
smp-tbsync.c
smp.c powerpc: Split systemcfg struct definitions out from vdso 2024-11-02 12:37:36 +01:00
stacktrace.c powerpc: Replace kretprobe code with rethook on powerpc 2024-09-05 22:25:36 +10:00
static_call.c asm-generic: introduce text-patching.h 2024-11-07 14:25:15 -08:00
suspend.c
switch.S
swsusp.c
swsusp_32.S
swsusp_64.c
swsusp_85xx.S
swsusp_asm64.S
sys_ppc32.c
syscall.c treewide: context_tracking: Rename CONTEXT_* into CT_STATE_* 2024-07-29 07:33:10 +05:30
syscalls.c
sysfs.c powerpc/machdep: Drop include of dma-mapping.h 2024-10-29 23:01:05 +11:00
systbl.c
tau_6xx.c
time.c powerpc: Split systemcfg struct definitions out from vdso 2024-11-02 12:37:36 +01:00
tm.S
traps.c powerpc/traps: Use backlight power constants 2024-08-07 22:48:26 +10:00
ucall.S
udbg.c powerpc/64: Remove maple platform 2024-10-29 23:01:52 +11:00
udbg_16550.c powerpc/64: Remove maple platform 2024-10-29 23:01:52 +11:00
uprobes.c
vdso.c powerpc updates for 6.13 2024-11-23 10:44:31 -08:00
vdso32_wrapper.S powerpc/vdso: Mark the vDSO code read-only after init 2024-12-18 13:46:38 +05:30
vdso64_wrapper.S powerpc/vdso: Mark the vDSO code read-only after init 2024-12-18 13:46:38 +05:30
vecemu.c
vector.S
vmlinux.lds.S powerpc/ftrace: Move ftrace stub used for init text before _einittext 2024-10-31 11:00:54 +11:00
watchdog.c