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: <20250515031921.28817-1-kuniyu@amazon.com>
Date: Wed, 14 May 2025 20:18:47 -0700
From: Kuniyuki Iwashima <kuniyu@...zon.com>
To: <kuniyu@...zon.com>
CC: <brauner@...nel.org>, <davem@...emloft.net>, <edumazet@...gle.com>,
	<horms@...nel.org>, <kuba@...nel.org>, <kuni1840@...il.com>,
	<netdev@...r.kernel.org>, <pabeni@...hat.com>, <willemb@...gle.com>
Subject: Re: [PATCH v3 net-next 6/9] af_unix: Move SOCK_PASS{CRED,PIDFD,SEC} to struct sock.

From: Kuniyuki Iwashima <kuniyu@...zon.com>
Date: Wed, 14 May 2025 09:51:49 -0700
> @@ -523,7 +528,14 @@ struct sock {
>  #endif
>  	int			sk_disconnects;
>  
> -	u8			sk_txrehash;
> +	union {
> +		u8		sk_txrehash;
> +		u8		sk_scm_recv_flags;
> +		u8		sk_scm_credentials : 1,
> +				sk_scm_security : 1,
> +				sk_scm_pidfd : 1,
> +				sk_scm_unused : 5;
> +	};

The bits had to be grouped by struct, otherwise the compiler
treats all sk_scm_XXX bits as the same bit :S

Will fix in v4.

---8<---
diff --git a/include/net/sock.h b/include/net/sock.h
index 0268c28538a1..f17a82d93e5f 100644
--- a/include/net/sock.h
+++ b/include/net/sock.h
@@ -531,10 +531,12 @@ struct sock {
 	union {
 		u8		sk_txrehash;
 		u8		sk_scm_recv_flags;
-		u8		sk_scm_credentials : 1,
+		struct {
+			u8	sk_scm_credentials : 1,
 				sk_scm_security : 1,
 				sk_scm_pidfd : 1,
 				sk_scm_unused : 5;
+		};
 	};
 	u8			sk_clockid;
 	u8			sk_txtime_deadline_mode : 1,
---8<---

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ