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]
Message-ID: <20250519134309.35b1e007@pumpkin>
Date: Mon, 19 May 2025 13:43:09 +0100
From: David Laight <david.laight.linux@...il.com>
To: Kuniyuki Iwashima <kuniyu@...zon.com>
Cc: "David S. Miller" <davem@...emloft.net>, Eric Dumazet
 <edumazet@...gle.com>, Jakub Kicinski <kuba@...nel.org>, Paolo Abeni
 <pabeni@...hat.com>, Willem de Bruijn <willemb@...gle.com>, Simon Horman
 <horms@...nel.org>, Kuniyuki Iwashima <kuni1840@...il.com>,
 <netdev@...r.kernel.org>
Subject: Re: [PATCH v1 net-next 6/6] socket: Clean up kdoc for sock_create()
 and sock_create_lite().

On Fri, 16 May 2025 20:50:27 -0700
Kuniyuki Iwashima <kuniyu@...zon.com> wrote:

> __sock_create() is now static and the same doc exists on sock_create()
> and sock_create_kern().
> 
> Also, __sock_create() says "On failure @res is set to %NULL.", but
> this is always false.
> 
> In addition, the old style kdoc is a bit corrupted and we can't see the
> DESCRIPTION section:
> 
>   $ scripts/kernel-doc -man net/socket.c | scripts/split-man.pl /tmp/man
>   $ man /tmp/man/sock_create.9
> 
> Let's clean them up.

I think you need to absolutely explicit about which calls hold a reference
to 'net' and which don't.

This is separate from any user/kernel flag - and may need a second flag
(although there are probably only 3 options).

IIRC some sockets are created internally within the protocol code
and don't want to stop the 'net' being deleted.
Such code has to have a callback from the 'net delete' path to tidy up.

OTOH it is not unreasonable for other kernel activities (perhaps file
system mounts) to hold a ref count to stop the net being deleted.

	David

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ