<div dir="ltr">Hello Eugene,<div><br></div><div>Thanks for your reply. In RHEL6, can I force gcc to insert no-ops before every function so that I can use a modified kpatch to achieve patching?</div><div><br></div><div>Thanks and regards,</div><div>Rahul. </div></div><div class="gmail_extra"><br><div class="gmail_quote">On Tue, Oct 6, 2015 at 5:03 PM, Evgenii Shatokhin <span dir="ltr"><<a href="mailto:eshatokhin@odin.com" target="_blank">eshatokhin@odin.com</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">Hi,<br>
<br>
06.10.2015 14:09, Rahul Kumar пишет:<div><div class="h5"><br>
<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
Hello everybody,<br>
<br>
I have successfully used kpatch on RHEL7 and it works great. Now I am<br>
wondering if there is any way I can use kpatch on vanilla RHEL6. Please<br>
let me know whether it is possible or not.<br>
<br>
Thanks,<br>
Rahul.<br>
</blockquote>
<br></div></div>
For Kpatch as it is now, the short answer is no, it is not possible.<br>
<br>
Kpatch needs GCC to support inserting the placeholders ('call __fentry__') at the beginning of each function, -mfentry option. IIRC, GCC 4.4.x from RHEL 6 does not support it.<br>
<br>
Another missing thing is the ability of Ftrace to change the instruction pointer (RIP register), which is not available in the kernel 2.6.32.<br>
<br>
In theory, one may rework Kpatch to use the 'call mcount' placeholders available in that kernel but it has its issues too.<br>
<br>
Regards,<br>
<br>
Eugene<br>
</blockquote></div><br></div>