xen: CFI hardening for custom_param()
authorAndrew Cooper <andrew.cooper3@citrix.com>
Wed, 27 Oct 2021 13:21:51 +0000 (14:21 +0100)
committerAndrew Cooper <andrew.cooper3@citrix.com>
Wed, 23 Feb 2022 15:33:43 +0000 (15:33 +0000)
commit17f0c6176e16ada6b97ccc7caac4b0b00f8e9032
treea60dc51259e9dba2134851427712f13272200c37
parent517b9114bfddf24ecb8890be79e1d218254dbf18
xen: CFI hardening for custom_param()

Control Flow Integrity schemes use toolchain and optionally hardware support
to help protect against call/jump/return oriented programming attacks.

Use cf_check to annotate function pointer targets for the toolchain.

The "watchdog_timeout" and "cpu_type" handlers were missing __init.

The "numa", "acpi", "irq_vector_map" and "flask" handlers can skip forward
declarations by altering the custom_param() position.

Signed-off-by: Andrew Cooper <andrew.cooper3@citrix.com>
Acked-by: Jan Beulich <jbeulich@suse.com>
49 files changed:
xen/arch/x86/acpi/cpu_idle.c
xen/arch/x86/acpi/power.c
xen/arch/x86/apic.c
xen/arch/x86/cpu/mcheck/mce.c
xen/arch/x86/cpu/microcode/core.c
xen/arch/x86/cpu/vpmu.c
xen/arch/x86/cpuid.c
xen/arch/x86/dom0_build.c
xen/arch/x86/genapic/probe.c
xen/arch/x86/hpet.c
xen/arch/x86/hvm/viridian/viridian.c
xen/arch/x86/hvm/vmx/vmcs.c
xen/arch/x86/io_apic.c
xen/arch/x86/irq.c
xen/arch/x86/mm.c
xen/arch/x86/nmi.c
xen/arch/x86/numa.c
xen/arch/x86/oprofile/nmi_int.c
xen/arch/x86/psr.c
xen/arch/x86/pv/domain.c
xen/arch/x86/pv/shim.c
xen/arch/x86/setup.c
xen/arch/x86/shutdown.c
xen/arch/x86/spec_ctrl.c
xen/arch/x86/time.c
xen/arch/x86/tsx.c
xen/arch/x86/x86_64/mmconfig-shared.c
xen/common/argo.c
xen/common/core_parking.c
xen/common/debugtrace.c
xen/common/domain.c
xen/common/efi/boot.c
xen/common/grant_table.c
xen/common/kexec.c
xen/common/memory.c
xen/common/page_alloc.c
xen/common/sched/cpupool.c
xen/common/sched/credit2.c
xen/drivers/acpi/tables.c
xen/drivers/char/console.c
xen/drivers/cpufreq/cpufreq.c
xen/drivers/passthrough/amd/iommu_acpi.c
xen/drivers/passthrough/iommu.c
xen/drivers/passthrough/pci.c
xen/drivers/passthrough/vtd/dmar.c
xen/drivers/passthrough/vtd/quirks.c
xen/drivers/video/vesa.c
xen/xsm/flask/flask_op.c
xen/xsm/xsm_core.c