Contributors: 26
Author Tokens Token Proportion Commits Commit Proportion
Thomas Gleixner 28 11.57% 4 9.30%
Alexander van Heukelum 25 10.33% 4 9.30%
Yi Wang 25 10.33% 1 2.33%
Srinivasa D S 20 8.26% 2 4.65%
Linus Torvalds (pre-git) 18 7.44% 3 6.98%
Jaswinder Singh Rajput 17 7.02% 2 4.65%
Andrew Lutomirski 17 7.02% 4 9.30%
Andi Kleen 13 5.37% 1 2.33%
Jeremy Fitzhardinge 12 4.96% 1 2.33%
Joerg Roedel 10 4.13% 2 4.65%
Josh Poimboeuf 7 2.89% 2 4.65%
Gleb Natapov 7 2.89% 1 2.33%
Harvey Harrison 6 2.48% 1 2.33%
Hiroshi Shimamoto 6 2.48% 1 2.33%
Peter Zijlstra 5 2.07% 2 4.65%
Jamie Lokier 5 2.07% 1 2.33%
Tejun Heo 3 1.24% 1 2.33%
Lai Jiangshan 3 1.24% 1 2.33%
H. Peter Anvin 3 1.24% 1 2.33%
Ingo Molnar 3 1.24% 2 4.65%
Frédéric Weisbecker 2 0.83% 1 2.33%
Alexander Kuleshov 2 0.83% 1 2.33%
Tony Luck 2 0.83% 1 2.33%
Hou Wenlong 1 0.41% 1 2.33%
Jan Beulich 1 0.41% 1 2.33%
Greg Kroah-Hartman 1 0.41% 1 2.33%
Total 242 43


/* SPDX-License-Identifier: GPL-2.0 */
#ifndef _ASM_X86_TRAPS_H
#define _ASM_X86_TRAPS_H

#include <linux/context_tracking_state.h>
#include <linux/kprobes.h>

#include <asm/debugreg.h>
#include <asm/idtentry.h>
#include <asm/siginfo.h>			/* TRAP_TRACE, ... */
#include <asm/trap_pf.h>

#ifdef CONFIG_X86_64
asmlinkage __visible notrace struct pt_regs *sync_regs(struct pt_regs *eregs);
asmlinkage __visible notrace
struct pt_regs *fixup_bad_iret(struct pt_regs *bad_regs);
asmlinkage __visible noinstr struct pt_regs *vc_switch_off_ist(struct pt_regs *eregs);
#endif

extern int ibt_selftest(void);
extern int ibt_selftest_noendbr(void);

#ifdef CONFIG_X86_F00F_BUG
/* For handling the FOOF bug */
void handle_invalid_op(struct pt_regs *regs);
#endif

noinstr bool handle_bug(struct pt_regs *regs);

static inline int get_si_code(unsigned long condition)
{
	if (condition & DR_STEP)
		return TRAP_TRACE;
	else if (condition & (DR_TRAP0|DR_TRAP1|DR_TRAP2|DR_TRAP3))
		return TRAP_HWBKPT;
	else
		return TRAP_BRKPT;
}

void math_emulate(struct math_emu_info *);

bool fault_in_kernel_space(unsigned long address);

#ifdef CONFIG_VMAP_STACK
void __noreturn handle_stack_overflow(struct pt_regs *regs,
				      unsigned long fault_address,
				      struct stack_info *info);
#endif

static inline void cond_local_irq_enable(struct pt_regs *regs)
{
	if (regs->flags & X86_EFLAGS_IF)
		local_irq_enable();
}

static inline void cond_local_irq_disable(struct pt_regs *regs)
{
	if (regs->flags & X86_EFLAGS_IF)
		local_irq_disable();
}

#endif /* _ASM_X86_TRAPS_H */