User: Password:
|
|
Subscribe / Log in / New account

Ksplice: kernel patches without reboots

Ksplice: kernel patches without reboots

Posted May 1, 2008 0:48 UTC (Thu) by flewellyn (subscriber, #5047)
In reply to: Ksplice: kernel patches without reboots by NAR
Parent article: Ksplice: kernel patches without reboots

And various Lisp systems had it in the 1970s, so there's a great deal more prior art there.


(Log in to post comments)

Ksplice: kernel patches without reboots

Posted May 8, 2008 14:09 UTC (Thu) by forthy (guest, #1525) [Link]

Interactive programming languages typically have this feature, i.e. Lisp, Smalltalk, and to some extent Forth (Forth usually does not change old functions when you redefine one, but it's often possible to patch whatever old function to point to a newer one if you like to). You just reload your source.

This is only so tricky, because Linux is written in C, a language that has no intention to generate, replace, or modify code at run-time (it's a classical batch-oriented edit-compile-link-go language). Therefore, the programmers have no idea how to do that properly - it's fairly trivial if done right, but needs the support of the language. Changing e.g. GCC to add (on x86) a simple 5-byte noop in front of each function to be patched with a jmp to the replacement function would allow seamless patching of the kernel - you don't have to wait for the previous call to this function to complete, since the replacement is somewhere else, and all further callers of this function will call the replacement instead.

Ksplice: kernel patches without reboots

Posted May 8, 2008 19:55 UTC (Thu) by nix (subscriber, #2304) [Link]

How do you ensure that concurrent callers on other CPUs aren't located 
inside those five bytes?


Copyright © 2018, Eklektix, Inc.
Comments and public postings are copyrighted by their creators.
Linux is a registered trademark of Linus Torvalds