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: <20240215193733.11427-1-kuniyu@amazon.com>
Date: Thu, 15 Feb 2024 11:37:33 -0800
From: Kuniyuki Iwashima <kuniyu@...zon.com>
To: <matttbe@...nel.org>
CC: <alibuda@...ux.alibaba.com>, <davem@...emloft.net>, <edumazet@...gle.com>,
	<gbayer@...ux.ibm.com>, <guwen@...ux.alibaba.com>, <jaka@...ux.ibm.com>,
	<kuba@...nel.org>, <kuni1840@...il.com>, <kuniyu@...zon.com>,
	<linux-s390@...r.kernel.org>, <martineau@...nel.org>,
	<mptcp@...ts.linux.dev>, <netdev@...r.kernel.org>, <pabeni@...hat.com>,
	<tonylu@...ux.alibaba.com>, <wenjia@...ux.ibm.com>
Subject: Re: [PATCH v2 net-next] net: Deprecate SO_DEBUG and reclaim SOCK_DBG bit.

From: Matthieu Baerts <matttbe@...nel.org>
Date: Thu, 15 Feb 2024 10:58:58 +0100
> Hi Kuniyuki,
> 
> On 14/02/2024 20:54, Kuniyuki Iwashima wrote:
> > Recently, commit 8e5443d2b866 ("net: remove SOCK_DEBUG leftovers")
> > removed the last users of SOCK_DEBUG(), and commit b1dffcf0da22 ("net:
> > remove SOCK_DEBUG macro") removed the macro.
> > 
> > Now is the time to deprecate the oldest socket option.
> > 
> > Note that setsockopt(SO_DEBUG) is moved not to acquire lock_sock().
> > 
> > Reviewed-by: Gerd Bayer <gbayer@...ux.ibm.com>
> > Signed-off-by: Kuniyuki Iwashima <kuniyu@...zon.com>
> > ---
> > v2:
> >   * Move setsockopt(SO_DEBUG) code not to acquire lock_sock().
> 
> Thank you for the v2!
> 
> Good idea to have modified that in net/core/sock.c too!
> 
> Reviewed-by: Matthieu Baerts (NGI0) <matttbe@...nel.org>
> 
> 
> I don't think we need to do anything else, but just to be sure: do we
> need to tell the userspace this socket option has been deprecated?
> SO_DEBUG is a bit particular, so I guess it is fine not to do anything
> else, but except by looking at the kernel version, I don't think the
> userspace can know it has no more effect.
> 
> I didn't find many examples of other deprecated socket options, apart
> from SO_BSDCOMPAT. For years, there was a warning, removed a few years
> ago: f4ecc748533d ("net: Stop warning about SO_BSDCOMPAT usage"). I
> guess we don't want that for SO_DEBUG, right?

I was also wondering if I should add pr_info_once(), but it seems not
worth adding.

With a rough grep,

  $ git log -S SOCK_DEBUG net

except for the legacy protocols (appletalk, dccp, x25) that 8e5443d2b866
touched recently, TCP was the last real user of SOCK_DEBUG() and it's
2019-02-25 (5 years ago!) that 9946b3410b61 removed the use.

So, I think we don't need such warning.

Thanks!

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ