<div dir="ltr"><div><div>Thanks for the reply,<br><br></div>I indeed had CONFIG_LIVEPATCH configured, after removing it, it is possible to unload the kpatch module<br>via kpatch unload .<br></div>Also install/uninstall seems to work fine. Also an installed kpatch module is auto loaded upon boot.<br><br><div>The only issue I see is; while unloading a kpatch module, a  dump from the kernel is generated (se below).<br></div><div>Any ideas?<br></div><div><br>regards<br></div><div>/Ravineet<br><br></div><div>[   29.144476] kpatch: loaded patch module 'kpatch_0001_Test_kpatch'<br>[   37.464348] kpatch: unloaded patch module 'kpatch_0001_Test_kpatch'<br>[   37.466345] ------------[ cut here ]------------<br>[   37.466742] WARNING: CPU: 4 PID: 1878 at kernel/module.c:1107 module_put+0x95/0xa0<br>[   37.467373] Modules linked in: kpatch(O) [last unloaded: kpatch_0001_Test_kpatch]<br>[   37.468034] CPU: 4 PID: 1878 Comm: rmmod Tainted: G        W  O  K 4.6-rc4+ #3<br>[   37.468625] Hardware name: QEMU Standard PC (i440FX + PIIX, 1996), BIOS Bochs 01/01/2011<br>[   37.469024]  0000000000000000 ffff88007ba03e10 ffffffff81336508 0000000000000000<br>[   37.469024]  0000000000000000 ffff88007ba03e50 ffffffff8105ab51 000004537ba03e30<br>[   37.469024]  ffff88007b7b7f80 ffffffffa0002640 ffffffffa0017420 ffffffffa0017190<br>[   37.469024] Call Trace:<br>[   37.469024]  [<ffffffff81336508>] dump_stack+0x4d/0x65<br>[   37.469024]  [<ffffffff8105ab51>] __warn+0xd1/0xf0<br>[   37.469024]  [<ffffffff8105ac3d>] warn_slowpath_null+0x1d/0x20<br>[   37.469024]  [<ffffffff810cc345>] module_put+0x95/0xa0<br>[   37.469024]  [<ffffffff810cc3b1>] module_unload_free+0x41/0xc0<br>[   37.469024]  [<ffffffff810cdeff>] free_module+0x19f/0x2b0<br>[   37.469024]  [<ffffffff810ce1bc>] SyS_delete_module+0x1ac/0x230<br>[   37.469024]  [<ffffffff81002af2>] ? syscall_return_slowpath+0x92/0x100<br>[   37.469024]  [<ffffffff818d649b>] entry_SYSCALL_64_fastpath+0x13/0x8f<br>[   37.475283] ---[ end trace 3b7c7357c1bf21ff ]---<br><br><br></div></div><div class="gmail_extra"><br><div class="gmail_quote">On 25 April 2016 at 19:58, Josh Poimboeuf <span dir="ltr"><<a href="mailto:jpoimboe@redhat.com" target="_blank">jpoimboe@redhat.com</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><span class="">On Fri, Apr 22, 2016 at 04:00:15PM +0200, Ravineet Singh wrote:<br>
> Hi,<br>
> Not sure if this is the correct forum but I'll try anyway.<br>
> I am looking at the possibility to build kpatch-patches on x86 machines to<br>
> be deployed in a arm v8 environment.<br>
><br>
> The first step is to verify kpatch on  x86_64  and initially I have a<br>
> couple a hinder.<br>
> I might have missed one or several steps but, it seems like the kpatch<br>
> sysfs entry is not created and hence<br>
> listing nor unloading is possible...<br>
><br>
> I basically follwed the guide on: <a href="https://github.com/dynup/kpatch" rel="noreferrer" target="_blank">https://github.com/dynup/kpatch</a> for<br>
> debian 8.<br>
><br>
> I guess it is obvious to you guys but:<br>
> root@debian64:~/kpatch (master) # strace kpatch list 2>&1 | grep "/sys"<br>
> stat("/sys/kernel/kpatch/patches/*", 0x7ffcb713dff0) = -1 ENOENT (No such<br>
> file or directory)<br>
><br>
> Could someone point me in the right direction please :)<br>
<br>
</span>Hi Ravineet,<br>
<br>
Any chance your kernel was compiled with CONFIG_LIVEPATCH?  If so, you<br>
built a livepatch module and you'll need to manage the patch using the<br>
/sys/kernel/livepatch directory because the kpatch command-line utility<br>
doesn't know how to interact with livepatch yet.<br>
<span class="HOEnZb"><font color="#888888"><br>
--<br>
Josh<br>
</font></span></blockquote></div><br><br clear="all"><br>-- <br><div class="gmail_signature"><div dir="ltr">Regards<div>Ravineet</div></div></div>
</div>