From: Matthieu Baerts <matttbe@xxxxxxxxxx> 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@xxxxxxxxxxxxx> > > Signed-off-by: Kuniyuki Iwashima <kuniyu@xxxxxxxxxx> > > --- > > 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@xxxxxxxxxx> > > > 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!