linux-yocto/arch/x86
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
..
boot Miscellaneous x86 cleanups and typo fixes, and also the removal 2025-01-21 11:15:29 -08:00
coco The various patchsets are summarized below. Plus of course many 2025-01-26 18:36:23 -08:00
configs tinyconfig: remove unnecessary 'is not set' for choice blocks 2024-09-01 20:34:38 +09:00
crypto This update includes the following changes: 2025-01-24 07:48:10 -08:00
entry treewide: const qualify ctl_tables where applicable 2025-01-28 13:48:37 +01:00
events Performance events changes for v6.14: 2025-01-21 10:52:03 -08:00
hyperv hyperv-next for v6.14 2025-01-25 09:22:55 -08:00
ia32
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 Loongarch: 2025-01-25 09:55:09 -08:00
lib CRC updates for 6.14 2025-01-22 19:55:08 -08:00
math-emu
mm The various patchsets are summarized below. Plus of course many 2025-01-26 18:36:23 -08:00
net bpf, x86: Propagate tailcall info only for subprogs 2024-11-12 17:24:03 -08:00
pci pci-v6.14-changes 2025-01-25 16:03:40 -08:00
platform The various patchsets are summarized below. Plus of course many 2025-01-26 18:36:23 -08:00
power
purgatory Kbuild updates for v6.10 2024-05-18 12:39:20 -07:00
ras
realmode Makefile: remove redundant tool coverage variables 2024-05-14 23:35:48 +09:00
tools x86/boot: Reject absolute references in .head.text 2024-12-05 13:18:55 +01:00
um um: fix sparse warnings in signal code 2024-11-07 17:34:50 +01:00
video arch: Fix name collision with ACPI's video.o 2024-05-20 21:17:06 +00:00
virt * Centralize global metadata infrastructure 2025-01-24 05:58:31 -08:00
xen The various patchsets are summarized below. Plus of course many 2025-01-26 18:36:23 -08:00
.gitignore
Kbuild
Kconfig The various patchsets are summarized below. Plus of course many 2025-01-26 18:36:23 -08:00
Kconfig.assembler x86/kconfig: Add as-instr64 macro to properly evaluate AS_WRUSS 2024-06-20 19:48:18 +02:00
Kconfig.cpu
Kconfig.debug Documentation: Merge x86-specific boot options doc into kernel-parameters.txt 2024-12-10 18:25:40 +01:00
Makefile x86/stackprotector: Work around strict Clang TLS symbol requirements 2024-11-08 13:16:00 +01:00
Makefile_32.cpu
Makefile.postlink
Makefile.um arch: um: rust: Use the generated target.json again 2024-07-03 12:22:11 +02:00