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: <AE90C24D6B3A694183C094C60CF0A2F6026B721C@saturn3.aculab.com>
Date:	Wed, 1 May 2013 16:53:48 +0100
From:	"David Laight" <David.Laight@...LAB.COM>
To:	"Eric Dumazet" <eric.dumazet@...il.com>,
	"David Miller" <davem@...emloft.net>
Cc:	<benh@...nel.crashing.org>, <netdev@...r.kernel.org>,
	<paulus@...ba.org>, <ambrose@...gle.com>,
	<linuxppc-dev@...ts.ozlabs.org>
Subject: RE: [PATCH v2 net-next] af_unix: fix a fatal race with bit fields

> diff --git a/include/net/af_unix.h b/include/net/af_unix.h
> index a8836e8..dbdfd2b 100644
> --- a/include/net/af_unix.h
> +++ b/include/net/af_unix.h
> @@ -57,9 +57,10 @@ struct unix_sock {
>  	struct list_head	link;
>  	atomic_long_t		inflight;
>  	spinlock_t		lock;
> -	unsigned int		gc_candidate : 1;
> -	unsigned int		gc_maybe_cycle : 1;
>  	unsigned char		recursion_level;
> +	unsigned long		gc_flags;
> +#define UNIX_GC_CANDIDATE	0
> +#define UNIX_GC_MAYBE_CYCLE	1
>  	struct socket_wq	peer_wq;
>  };

Why not just change gc_candidate and gc_maybe_cycle to
unsigned char?
It might reduce the number of pad bytes somewhat.

	David

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ