lkml.org 
[lkml]   [2023]   [Jul]   [26]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
SubjectRe: [PATCH v2 2/2] x86/kprobes: Prohibit probing on compiler generated CFI checking code
On Wed, Jul 26, 2023 at 12:23:17PM +0900, Masami Hiramatsu wrote:
> On Tue, 11 Jul 2023 10:50:58 +0900
> "Masami Hiramatsu (Google)" <mhiramat@kernel.org> wrote:
>
> > From: Masami Hiramatsu (Google) <mhiramat@kernel.org>
> >
> > Prohibit probing on the compiler generated CFI typeid checking code
> > because it is used for decoding typeid when CFI error happens.
> >
> > The compiler generates the following instruction sequence for indirect
> > call checks on x86;
> >
> >   movl -<id>, %r10d ; 6 bytes
> > addl -4(%reg), %r10d ; 4 bytes
> > je .Ltmp1 ; 2 bytes
> > ud2 ; <- regs->ip
> >
> > And handle_cfi_failure() decodes these instructions (movl and addl)
> > for the typeid and the target address. Thus if we put a kprobe on
> > those instructions, the decode will fail and report a wrong typeid
> > and target address.
> >
> >
>
> Hi Peter,
>
> Can I pick this to probes/fixes branch ?

I'll stick them in tip/x86/core, that ok?

\
 
 \ /
  Last update: 2023-07-26 21:55    [W:0.060 / U:0.116 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site