]> xenbits.xensource.com Git - xen.git/commit
xen/tasklet: CFI hardening
authorAndrew Cooper <andrew.cooper3@citrix.com>
Thu, 28 Oct 2021 09:58:37 +0000 (10:58 +0100)
committerAndrew Cooper <andrew.cooper3@citrix.com>
Wed, 23 Feb 2022 15:33:43 +0000 (15:33 +0000)
commit69f14d2ad9f7b23cdf2aad3b907b06c7f94cffab
tree3b9ed5b59da57670db7ede6a24d39c4c65328332
parent0cccb0416e5480822a54bd74066f73c14238b168
xen/tasklet: 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.

The function pointer cast in hvm_vcpu_initialise() is undefined behaviour.

While it happens to function correctly, it is not compatible with control flow
typechecking, so introduce a new hvm_assert_evtchn_irq_tasklet() to handle the
parameter type conversion in a legal way.

Signed-off-by: Andrew Cooper <andrew.cooper3@citrix.com>
Acked-by: Jan Beulich <jbeulich@suse.com>
13 files changed:
xen/arch/x86/hvm/hvm.c
xen/arch/x86/hvm/vlapic.c
xen/arch/x86/include/asm/shadow.h
xen/arch/x86/mm/shadow/common.c
xen/common/domain.c
xen/common/keyhandler.c
xen/common/livepatch.c
xen/common/stop_machine.c
xen/common/trace.c
xen/drivers/char/console.c
xen/drivers/passthrough/amd/iommu_guest.c
xen/drivers/passthrough/amd/iommu_init.c
xen/drivers/passthrough/vtd/iommu.c