lkml.org 
[lkml]   [2020]   [May]   [14]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
SubjectRe: [patch V4 part 4 02/24] x86/int3: Avoid atomic instrumentation
On Thu, May 14, 2020 at 02:51:32PM +0200, Thomas Gleixner wrote:
> Peter Zijlstra <peterz@infradead.org> writes:
> > On Wed, May 13, 2020 at 09:57:52PM -0700, Andy Lutomirski wrote:
> >> On Tue, May 5, 2020 at 7:15 AM Thomas Gleixner <tglx@linutronix.de> wrote:
> >> >
> >> > From: Peter Zijlstra <peterz@infradead.org>
> >> >
> >> > Use arch_atomic_*() and READ_ONCE_NOCHECK() to ensure nothing untoward
> >> > creeps in and ruins things.
> >> >
> >> > That is; this is the INT3 text poke handler, strictly limit the code
> >> > that runs in it, lest it inadvertenly hits yet another INT3.
> >>
> >>
> >> Acked-by: Andy Lutomirski <luto@kernel.org>
> >>
> >> Does objtool catch this error?
> >
> > It does not. I'll put it on the (endless) todo list..
>
> Well, at least it detects when that code calls out into something which
> is not in the non-instrumentable section.

True, but the more specific problem is that noinstr code can use
jump_label/static_call just fine.

So a more specific test is validating none of that happens in the INT3
handler before poke_int3_handler(). Which is what I think Andy was
after.

\
 
 \ /
  Last update: 2020-05-14 15:17    [W:1.516 / U:0.480 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site