Skip to content

Commit

Permalink
x86/entry: disable CFI for run_on_irqstack_cond
Browse files Browse the repository at this point in the history
run_on_irqstack_cond casts callback functions to mismatching
types, which trips indirect call Control-Flow Integrity (CFI)
checking.

Link: ClangBuiltLinux#1052
Signed-off-by: Sami Tolvanen <samitolvanen@google.com>
  • Loading branch information
samitolvanen committed Jun 23, 2020
1 parent 017a6e6 commit a4f168a
Showing 1 changed file with 1 addition and 0 deletions.
1 change: 1 addition & 0 deletions arch/x86/include/asm/irq_stack.h
Original file line number Diff line number Diff line change
Expand Up @@ -37,6 +37,7 @@ static __always_inline bool irq_needs_irq_stack(struct pt_regs *regs)
return !user_mode(regs) && !irqstack_active();
}

__nocfi
static __always_inline void run_on_irqstack_cond(void *func, void *arg,
struct pt_regs *regs)
{
Expand Down

0 comments on commit a4f168a

Please sign in to comment.