lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite for Android: free password hash cracker in your pocket
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <5B6B8E96.9070302@huawei.com>
Date:   Thu, 9 Aug 2018 08:45:10 +0800
From:   piaojun <piaojun@...wei.com>
To:     Dominique Martinet <asmadeus@...ewreck.org>
CC:     "akpm@...ux-foundation.org" <akpm@...ux-foundation.org>,
        "Eric Van Hensbergen" <ericvh@...il.com>,
        Ron Minnich <rminnich@...dia.gov>,
        "Latchesar Ionkov" <lucho@...kov.net>, Greg Kurz <groug@...d.org>,
        "Linux Kernel Mailing List" <linux-kernel@...r.kernel.org>,
        <v9fs-developer@...ts.sourceforge.net>
Subject: Re: [PATCH] net/9p/trans_virtio.c: decrease the refcount of 9p virtio
 device when removing it

Hi Dominique,

On 2018/8/8 17:40, Dominique Martinet wrote:
> piaojun wrote on Wed, Aug 08, 2018:
>> I try to remove 9pnet_virtio.ko by 'rmmod 9pnet_virtio' as I want to
>> replace it without rebooting system.
> 
> I do that all the time when testing, it works for me.
> What exact kernel commit are you running?
> 
My kernel commit id 6edf1d4cb0acde, and I replace the 9p code with
9p-next. And I wonder if this will work well?

>> Here I have not mount 9pfs yet, so the refcount is still 0.
>>
>> Before rmmod:
>> # lsmod | grep 9p
>> 9pnet_virtio           20480  0
>> 9pnet                 106496  1 9pnet_virtio
>> virtio_ring            28672  5 virtio_scsi,9pnet_virtio,virtio_pci,virtio_blk,virtio_net
>> virtio                 16384  5 virtio_scsi,9pnet_virtio,virtio_pci,virtio_blk,virtio_net
>>
>> After rmmod:
>> # lsmod | grep 9p
>> 9pnet_virtio           20480  0
>> 9pnet                 106496  1 9pnet_virtio
>> virtio_ring            28672  5 virtio_scsi,9pnet_virtio,virtio_pci,virtio_blk,virtio_net
>> virtio                 16384  5 virtio_scsi,9pnet_virtio,virtio_pci,virtio_blk,virtio_net
>>
>> Normally 9pnet_virtio should be invisible after rmmod like this:
>> # lsmod | grep 9p
>> 9pnet                 106496  0
> 
> Right, that obviously didn't work...
> 
> But on the other hand, if I apply your commit and load/unload
> 9pnet_virtio 5-10 times (I ran it in a loop) I get KASAN errors because
> we put too many of these refs ; that doesn't happen without your patch
> so it's apparently wrong.
> I'm curious how that could make modprobe work better for you as well, it
> shouldn't depend on that...
> 
> Maybe `modprobe -r` might give a better error, or something in dmesg?
> 
In my testing, `modprobe -r` has the same behavior with rmmod.

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ