Most of the interrupt related trace points are cratering when enabled.
Simply turn them off temporarily while we are investigating this.
CVE-2017-5754
Based on work by Colin King <colin.king@canonical.com>
Signed-off-by: Andy Whitcroft <apw@canonical.com>
Signed-off-by: Kleber Sacilotto de Souza <kleber.souza@canonical.com>
* irq_work - called when entering/exiting a irq work interrupt
* vector handler
*/
-DEFINE_IRQ_VECTOR_EVENT(irq_work);
+// DEFINE_IRQ_VECTOR_EVENT(irq_work);
/*
* We must dis-allow sampling irq_work_exit() because perf event sampling
#include <linux/smp.h>
#include <linux/mm.h>
-#include <asm/trace/irq_vectors.h>
#include <asm/irq_remapping.h>
#include <asm/perf_event.h>
#include <asm/x86_init.h>
* interrupt lock, which is the WrongThing (tm) to do.
*/
entering_ack_irq();
- trace_local_timer_entry(LOCAL_TIMER_VECTOR);
local_apic_timer_interrupt();
- trace_local_timer_exit(LOCAL_TIMER_VECTOR);
exiting_irq();
set_irq_regs(old_regs);
u8 vector = ~regs->orig_ax;
entering_irq();
- trace_spurious_apic_entry(vector);
__smp_spurious_interrupt(vector);
- trace_spurious_apic_exit(vector);
exiting_irq();
}
__visible void __irq_entry smp_trace_error_interrupt(struct pt_regs *regs)
{
entering_irq();
- trace_error_apic_entry(ERROR_APIC_VECTOR);
__smp_error_interrupt(regs);
- trace_error_apic_exit(ERROR_APIC_VECTOR);
exiting_irq();
}
#include <asm/apic.h>
#include <asm/mce.h>
#include <asm/msr.h>
-#include <asm/trace/irq_vectors.h>
#define NR_BLOCKS 5
#define THRESHOLD_MAX 0xFFF
asmlinkage __visible void __irq_entry smp_trace_deferred_error_interrupt(void)
{
entering_irq();
- trace_deferred_error_apic_entry(DEFERRED_ERROR_VECTOR);
__smp_deferred_error_interrupt();
- trace_deferred_error_apic_exit(DEFERRED_ERROR_VECTOR);
exiting_ack_irq();
}
#include <asm/apic.h>
#include <asm/mce.h>
#include <asm/msr.h>
-#include <asm/trace/irq_vectors.h>
/* How long to wait between reporting thermal events */
#define CHECK_INTERVAL (300 * HZ)
smp_trace_thermal_interrupt(struct pt_regs *regs)
{
entering_irq();
- trace_thermal_apic_entry(THERMAL_APIC_VECTOR);
__smp_thermal_interrupt();
- trace_thermal_apic_exit(THERMAL_APIC_VECTOR);
exiting_ack_irq();
}
#include <asm/irq_vectors.h>
#include <asm/apic.h>
#include <asm/mce.h>
-#include <asm/trace/irq_vectors.h>
static void default_threshold_interrupt(void)
{
asmlinkage __visible void __irq_entry smp_trace_threshold_interrupt(void)
{
entering_irq();
- trace_threshold_apic_entry(THRESHOLD_APIC_VECTOR);
__smp_threshold_interrupt();
- trace_threshold_apic_exit(THRESHOLD_APIC_VECTOR);
exiting_ack_irq();
}
#include <asm/desc.h>
#define CREATE_TRACE_POINTS
-#include <asm/trace/irq_vectors.h>
DEFINE_PER_CPU_SHARED_ALIGNED(irq_cpustat_t, irq_stat);
EXPORT_PER_CPU_SYMBOL(irq_stat);
struct pt_regs *old_regs = set_irq_regs(regs);
entering_ack_irq();
- trace_x86_platform_ipi_entry(X86_PLATFORM_IPI_VECTOR);
__smp_x86_platform_ipi();
- trace_x86_platform_ipi_exit(X86_PLATFORM_IPI_VECTOR);
exiting_irq();
set_irq_regs(old_regs);
}
#include <linux/irq_work.h>
#include <linux/hardirq.h>
#include <asm/apic.h>
-#include <asm/trace/irq_vectors.h>
#include <linux/interrupt.h>
static inline void __smp_irq_work_interrupt(void)
__visible void __irq_entry smp_trace_irq_work_interrupt(struct pt_regs *regs)
{
ipi_entering_ack_irq();
- trace_irq_work_entry(IRQ_WORK_VECTOR);
__smp_irq_work_interrupt();
- trace_irq_work_exit(IRQ_WORK_VECTOR);
exiting_irq();
}
#include <asm/apic.h>
#include <asm/nmi.h>
#include <asm/mce.h>
-#include <asm/trace/irq_vectors.h>
#include <asm/kexec.h>
#include <asm/virtext.h>
* to nest.
*/
ipi_entering_ack_irq();
- trace_reschedule_entry(RESCHEDULE_VECTOR);
__smp_reschedule_interrupt();
- trace_reschedule_exit(RESCHEDULE_VECTOR);
exiting_irq();
/*
* KVM uses this interrupt to force a cpu out of guest mode
smp_trace_call_function_interrupt(struct pt_regs *regs)
{
ipi_entering_ack_irq();
- trace_call_function_entry(CALL_FUNCTION_VECTOR);
__smp_call_function_interrupt();
- trace_call_function_exit(CALL_FUNCTION_VECTOR);
exiting_irq();
}
smp_trace_call_function_single_interrupt(struct pt_regs *regs)
{
ipi_entering_ack_irq();
- trace_call_function_single_entry(CALL_FUNCTION_SINGLE_VECTOR);
__smp_call_function_single_interrupt();
- trace_call_function_single_exit(CALL_FUNCTION_SINGLE_VECTOR);
exiting_irq();
}
#include <asm/mmu_context.h> /* vma_pkey() */
#define CREATE_TRACE_POINTS
-#include <asm/trace/exceptions.h>
/*
* Returns 0 if mmiotrace is disabled, or if the fault is not
trace_page_fault_entries(unsigned long address, struct pt_regs *regs,
unsigned long error_code)
{
- if (user_mode(regs))
- trace_page_fault_user(address, regs, error_code);
- else
- trace_page_fault_kernel(address, regs, error_code);
}
/*
enum ctx_state prev_state;
prev_state = exception_enter();
- if (trace_irqvectors_enabled())
- trace_page_fault_entries(address, regs, error_code);
+// if (trace_irqvectors_enabled())
+// trace_page_fault_entries(address, regs, error_code);
__do_page_fault(regs, error_code, address);
exception_exit(prev_state);