[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] [xen staging] x86/pt: CFI hardening
commit e236fb0798f46d1c15bacdc1d52dc906c74e0ff8 Author: Andrew Cooper <andrew.cooper3@xxxxxxxxxx> AuthorDate: Fri Oct 29 19:47:47 2021 +0100 Commit: Andrew Cooper <andrew.cooper3@xxxxxxxxxx> CommitDate: Wed Feb 23 15:33:43 2022 +0000 x86/pt: 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. Signed-off-by: Andrew Cooper <andrew.cooper3@xxxxxxxxxx> Acked-by: Jan Beulich <jbeulich@xxxxxxxx> --- xen/arch/x86/emul-i8254.c | 2 +- xen/arch/x86/hvm/hpet.c | 2 +- xen/arch/x86/hvm/rtc.c | 2 +- xen/arch/x86/hvm/vlapic.c | 4 ++-- 4 files changed, 5 insertions(+), 5 deletions(-) diff --git a/xen/arch/x86/emul-i8254.c b/xen/arch/x86/emul-i8254.c index d170f464d9..18894b6348 100644 --- a/xen/arch/x86/emul-i8254.c +++ b/xen/arch/x86/emul-i8254.c @@ -156,7 +156,7 @@ static int pit_get_gate(PITState *pit, int channel) return pit->hw.channels[channel].gate; } -static void pit_time_fired(struct vcpu *v, void *priv) +static void cf_check pit_time_fired(struct vcpu *v, void *priv) { uint64_t *count_load_time = priv; TRACE_0D(TRC_HVM_EMUL_PIT_TIMER_CB); diff --git a/xen/arch/x86/hvm/hpet.c b/xen/arch/x86/hvm/hpet.c index ed512fa65b..45c7b9b406 100644 --- a/xen/arch/x86/hvm/hpet.c +++ b/xen/arch/x86/hvm/hpet.c @@ -219,7 +219,7 @@ static void hpet_stop_timer(HPETState *h, unsigned int tn, hpet_get_comparator(h, tn, guest_time); } -static void hpet_timer_fired(struct vcpu *v, void *data) +static void cf_check hpet_timer_fired(struct vcpu *v, void *data) { unsigned int tn = (unsigned long)data; HPETState *h = vcpu_vhpet(v); diff --git a/xen/arch/x86/hvm/rtc.c b/xen/arch/x86/hvm/rtc.c index ed397276fa..d21925db08 100644 --- a/xen/arch/x86/hvm/rtc.c +++ b/xen/arch/x86/hvm/rtc.c @@ -81,7 +81,7 @@ static void rtc_update_irq(RTCState *s) /* Called by the VPT code after it's injected a PF interrupt for us. * Fix up the register state to reflect what happened. */ -static void rtc_pf_callback(struct vcpu *v, void *opaque) +static void cf_check rtc_pf_callback(struct vcpu *v, void *opaque) { RTCState *s = opaque; diff --git a/xen/arch/x86/hvm/vlapic.c b/xen/arch/x86/hvm/vlapic.c index d4e29ef1ff..49be9c8ea4 100644 --- a/xen/arch/x86/hvm/vlapic.c +++ b/xen/arch/x86/hvm/vlapic.c @@ -691,13 +691,13 @@ int guest_rdmsr_x2apic(const struct vcpu *v, uint32_t msr, uint64_t *val) return X86EMUL_OKAY; } -static void vlapic_pt_cb(struct vcpu *v, void *data) +static void cf_check vlapic_pt_cb(struct vcpu *v, void *data) { TRACE_0D(TRC_HVM_EMUL_LAPIC_TIMER_CB); *(s_time_t *)data = hvm_get_guest_time(v); } -static void vlapic_tdt_pt_cb(struct vcpu *v, void *data) +static void cf_check vlapic_tdt_pt_cb(struct vcpu *v, void *data) { *(s_time_t *)data = hvm_get_guest_time(v); vcpu_vlapic(v)->hw.tdt_msr = 0; -- generated by git-patchbot for /home/xen/git/xen.git#staging
|
Lists.xenproject.org is hosted with RackSpace, monitoring our |