lkml.org 
[lkml]   [2014]   [May]   [5]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
SubjectRe: [RFC PATCH 0/2] kpatch: dynamic kernel patching
On Mon, May 05, 2014 at 08:26:38AM -0500, Josh Poimboeuf wrote:
> On Mon, May 05, 2014 at 10:55:37AM +0200, Ingo Molnar wrote:
> >
> > * Josh Poimboeuf <jpoimboe@redhat.com> wrote:
> >
> > > [...]
> > >
> > > kpatch checks the backtraces of all tasks in stop_machine() to
> > > ensure that no instances of the old function are running when the
> > > new function is applied. I think the biggest downside of this
> > > approach is that stop_machine() has to idle all other CPUs during
> > > the patching process, so it inserts a small amount of latency (a few
> > > ms on an idle system).
> >
> > When live patching the kernel, how about achieving an even 'cleaner'
> > state for all tasks in the system: to freeze all tasks, as the suspend
> > and hibernation code (and kexec) does, via freeze_processes()?
> >
> > That means no tasks in the system have any real kernel execution
> > state, and there's also no problem with long-sleeping tasks, as
> > freeze_processes() is supposed to be fast as well.
> >
> > I.e. go for the most conservative live patching state first, and relax
> > it only once the initial model is upstream and is working robustly.
>
> I had considered doing this before, but the problem I found is that many
> kernel threads are unfreezable. So we wouldn't be able to check whether
> its safe to replace any functions in use by those kernel threads.

OTOH many kernel threads are parkable. Which achieves kind of similar desired
behaviour: the kernel threads then aren't running.

And in fact we could implement freezing on top of park for kthreads.

But unfortunately there are still quite some of them which don't support parking.


\
 
 \ /
  Last update: 2014-05-05 16:21    [W:0.113 / U:0.048 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site