[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Message-ID: <20250509043358.14640-1-kuniyu@amazon.com>
Date: Thu, 8 May 2025 21:33:52 -0700
From: Kuniyuki Iwashima <kuniyu@...zon.com>
To: <kuba@...nel.org>
CC: <brauner@...nel.org>, <davem@...emloft.net>, <edumazet@...gle.com>,
<horms@...nel.org>, <kuni1840@...il.com>, <kuniyu@...zon.com>,
<netdev@...r.kernel.org>, <pabeni@...hat.com>, <willemb@...gle.com>
Subject: Re: [PATCH v1 net-next 4/7] af_unix: Move SOCK_PASS{CRED,PIDFD,SEC} to sk->sk_flags.
From: Jakub Kicinski <kuba@...nel.org>
Date: Thu, 8 May 2025 20:15:02 -0700
> On Wed, 7 May 2025 18:29:16 -0700 Kuniyuki Iwashima wrote:
> > diff --git a/include/net/sock.h b/include/net/sock.h
> > index f0fabb9fd28a..48b8856e2615 100644
> > --- a/include/net/sock.h
> > +++ b/include/net/sock.h
> > @@ -964,6 +964,10 @@ enum sock_flags {
> > SOCK_RCVMARK, /* Receive SO_MARK ancillary data with packet */
> > SOCK_RCVPRIORITY, /* Receive SO_PRIORITY ancillary data with packet */
> > SOCK_TIMESTAMPING_ANY, /* Copy of sk_tsflags & TSFLAGS_ANY */
> > + SOCK_PASSCRED, /* Receive SCM_CREDENTIALS ancillary data with packet */
> > + SOCK_PASSPIDFD, /* Receive SCM_PIDFD ancillary data with packet */
> > + SOCK_PASSSEC, /* Receive SCM_SECURITY ancillary data with packet */
> > + SOCK_FLAG_MAX,
> > };
>
> 32b builds break:
>
> include/linux/compiler_types.h:557:45: error: call to ‘__compiletime_assert_809’ declared with attribute error: BUILD_BUG_ON failed: BYTES_TO_BITS(sizeof(sk->sk_flags)) <= SOCK_FLAG_MAX
Oops, thanks for catching!
Will create a space like this in v2.
---8<---
diff --git a/include/net/sock.h b/include/net/sock.h
index 371053316d2c..59c077df9eb8 100644
--- a/include/net/sock.h
+++ b/include/net/sock.h
@@ -521,8 +521,9 @@ struct sock {
#if BITS_PER_LONG==32
seqlock_t sk_stamp_seq;
#endif
- int sk_disconnects;
+ u16 sk_disconnects;
+ u8 sk_csm_flags;
u8 sk_txrehash;
u8 sk_clockid;
u8 sk_txtime_deadline_mode : 1,
---8<---
Powered by blists - more mailing lists