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: <20250519171700.38903-1-kuniyu@amazon.com>
Date: Mon, 19 May 2025 10:16:39 -0700
From: Kuniyuki Iwashima <kuniyu@...zon.com>
To: <david.laight.linux@...il.com>
CC: <davem@...emloft.net>, <edumazet@...gle.com>, <horms@...nel.org>,
	<kuba@...nel.org>, <kuni1840@...il.com>, <kuniyu@...zon.com>,
	<netdev@...r.kernel.org>, <pabeni@...hat.com>, <willemb@...gle.com>
Subject: Re: [PATCH v1 net-next 1/6] socket: Un-export __sock_create().

From: David Laight <david.laight.linux@...il.com>
Date: Mon, 19 May 2025 13:16:19 +0100
> On Fri, 16 May 2025 20:50:22 -0700
> Kuniyuki Iwashima <kuniyu@...zon.com> wrote:
> 
> > Since commit eeb1bd5c40ed ("net: Add a struct net parameter to
> > sock_create_kern"), we no longer need to export __sock_create()
> > and can replace all non-core users with sock_create_kern().
> > 
> > Let's convert them and un-export __sock_create().
> 
> Don't you need to worry about whether 'net' should be held before doing
> this change?

No, this patch just removes one unnecessary syntactic sugar.

  * __sock_create(net, family, type, protocol, &sock, 1);
  * sock_create_kern(net, family, type, protocol, &sock);

Even if there is a caller who manages netns refcount by themselves,
this patch does not change anything.


> Then you can unexport __sock_create() at the end when there are no callers.
> 
> I'm surprised you haven't found any __sock_create(..., 0) calls that are
> used 'hold' 'net'.
> (I've got some 'out of tree'.)

I know you have such a module from the previous reply, but again,
we don't need to care about the out-of-tree module.

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ