Skip site navigation (1)Skip section navigation (2)
Date:      Fri, 29 May 2015 20:35:46 +0000
From:      Brooks Davis <brooks@freebsd.org>
To:        Bruce Evans <brde@optusnet.com.au>
Cc:        src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org
Subject:   Re: svn commit: r283671 - head/sys/sys
Message-ID:  <20150529203546.GN38480@spindle.one-eyed-alien.net>
In-Reply-To: <20150529154745.F900@besplex.bde.org>
References:  <201505282206.t4SM66Xj090527@svn.freebsd.org> <20150529154745.F900@besplex.bde.org>

next in thread | previous in thread | raw e-mail | index | archive | help

--iJXiJc/TAIT2rh2r
Content-Type: text/plain; charset=us-ascii
Content-Disposition: inline
Content-Transfer-Encoding: quoted-printable

On Fri, May 29, 2015 at 05:40:16PM +1000, Bruce Evans wrote:
> On Thu, 28 May 2015, Brooks Davis wrote:
>=20
> > Log:
> >  Revert r102953
> >
> >  The bitfile padding was always unallocated on real-world FreeBSD syste=
ms and
> >  depended on the assumption that (abs(sizeof(long) - sizeof(char*)) <=
=3D 32).
>=20
> Actually, it was bit-field padding that depended  on the assumption  that
> (abs(sizeof(long) - sizeof(char*)) <=3D CHAR_BIT * sizeof(int).
>=20
> It did work under this assumption, and was needed on non-real-world FreeB=
SD
> systems with correctly-sized longs.  Why break it?

It doesn't work on CHERI where pointers are 64, 128 or 256 bits
depending on the compilation mode and hardware type (in the latter two
cases they are not arithmetic types).

If this was something we were worried about in practice, forcing the
alignment of n_name and n_type to max(sizeof(long), sizeof(char *))
would accomplish the padding in a way that works for any compiler we
care about and irrespective of size.

-- Brooks

--iJXiJc/TAIT2rh2r
Content-Type: application/pgp-signature

-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1

iQEcBAEBAgAGBQJVaM2iAAoJEKzQXbSebgfA4mYH/2ZDRkoi6tbeAdahDWWkcx7F
gHRWvtfIHbxpnGTyC8KouDTh3ELY3Rl24jpQIY2iGqNuI7yc7I77w1yDIgmnbrBX
bOM2tChfD9oL9DFN5OTc5rHocgu6lyZxrAPJeKNycQnEsfzkSHr2SPui6mu2gYDQ
cHSFlpvT+hU2PqSyPNPwS5G5Sq/Jh8ByFhHNgMIE/qeo6WTT6MPtctybCZCBFBSi
Mx0wHwpLgoDDLkp1ZBiKfwAJqdh9m3IBLixYUVpVEKBRIaVkSlMOITRoM3OKKyPs
LtCkzGzIqVR5qwfQeP1w+0P4lBfo5QNNQojQL1CaJmzaELTVl7bKXm+LfunDZZc=
=sFYM
-----END PGP SIGNATURE-----

--iJXiJc/TAIT2rh2r--



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?20150529203546.GN38480>