lkml.org 
[lkml]   [2022]   [Feb]   [23]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
SubjectRe: [PATCH 04/29] x86/livepatch: Validate __fentry__ location
On Wed, Feb 23, 2022 at 03:49:41PM +0100, Peter Zijlstra wrote:

> > Since we would want rec->ip if the pointer is before the ftrace
> > instruction. But we would need to audit all use cases and make sure this is
> > not called from any hot paths (in a callback).
> >
> > This will affect kprobes and BPF as they both use ftrace_location() as well.
>
> Yes, I already fixed kprobes, still trying to (re)discover how to run
> the bpf-selftests, that stuff is too painful :-(

Ok, I think I managed... I'm obviously hitting the WARN_ON_ONCE() in
is_ftrace_location(). Funnily, no dead kernel, so that's something I
suppose.

Now, I'm trying to make sense of that code, but all that !ftrace_managed
code scares me to death.

At the very least __bpf_arch_text_poke() needs a bunch of help. Let me
go prod it with something sharp to see what falls out ...

\
 
 \ /
  Last update: 2022-02-23 16:55    [W:0.073 / U:0.532 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site