lkml.org 
[lkml]   [2019]   [Sep]   [5]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
SubjectRe: [RFC PATCH 2/2] livepatch: Clear relocation targets on a module removal
On Thu, Sep 05, 2019 at 01:19:06PM +0200, Jiri Kosina wrote:
> On Thu, 5 Sep 2019, Petr Mladek wrote:
>
> > > I don't have a number, but it's very common to patch a function which
> > > uses jump labels or alternatives.
> >
> > Really? My impression is that both alternatives and jump_labels
> > are used in hot paths. I would expect them mostly in core code
> > that is always loaded.
> >
> > Alternatives are often used in assembly that we are not able
> > to livepatch anyway.
> >
> > Or are they spread widely via some macros or inlined functions?
>
> All the indirect jumps are turned into alternatives when retpolines are in
> place.

Actually in C code those are done by the compiler as calls/jumps to
__x86_indirect_thunk_*.

But there are still a bunch of paravirt patched instructions and
alternatives used throughout the kernel.

--
Josh

\
 
 \ /
  Last update: 2019-09-05 15:24    [W:0.121 / U:2.764 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site