<div dir="ltr"><div><div><div><div><div><div>HI,<br><br></div>The patch is the same as in the README, i.e:<br>--- src.orig/fs/proc/meminfo.c<br>+++ src/fs/proc/meminfo.c<br>@@ -95,7 +95,7 @@ static int meminfo_proc_show(struct seq_<br>        "Committed_AS:   %8lu kB\n"<br>        "VmallocTotal:   %8lu kB\n"<br>        "VmallocUsed:    %8lu kB\n"<br>-       "VmallocChunk:   %8lu kB\n"<br>+       "VMALLOCCHUNK:   %8lu kB\n"<br> #ifdef CONFIG_MEMORY_FAILURE<br>        "HardwareCorrupted: %5lu kB\n"<br> #endif<br><br></div>and, yes, I see it every time.<br></div>The patch/module is loaded via;<br></div>kpatch load kpatch_0001_Test_kpatch.ko<br></div><div>and unloaded via kpatch unload <br><br></div>Regards<br></div>/Ravineet<br><div><div><span class="im"></span></div></div></div><div class="gmail_extra"><br><div class="gmail_quote">On 13 May 2016 at 21:26, Jessica Yu <span dir="ltr"><<a href="mailto:jeyu@redhat.com" target="_blank">jeyu@redhat.com</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">+++ Ravineet Singh [13/05/16 16:15 +0200]:<span class=""><br>
<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
Thanks for the reply,<br>
<br>
I indeed had CONFIG_LIVEPATCH configured, after removing it, it is possible<br>
to unload the kpatch module<br>
via kpatch unload .<br>
Also install/uninstall seems to work fine. Also an installed kpatch module<br>
is auto loaded upon boot.<br>
<br>
The only issue I see is; while unloading a kpatch module, a  dump from the<br>
kernel is generated (se below).<br>
Any ideas?<br>
<br>
regards<br>
/Ravineet<br>
<br>
[   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>
</blockquote>
<br>
<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
[   37.466742] WARNING: CPU: 4 PID: 1878 at kernel/module.c:1107<br>
module_put+0x95/0xa0<br>
</blockquote>
<br></span>
Hm, that looks like some sort of module refcount issue (it's WARNing<br>
in module_put). I am however unable to reproduce the problem with the<br>
kpatch.ko core module under 4.6.0-rc4..<br>
<br>
Quick questions: What are you patching in kpatch_0001_Test_kpatch, and<br>
how are you loading/unloading the module? Are you able reproduce the<br>
problem consistently (i.e. it happens every time you unload)? Trying<br>
to figure out if this is just a kernel fluke or if the problem is on<br>
our side.<br>
<br>
Thanks,<br>
Jessica<div><div class="h5"><br>
<br>
<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
[   37.467373] Modules linked in: kpatch(O) [last unloaded:<br>
kpatch_0001_Test_kpatch]<br>
[   37.468034] CPU: 4 PID: 1878 Comm: rmmod Tainted: G        W  O  K<br>
4.6-rc4+ #3<br>
[   37.468625] Hardware name: QEMU Standard PC (i440FX + PIIX, 1996), BIOS<br>
Bochs 01/01/2011<br>
[   37.469024]  0000000000000000 ffff88007ba03e10 ffffffff81336508<br>
0000000000000000<br>
[   37.469024]  0000000000000000 ffff88007ba03e50 ffffffff8105ab51<br>
000004537ba03e30<br>
[   37.469024]  ffff88007b7b7f80 ffffffffa0002640 ffffffffa0017420<br>
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>
<br>
On 25 April 2016 at 19:58, Josh Poimboeuf <<a href="mailto:jpoimboe@redhat.com" target="_blank">jpoimboe@redhat.com</a>> wrote:<br>
<br>
<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
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<br>
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>
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>
<br>
--<br>
Josh<br>
<br>
</blockquote>
<br>
<br>
<br>
-- <br>
Regards<br>
Ravineet<br>
</blockquote>
<br>
</div></div><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
_______________________________________________<br>
kpatch mailing list<br>
<a href="mailto:kpatch@redhat.com" target="_blank">kpatch@redhat.com</a><br>
<a href="https://www.redhat.com/mailman/listinfo/kpatch" rel="noreferrer" target="_blank">https://www.redhat.com/mailman/listinfo/kpatch</a><br>
</blockquote>
<br>
</blockquote></div><br><br clear="all"><br>-- <br><div class="gmail_signature"><div dir="ltr">Regards<div>Ravineet</div></div></div>
</div>