Re: [RFC PATCH v4 06/27] x86/cet: Control protection exception handler

2018-10-03 Thread Yu-cheng Yu
On Wed, 2018-10-03 at 12:39 +0200, Eugene Syromiatnikov wrote: > On Fri, Sep 21, 2018 at 08:03:30AM -0700, Yu-cheng Yu wrote: > > +dotraplinkage void > > +do_control_protection(struct pt_regs *regs, long error_code) > > +{ > > + struct task_struct *tsk; > > + > > + RCU_LOCKDEP_WARN(!rcu_is_watc

Re: [RFC PATCH v4 06/27] x86/cet: Control protection exception handler

2018-10-03 Thread Eugene Syromiatnikov
On Fri, Sep 21, 2018 at 08:03:30AM -0700, Yu-cheng Yu wrote: > diff --git a/arch/x86/kernel/traps.c b/arch/x86/kernel/traps.c > index e6db475164ed..873765adc244 100644 > --- a/arch/x86/kernel/traps.c > +++ b/arch/x86/kernel/traps.c > @@ -578,6 +578,64 @@ do_general_protection(struct pt_regs *regs,

[RFC PATCH v4 06/27] x86/cet: Control protection exception handler

2018-09-21 Thread Yu-cheng Yu
A control protection exception is triggered when a control flow transfer attempt violated shadow stack or indirect branch tracking constraints. For example, the return address for a RET instruction differs from the safe copy on the shadow stack; or a JMP instruction arrives at a non- ENDBR instruct