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: <68266122301e7_26df0c294e@willemb.c.googlers.com.notmuch>
Date: Thu, 15 May 2025 17:48:18 -0400
From: Willem de Bruijn <willemdebruijn.kernel@...il.com>
To: Kuniyuki Iwashima <kuniyu@...zon.com>, 
 willemdebruijn.kernel@...il.com
Cc: brauner@...nel.org, 
 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 v3 net-next 1/9] af_unix: Factorise test_bit() for
 SOCK_PASSCRED and SOCK_PASSPIDFD.

Kuniyuki Iwashima wrote:
> From: Willem de Bruijn <willemdebruijn.kernel@...il.com>
> Date: Thu, 15 May 2025 14:07:06 -0400
> > Kuniyuki Iwashima wrote:
> > > Currently, the same checks for SOCK_PASSCRED and SOCK_PASSPIDFD
> > > are scattered across many places.
> > > 
> > > Let's centralise the bit tests to make the following changes cleaner.
> > > 
> > > Signed-off-by: Kuniyuki Iwashima <kuniyu@...zon.com>
> > > ---
> > >  net/unix/af_unix.c | 37 +++++++++++++++----------------------
> > >  1 file changed, 15 insertions(+), 22 deletions(-)
> > > 
> > > diff --git a/net/unix/af_unix.c b/net/unix/af_unix.c
> > > index 2ab20821d6bb..464e183ffdb8 100644
> > > --- a/net/unix/af_unix.c
> > > +++ b/net/unix/af_unix.c
> > > @@ -765,6 +765,14 @@ static void copy_peercred(struct sock *sk, struct sock *peersk)
> > >  	spin_unlock(&sk->sk_peer_lock);
> > >  }
> > >  
> > > +static bool unix_may_passcred(const struct sock *sk)
> > > +{
> > > +	struct socket *sock = sk->sk_socket;
> > 
> > Also const?
> 
> yes, but this part is removed in patch 6, so I'd leave as is :)

Ok

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ