Subject: Re: cgd failure since hackathon
To: Christos Zoulas <christos@zoulas.com>
From: Quentin Garnier <cube@cubidou.net>
List: current-users
Date: 12/01/2006 01:15:31
--AXAqmCxJPvkQLT2P
Content-Type: text/plain; charset=us-ascii
Content-Disposition: inline
Content-Transfer-Encoding: quoted-printable

On Thu, Nov 30, 2006 at 05:27:37PM -0500, Christos Zoulas wrote:
> On Nov 30,  8:06pm, cube@cubidou.net (Quentin Garnier) wrote:
> -- Subject: Re: cgd failure since hackathon
>=20
> | On Thu, Nov 30, 2006 at 10:38:38AM -0800, brad harder wrote:
> | >=3D20
> | >=3D20
> | >  I've been running -current since it was announced that 4 was being r=
e-br=3D
> | anched, and had no major problems to speak of. One of the things I'm ru=
nnin=3D
> | g succesfully is cgd(4), and an encrypted /home and swap. Kernels build=
 fro=3D
> | m updated sources (since hackathon) yield however, yield this:
> | >=3D20
> | > cgd: large blocksize 4294967295
> | > ioctl: Cannot allocate memory
> | > cgdconfig: action failed on "/etc/cgd/cgd.conf" line 1
> | >=3D20
> | >=3D20
> | > Does anybody have an idea what's going on with this, and if it requir=
es a=3D
> |  work-around on my part, or is a cgd failing.
> |=20
> | The following patch should fix it.
> |=20
> | Anyone objects?  The size_t -> ssize_t is necessary to avoid
> | signed/unsigned mismatch, if we ever want to warn on that (I thought we
> | did, though).
> |=20
> | Also, why the magic number 4096?
>=20
> Because we don't want to store any more on the stack. The proper fix
> is to make the config program pass the right value instead of -1 if
> possible. And the field should stay size_t...

Whatever.  Your break, your call, and of course your fix, but if you
keep it size_t, change what it get stored in to size_t, too.

--=20
Quentin Garnier - cube@cubidou.net - cube@NetBSD.org
"You could have made it, spitting out benchmarks
Owe it to yourself not to fail"
Amplifico, Spitting Out Benchmarks, Hometakes Vol. 2, 2005.

--AXAqmCxJPvkQLT2P
Content-Type: application/pgp-signature
Content-Disposition: inline

-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.5 (NetBSD)

iQEVAwUBRW90I9goQloHrPnoAQKlBAgAi75bgpD1GXchQxqBXsJjp216Wq+timD3
/iUA2m4Us6HbblINqQ9uVbK8lNX8AqEHRB478BgBmZUALUVcyYK5ijNVu3oC/Pox
AZ9qBPQmaVjtvtL6Gn2G1A57AZMSmMKDmx8iy+2oPYjrf23FhD5zdyyY1u7UVuRs
eqo5nmk1TXJDpPlAAC3v94hs9aCmyPdu1V5lkJJ+K6nk1KqEeX4mpW3HxyXDMig0
FRhhSMgai3+vyhkQ6Mp3zYmjN3y/TyfCF6awDJ6+jS/W0q+JWopminZuOvctUgmR
+4TMwJvU1ltxC3P4tXi1lYKjZR7h6yUtzM6hT/6JmTFvOTjRuS+mBQ==
=tbaJ
-----END PGP SIGNATURE-----

--AXAqmCxJPvkQLT2P--