Date: Wed, 12 Oct 2005 12:55:34 -0400 From: Kris Kennaway <kris@obsecurity.org> To: Max Laier <max@love2party.net> Cc: freebsd-current@freebsd.org, sparc64@freebsd.org, des@freebsd.org, Kris Kennaway <kris@obsecurity.org> Subject: Re: int/long confusion with maxbcache and maxswzone (fixes 6.0 on >12GB machines) Message-ID: <20051012165533.GA55776@xor.obsecurity.org> In-Reply-To: <200510121237.07383.max@love2party.net> References: <20051011213800.GA8839@xor.obsecurity.org> <200510121237.07383.max@love2party.net>
next in thread | previous in thread | raw e-mail | index | archive | help
--UugvWAfsgieZRqgk Content-Type: text/plain; charset=us-ascii Content-Disposition: inline Content-Transfer-Encoding: quoted-printable On Wed, Oct 12, 2005 at 12:36:50PM +0200, Max Laier wrote: > > -int maxswzone; /* max swmeta KVA storage */ > > -int maxbcache; /* max buffer cache KVA storage */ > > +long maxswzone; /* max swmeta KVA storage */ > > +long maxbcache; /* max buffer cache KVA storage */ > > > > However, des forgot to change the other definition of maxbcache in > > <sys/buf.h>: > > > > extern int maxbcache; /* Max KVA for buffer cache */ > > > > In fact, it's a good thing he didn't. On sparc64 if you make that > > variable a long it causes 32-bit integer overflows elsewhere, which > > lead to severe filesystem damage on systems with >12GB RAM. With the > > above bug this is reduced to a hang at boot. >=20 > Isn't it enough to introduce the maximum values below? I imagine that th= e=20 > ultimate goal is to get rid of the constrains, which will be easier if we= =20 > already have enough bits. No, it's not. As I mentioned, on 5.x you can work around this problem by using the existing tunable to limit the parameter, but not on 6.0 unless you also revert long to int. Something is getting confused about whether that variable is a long or an int since it's inconsistently defined. Anyway, making these variables consistently long is a very bad idea until more of the system is ready for that - that was the first thing I tried when I identified the problem, and it completely destroyed all of my filesystems within seconds, requiring a reinstall. Kris --UugvWAfsgieZRqgk Content-Type: application/pgp-signature Content-Disposition: inline -----BEGIN PGP SIGNATURE----- Version: GnuPG v1.4.2 (FreeBSD) iD8DBQFDTUAFWry0BWjoQKURAjk5AJ9d29kLADXDiqvwMBuSllZoTQwCGACg/R+4 NoD4Wzq2N1iTjS/VVwU4nxk= =F249 -----END PGP SIGNATURE----- --UugvWAfsgieZRqgk--
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?20051012165533.GA55776>