|
|
Log in / Subscribe / Register

kGraft — live kernel patching from SUSE

kGraft — live kernel patching from SUSE

Posted Feb 3, 2014 19:50 UTC (Mon) by k8to (guest, #15413)
In reply to: kGraft — live kernel patching from SUSE by SEJeff
Parent article: kGraft — live kernel patching from SUSE

Patents on the functionality, or the specific implementation tools used here?


to post comments

kGraft — live kernel patching from SUSE

Posted Feb 3, 2014 19:58 UTC (Mon) by SEJeff (guest, #51588) [Link] (4 responses)

Look at a few of these. They are just the ideas:

https://www.google.com/patents/US20100269106?dq=ininvento...
https://www.google.com/patents/US8612951?dq=ininventor:%2...
https://www.google.com/patents/US8607208?dq=ininventor:%2...

Just saying these are awfully similar and I'd hate to see it shut down by patent trolling / FUD. This is something that would be fantastic to see for production quality kernel upgrades (for telcom style uptime requirements).

kGraft — live kernel patching from SUSE

Posted Feb 3, 2014 20:16 UTC (Mon) by oshepherd (guest, #90163) [Link] (3 responses)

It is little known, but Windows Server 2003 contains hotpatching support. Functions in the kernel and core system DLLs is compiled with a special prologue, so as to avoid the need to determine whether the existing code is in use. Space for a "long" jump is placed immediately before the function header (5 bytes on i386, JMP + 4 byte immediate), and the first instruction of the function is a "mov edi, edi" 2 byte NOP in order to permit a 2 byte short jump backwards to be atomically inserted (Jumping backwards to the start of that aforementioned long jump)

Safe hot patching is done by first setting up the long jump, then doing an atomic replacement of the 2 byte NOP with the backwards jump. No need to detect if the code is in use; anybody already executing the old code will successfully continue to do so.

This would require compiling the kernel with such prologues. The need to insert a 2 byte NOP can be obviated in cases where the first instruction is already >=2 bytes long.

On the one hand, this would permit working around the Oracle patents. On the other hand, there is a need to watch out for Microsoft patents..

kGraft — live kernel patching from SUSE

Posted Feb 3, 2014 20:34 UTC (Mon) by amacater (subscriber, #790) [Link]

Both SUSE and Oracle are part of the OIN patent pool. SUSE may also remain covered by the Novell-Microsoft patent agreements - unlikely that a full-on spat with Oracle will ensue.

kGraft — live kernel patching from SUSE

Posted Feb 3, 2014 22:16 UTC (Mon) by SEJeff (guest, #51588) [Link]

I was indeed ignorant of this functionality. That is outstanding. Any idea what uses this functionality?

kGraft — live kernel patching from SUSE

Posted Feb 4, 2014 1:02 UTC (Tue) by stressinduktion (subscriber, #46452) [Link]

Linux kernel is also compiled with -pg since some time when CONFIG_DYNAMIC_FTRACE is enabled which leaves some bytes (actually a call to mcount) free on the function prologue. ftrace hooks up there and can redirect the function. I guess all those patching could also be achieved by just writing a rather small script in systemtap with embedded-c.

kGraft — live kernel patching from SUSE

Posted Feb 3, 2014 20:43 UTC (Mon) by bokr (guest, #58369) [Link] (3 responses)

I thought Ericsson worked out that functionality in the 80's with Erlang.

kGraft — live kernel patching from SUSE

Posted Feb 4, 2014 3:30 UTC (Tue) by k8to (guest, #15413) [Link]

Ericsson definitely implemented a system where dynamic code patching was possible. It wasn't designed for typical C ABIs though.

kGraft — live kernel patching from SUSE

Posted Feb 5, 2014 17:13 UTC (Wed) by drag (guest, #31333) [Link] (1 responses)

Patents don't really cover ideas or concepts.

A patent covers a specific set of steps to accomplish something.

So unless Erlang did it's code injection in the same/similar enough manner (very arbitrary) as this new implementation then it's not really relevant to the patent situation.

kGraft — live kernel patching from SUSE

Posted Feb 6, 2014 7:11 UTC (Thu) by smurf (subscriber, #17840) [Link]

> A patent covers a specific set of steps to accomplish something.

Looking at a few software patents out there, I beg to differ …

NB: *its code injection.


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