linux-yocto/arch/x86/kernel/cpu
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
..
mce x86/mce/amd: Remove shared threshold bank plumbing 2025-01-03 19:05:35 +01:00
microcode x86/microcode/AMD: Remove ret local var in early_apply_microcode() 2024-12-31 14:03:41 +01:00
mtrr x86/mtrr: Rename mtrr_overwrite_state() to guest_force_mtrr_state() 2024-12-04 10:46:19 -08:00
resctrl - Remove the less generic CPU matching infra around struct x86_cpu_desc and 2025-01-21 09:30:59 -08:00
sgx - Use vmalloc_array() instead of vmalloc() 2024-11-22 12:50:00 -08:00
.gitignore
acrn.c
amd.c - Remove the less generic CPU matching infra around struct x86_cpu_desc and 2025-01-21 09:30:59 -08:00
aperfmperf.c x86/sched: Add basic support for CPU capacity scaling 2024-09-04 13:36:40 +02:00
bugs.c x86/bugs: Add SRSO_USER_KERNEL_NO support 2024-12-30 17:48:33 +01:00
bus_lock.c treewide: const qualify ctl_tables where applicable 2025-01-28 13:48:37 +01:00
cacheinfo.c x86/cacheinfo: Delete global num_cache_leaves 2024-12-06 13:13:36 +01:00
centaur.c
common.c - Remove the less generic CPU matching infra around struct x86_cpu_desc and 2025-01-21 09:30:59 -08:00
cpu.h x86/topology/intel: Unlock CPUID before evaluating anything 2024-05-31 20:25:56 +02:00
cpuid-deps.c x86/msr: Switch between WRMSRNS and WRMSR with the alternatives mechanism 2024-08-25 19:23:00 +02:00
cyrix.c
debugfs.c x86/topology: Introduce topology_logical_core_id() 2024-12-02 12:01:35 +01:00
feat_ctl.c x86/cpu: Clarify the error message when BIOS does not support SGX 2024-08-25 14:41:19 +02:00
hygon.c
hypervisor.c
intel_epb.c x86/cpu/intel_epb: Switch to new Intel CPU model defines 2024-04-29 10:31:16 +02:00
intel.c - Remove the less generic CPU matching infra around struct x86_cpu_desc and 2025-01-21 09:30:59 -08:00
Makefile x86/split_lock: Move Split and Bus lock code to a dedicated file 2024-08-08 18:02:15 +02:00
match.c Miscellaneous x86 cleanups and typo fixes, and also the removal 2025-01-21 11:15:29 -08:00
mkcapflags.sh x86/cpufeatures: Flip the /proc/cpuinfo appearance logic 2024-06-20 21:04:22 +02:00
mshyperv.c hyperv: Switch from hyperv-tlfs.h to hyperv/hvhdk.h 2025-01-10 00:54:21 +00:00
perfctr-watchdog.c
powerflags.c
proc.c x86/cpu: Use str_yes_no() helper in show_cpuinfo_misc() 2024-10-26 15:37:15 +02:00
rdrand.c
scattered.c x86/cpu: Fix formatting of cpuid_bits[] in scattered.c 2024-10-28 13:51:05 +01:00
topology_amd.c x86/cpu: Add CPU type to struct cpuinfo_topology 2024-10-25 20:44:26 +02:00
topology_common.c x86/topology: Introduce topology_logical_core_id() 2024-12-02 12:01:35 +01:00
topology_ext.c x86/cpu/topology: Add support for the AMD 0x80000026 leaf 2024-03-22 11:22:14 +01:00
topology.c Merge branch 'linus' into x86/cleanups, to resolve conflict 2024-12-10 19:33:03 +01:00
topology.h
transmeta.c
tsx.c
umc.c
umwait.c
vmware.c x86/vmware: Add TDX hypercall support 2024-06-25 17:15:48 +02:00
vortex.c
zhaoxin.c