xen/keyhandler: CFI hardening
authorAndrew Cooper <andrew.cooper3@citrix.com>
Thu, 28 Oct 2021 10:18:45 +0000 (11:18 +0100)
committerAndrew Cooper <andrew.cooper3@citrix.com>
Wed, 23 Feb 2022 15:33:43 +0000 (15:33 +0000)
commitef0434ae38030d0a002805c72f5c2819c20d9dcc
treefd890757ea18e9a123f2ec1cca382b5bf8641c1c
parent69f14d2ad9f7b23cdf2aad3b907b06c7f94cffab
xen/keyhandler: CFI hardening

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.

Tweak {IRQ_,}KEYHANDLER() to use a named initialiser instead of requiring a
pointer cast to compile in the IRQ case.

Reposition iommu_dump_page_tables() to avoid a forward declaration.

Signed-off-by: Andrew Cooper <andrew.cooper3@citrix.com>
Acked-by: Jan Beulich <jbeulich@suse.com>
33 files changed:
xen/arch/x86/acpi/cpu_idle.c
xen/arch/x86/hvm/irq.c
xen/arch/x86/hvm/svm/vmcb.c
xen/arch/x86/hvm/vmx/vmcs.c
xen/arch/x86/io_apic.c
xen/arch/x86/irq.c
xen/arch/x86/mm/p2m-ept.c
xen/arch/x86/mm/shadow/common.c
xen/arch/x86/msi.c
xen/arch/x86/nmi.c
xen/arch/x86/numa.c
xen/arch/x86/time.c
xen/common/debugtrace.c
xen/common/event_channel.c
xen/common/grant_table.c
xen/common/kexec.c
xen/common/keyhandler.c
xen/common/livepatch.c
xen/common/page_alloc.c
xen/common/perfc.c
xen/common/sched/cpupool.c
xen/common/spinlock.c
xen/common/timer.c
xen/drivers/char/console.c
xen/drivers/passthrough/amd/iommu.h
xen/drivers/passthrough/amd/iommu_intr.c
xen/drivers/passthrough/iommu.c
xen/drivers/passthrough/pci.c
xen/drivers/passthrough/vtd/extern.h
xen/drivers/passthrough/vtd/utils.c
xen/include/xen/perfc.h
xen/include/xen/sched.h
xen/include/xen/spinlock.h