From owner-svn-src-all@FreeBSD.ORG Thu Jan 2 09:38:32 2014 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 6FA69C39; Thu, 2 Jan 2014 09:38:32 +0000 (UTC) Received: from mail.dawidek.net (garage.dawidek.net [91.121.88.72]) by mx1.freebsd.org (Postfix) with ESMTP id 311211607; Thu, 2 Jan 2014 09:38:30 +0000 (UTC) Received: from localhost (58.wheelsystems.com [83.12.187.58]) by mail.dawidek.net (Postfix) with ESMTPSA id 938722F3; Thu, 2 Jan 2014 10:25:35 +0100 (CET) Date: Thu, 2 Jan 2014 10:33:23 +0100 From: Pawel Jakub Dawidek To: Stanislav Sedov Subject: Re: svn commit: r255219 - in head: contrib/tcpdump lib/libc lib/libc/capability lib/libc/include lib/libc/sys lib/libprocstat sbin/dhclient sbin/hastd sys/amd64/linux32 sys/bsm sys/cddl/compat/opensola... Message-ID: <20140102093322.GA1655@garage.freebsd.pl> References: <201309050009.r8509vsE061271@svn.freebsd.org> <67DFFD7B-01DE-4862-BED3-DD42EB92A8F4@freebsd.org> MIME-Version: 1.0 Content-Type: multipart/signed; micalg=pgp-sha1; protocol="application/pgp-signature"; boundary="bp/iNruPH9dso1Pn" Content-Disposition: inline In-Reply-To: <67DFFD7B-01DE-4862-BED3-DD42EB92A8F4@freebsd.org> X-OS: FreeBSD 11.0-CURRENT amd64 User-Agent: Mutt/1.5.22 (2013-10-16) Cc: svn-src-head@freebsd.org, svn-src-all@freebsd.org, src-committers@freebsd.org X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.17 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 02 Jan 2014 09:38:32 -0000 --bp/iNruPH9dso1Pn Content-Type: text/plain; charset=utf-8 Content-Disposition: inline Content-Transfer-Encoding: quoted-printable On Wed, Jan 01, 2014 at 11:16:22PM -0800, Stanislav Sedov wrote: >=20 > On Sep 4, 2013, at 5:09 PM, Pawel Jakub Dawidek wrote: >=20 > > This commit also breaks compatibility with some existing Capsicum syst= em calls, > > but I see no other way to do that. This should be fine as Capsicum is = still > > experimental and this change is not going to 9.x. >=20 > Hi! >=20 > This change also increases the size of kinfo_file structure, which won=E2= =80=99t allow > programs not compiled against HEAD and working with kern.info.filedesc sy= sctl > to run properly on HEAD (e.g. 8.x, 9.x and 10.x jails won=E2=80=99t run p= roperly on HEAD, > and it also broke valgrind). Is there absolutely no way to avoid extendi= ng the size > of this struct? Well, I made this change to have space for future cap_rights_t expension. I did that change for a major branch, so we don't have to do it in the middle of 10.x or to not block the work until 11.0. Note that the structure changed size not only because of _kf_cap_spare[3] field, but also because cap_rights_t is not uint64_t anymore, it is now struct that contains two uint64_t (1424 - 1392 =3D 4 * 8). I'm afraid it is too late to change it for 10.0 at this point anyway. Not sure if you are aware this was merged to 10, because you write about 10.x jails not working properly on HEAD. 10.x jails will work properly on HEAD. BTW. I'd love if we stop using such structures for a running kernel. We should really move to using libnv to export data like that. > > #if defined(__amd64__) || defined(__i386__) > > -#define KINFO_FILE_SIZE 1392 > > +#define KINFO_FILE_SIZE 1424 > > #endif > > =20 > > struct kinfo_file { > > @@ -389,6 +390,7 @@ > > uint16_t kf_pad1; /* Round to 32 bit alig= nment. */ > > int _kf_ispare0; /* Space for more stuff= =2E */ > > cap_rights_t kf_cap_rights; /* Capability rights. */ > > + uint64_t _kf_cap_spare[3]; /* Space for future cap= _rights_t. */ > > int _kf_ispare[4]; /* Space for more stuff= =2E */ > > /* Truncated before copyout in sysctl */ > > char kf_path[PATH_MAX]; /* Path to file, if any= =2E */ --=20 Pawel Jakub Dawidek http://www.wheelsystems.com FreeBSD committer http://www.FreeBSD.org Am I Evil? Yes, I Am! http://mobter.com --bp/iNruPH9dso1Pn Content-Type: application/pgp-signature -----BEGIN PGP SIGNATURE----- Version: GnuPG v2.0.22 (FreeBSD) iEYEARECAAYFAlLFMmIACgkQForvXbEpPzTtdACeMZUQv9g5eQBo74Mna1M2+zE/ tPkAnifvjpugpc18vKWB5CBaUjyHPbwP =7YTS -----END PGP SIGNATURE----- --bp/iNruPH9dso1Pn--