linux-yocto/arch/arm/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
..
.gitignore
arch_timer.c
armksyms.c
asm-offsets.c ARM: 9358/2: Implement PAN for LPAE by TTBR0 page table walks disablement 2024-04-18 12:10:46 +01:00
atags_compat.c
atags_parse.c vgacon: clean up global screen_info instances 2023-10-17 10:17:02 +02:00
atags_proc.c atags_proc: Add __counted_by for struct buffer and use struct_size() 2023-12-02 12:32:07 -08:00
atags.h
bios32.c
bugs.c
cacheinfo.c ARM: 9440/1: cacheinfo fix format field mask 2025-01-22 20:55:01 +00:00
cpuidle.c
crash_dump.c
debug.S
devtree.c of/fdt: add dt_phys arg to early_init_dt_scan and early_init_dt_verify 2024-10-29 15:32:45 -05:00
dma.c
early_printk.c
efi.c vgacon: clean up global screen_info instances 2023-10-17 10:17:02 +02:00
elf.c
entry-armv.S ARM: 9430/1: entry: Do a dummy read from VMAP shadow 2024-11-13 08:15:23 +00:00
entry-common.S ARM: 9407/1: Add support for STACKLEAK gcc plugin 2024-07-02 09:18:43 +01:00
entry-ftrace.S ARM: 9382/1: ftrace: Define ftrace_stub_graph 2024-04-18 12:12:18 +01:00
entry-header.S
entry-v7m.S
fiq.c
fiqasm.S
ftrace.c asm-generic: introduce text-patching.h 2024-11-07 14:25:15 -08:00
head-common.S
head-inflate-data.c
head-nommu.S
head.h
head.S ARM: 9420/1: smp: Fix SMP for xip kernels 2024-11-12 16:38:47 +00:00
hibernate.c
hw_breakpoint.c ARM development updates for v6.10-rc1 2024-05-17 08:53:47 -07:00
hyp-stub.S
insn.c
io.c
irq.c ARM: Switch to irq_get_nr_irqs() / irq_set_nr_irqs() 2024-10-16 21:56:56 +02:00
isa.c treewide: const qualify ctl_tables where applicable 2025-01-28 13:48:37 +01:00
iwmmxt.h
iwmmxt.S ARM: 9352/1: iwmmxt: Remove support for PJ4/PJ4B cores 2024-02-26 10:16:31 +00:00
jump_label.c asm-generic: introduce text-patching.h 2024-11-07 14:25:15 -08:00
kgdb.c asm-generic: introduce text-patching.h 2024-11-07 14:25:15 -08:00
machine_kexec.c kexec: Consolidate machine_kexec_mask_interrupts() implementation 2024-12-11 20:32:34 +01:00
Makefile ARM: 9433/2: implement cacheinfo support 2025-01-14 12:29:30 +00:00
module-plts.c ARM: module: Use module_init_layout_section() to spot init sections 2023-08-03 13:42:02 -07:00
module.c ARM: 9400/1: Remove unused struct 'mod_unwind_map' 2024-06-10 12:01:30 +01:00
opcodes.c
paravirt.c
patch.c asm-generic: introduce text-patching.h 2024-11-07 14:25:15 -08:00
perf_callchain.c perf/arm: Drop unused functions 2024-11-14 10:40:00 +01:00
perf_regs.c
phys2virt.S
process.c
psci_smp.c ARM: 9420/1: smp: Fix SMP for xip kernels 2024-11-12 16:38:47 +00:00
ptrace.c ARM updates for v6.6-rc1 2023-08-31 12:49:10 -07:00
reboot.c
reboot.h
relocate_kernel.S
return_address.c
setup.c mm/memblock: add memblock_alloc_or_panic interface 2025-01-25 20:22:38 -08:00
signal.c x86/shstk: Add user control-protection fault handler 2023-08-02 15:01:50 -07:00
signal.h
sigreturn_codes.S
sleep.S ARM: 9381/1: kasan: clear stale stack poison 2024-04-29 14:11:25 +01:00
smccc-call.S
smp_scu.c
smp_tlb.c
smp_twd.c ARM: smp_twd: Remove clockevents shutdown call on offlining 2024-10-31 10:41:42 +01:00
smp.c nmi_backtrace: allow excluding an arbitrary CPU 2023-08-18 10:19:00 -07:00
spectre.c
stacktrace.c
suspend.c ARM: 9358/2: Implement PAN for LPAE by TTBR0 page table walks disablement 2024-04-18 12:10:46 +01:00
swp_emulate.c
sys_arm.c
sys_oabi-compat.c fdget_raw() users: switch to CLASS(fd_raw) 2024-11-03 01:28:06 -05:00
tcm.c
thumbee.c
time.c
topology.c sched/balancing: Rename rebalance_domains() => sched_balance_domains() 2024-03-12 11:59:59 +01:00
traps.c ARM: fix cacheflush with PAN 2024-11-12 23:51:06 +00:00
unwind.c ARM: 9349/1: unwind: Add missing "Call trace:" line 2024-02-24 16:47:19 +00:00
v7m.c
vdso.c arm: vdso: Remove timekeeper includes 2024-10-15 17:50:29 +02:00
vmcore_info.c arch, crash: move arch_crash_save_vmcoreinfo() out to file vmcore_info.c 2024-02-23 17:48:25 -08:00
vmlinux-xip.lds.S ARM: 9404/1: arm32: enable HAVE_LD_DEAD_CODE_DATA_ELIMINATION 2024-06-10 12:01:33 +01:00
vmlinux.lds.S ARM: 9404/1: arm32: enable HAVE_LD_DEAD_CODE_DATA_ELIMINATION 2024-06-10 12:01:33 +01:00
xscale-cp0.c