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: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Date:   Tue, 03 Aug 2021 11:59:34 +0200
From:   "Hannes Frederic Sowa" <hannes@...essinduktion.org>
To:     "Kefeng Wang" <wangkefeng.wang@...wei.com>,
        linux-kernel@...r.kernel.org, netdev@...r.kernel.org
Cc:     "Daniel Borkmann" <daniel@...earbox.net>,
        "David Miller" <davem@...emloft.net>,
        "Eric Dumazet" <edumazet@...gle.com>,
        "Minmin chen" <chenmingmin@...wei.com>,
        "Jakub Kicinski" <kuba@...nel.org>,
        "Greg Kroah-Hartman" <gregkh@...uxfoundation.org>,
        "Andrew Morton" <akpm@...ux-foundation.org>
Subject: Re: [PATCH] once: Fix panic when module unload

Hello,

On Tue, Aug 3, 2021, at 04:11, Kefeng Wang wrote:
> Hi ALL, I don't know who maintain the lib/once.c, add Greg and Andrew too,
> 
> Hi David, I check the history, the lib/once.c is from net/core/utils.c 
> since
> 
> commit 46234253b9363894a254844a6550b4cc5f3edfe8
> Author: Hannes Frederic Sowa <hannes@...essinduktion.org>
> Date:   Thu Oct 8 01:20:35 2015 +0200
> 
>      net: move net_get_random_once to lib
> 
> This bug is found in our product test, we want to make sure that whether 
> this solution
> 
> is correct or not, so could David or any others help to review this patch.
> 
> Many thinks.

Thanks for the patch.

I see that it got marked as not applicable for the net trees:
<https://patchwork.kernel.org/project/netdevbpf/patch/20210622022138.23048-1-wangkefeng.wang@huawei.com/>

Back then I added this code via the net/ tree thus I think it should get
picked up nonetheless hopefully.

Regarding your patch, I think it mostly looks fine:

It might be worthwhile to increment the reference counter inside the
preempt disabled bracket in find_module_by_key (and thus also rename
that function to make this fact more clear).

The other option would be to use the macro DO_ONCE and always pass in
THIS_MODULE from there, increment its ref counter in once_disable_jump.
This might be more canonical.

Thanks and sorry for the delay,
Hannes

Powered by blists - more mailing lists