From owner-freebsd-arch@FreeBSD.ORG Sun Mar 17 16:25:38 2013 Return-Path: Delivered-To: freebsd-arch@FreeBSD.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by hub.freebsd.org (Postfix) with ESMTP id 6784D7ED; Sun, 17 Mar 2013 16:25:38 +0000 (UTC) (envelope-from kostikbel@gmail.com) Received: from kib.kiev.ua (kib.kiev.ua [IPv6:2001:470:d5e7:1::1]) by mx1.freebsd.org (Postfix) with ESMTP id D3AD88D7; Sun, 17 Mar 2013 16:25:37 +0000 (UTC) Received: from tom.home (kostik@localhost [127.0.0.1]) by kib.kiev.ua (8.14.6/8.14.6) with ESMTP id r2HGPY9e087069; Sun, 17 Mar 2013 18:25:34 +0200 (EET) (envelope-from kostikbel@gmail.com) DKIM-Filter: OpenDKIM Filter v2.8.0 kib.kiev.ua r2HGPY9e087069 Received: (from kostik@localhost) by tom.home (8.14.6/8.14.6/Submit) id r2HGPXQF087068; Sun, 17 Mar 2013 18:25:33 +0200 (EET) (envelope-from kostikbel@gmail.com) X-Authentication-Warning: tom.home: kostik set sender to kostikbel@gmail.com using -f Date: Sun, 17 Mar 2013 18:25:33 +0200 From: Konstantin Belousov To: Pawel Jakub Dawidek Subject: Re: chflags(2)'s flags argument. Message-ID: <20130317162533.GT3794@kib.kiev.ua> References: <20130317003559.GA1364@garage.freebsd.pl> <20130317064123.GM3794@kib.kiev.ua> <20130317111112.GC1364@garage.freebsd.pl> <20130317155743.GR3794@kib.kiev.ua> <20130317162021.GG1364@garage.freebsd.pl> MIME-Version: 1.0 Content-Type: multipart/signed; micalg=pgp-sha1; protocol="application/pgp-signature"; boundary="X+WXP0omYNJFGow2" Content-Disposition: inline In-Reply-To: <20130317162021.GG1364@garage.freebsd.pl> User-Agent: Mutt/1.5.21 (2010-09-15) X-Spam-Status: No, score=-2.0 required=5.0 tests=ALL_TRUSTED,BAYES_00, DKIM_ADSP_CUSTOM_MED,FREEMAIL_FROM,NML_ADSP_CUSTOM_MED autolearn=no version=3.3.2 X-Spam-Checker-Version: SpamAssassin 3.3.2 (2011-06-06) on tom.home Cc: freebsd-arch@FreeBSD.org X-BeenThere: freebsd-arch@freebsd.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: Discussion related to FreeBSD architecture List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 17 Mar 2013 16:25:38 -0000 --X+WXP0omYNJFGow2 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline Content-Transfer-Encoding: quoted-printable On Sun, Mar 17, 2013 at 05:20:22PM +0100, Pawel Jakub Dawidek wrote: > On Sun, Mar 17, 2013 at 05:57:43PM +0200, Konstantin Belousov wrote: > > On Sun, Mar 17, 2013 at 12:11:12PM +0100, Pawel Jakub Dawidek wrote: > > > On Sun, Mar 17, 2013 at 08:41:23AM +0200, Konstantin Belousov wrote: > > > > The patch seems to keep ABI intact for all useful purposes, at least > > > > on all architectures the FreeBSD supports. A FreeBSD architecture w= here > > > > sizeof(int) !=3D sizeof(long), uses register calling conventions. > > >=20 > > > Actually I'd rephrase that. If I understand correctly, because we use > > > register calling conventions on architectures where sizeof(int) !=3D > > > sizeof(long), this mess is working correctly now. Remember that sysca= lls > > > are defined to take int, but prototypes say unsigned long. > > It needs some untangling. > >=20 > > The ABI exported by libc is what I care about when referring to the ABI. > > And this is the ABI which is not broken due to the reason I stated abov= e. >=20 > Right, but what I was trying to say is that if we had architecture where > sizeof(int) !=3D sizeof(long) and where we don't use register calling > conventions chflags(2) and fchflags(2) will never work in the first > place. So one might say it is a lucky coincidence. >=20 > Am I correct? Without committing my patch if we ever add such an > architecture chflags(2) and fchflags(2) will not work there properly > (maybe depending also on the byte order). Yes, you are right. >=20 > > > I know it can break API in some rare cases like in chflags(1), but it > > > results in compilation error (at least with the compilation flags we > > > use), so can be easly spotted and fixed, hopefully: > > >=20 > > > /usr/home/pjd/p4/capkern/bin/chflags/chflags.c: In function 'main': > > > /usr/home/pjd/p4/capkern/bin/chflags/chflags.c:120: warning: assignme= nt from incompatible pointer type > > >=20 > >=20 > > Project aims to maintain better compatibility then to claim that > > the changes could be 'spotted'. >=20 > Should I read this as you being against the proposed change? No, I do not object. But, did you considered changing the syscall argument to unsigned long instead ? --X+WXP0omYNJFGow2 Content-Type: application/pgp-signature -----BEGIN PGP SIGNATURE----- Version: GnuPG v2.0.19 (FreeBSD) iQIcBAEBAgAGBQJRRe59AAoJEJDCuSvBvK1BTDkP/1kMSCsnLlV1aT0hFTMk3/7+ czxaFEqaEtVTL3G3vZUrPEGFOwNjDsRVYAl5iq7u+mC4qvSvkigL4d/ZScZ4RNRr /dqnFn0VGqTyUSRsVrqncAT3kkI4CBEbyFocxIdmCi25Qg7EDHMIpItshgVFb37n 8WKRLw0uNeUJ9ZXCcvilOK5pcO1swBwUxSmPbm+G7+olBqgNT8l4zSbuAO0BB/vB wdVGJKpKQ+IhGcCJz+WiN03qW6YbZBRGJzEW6NT2LHrl3RlY0zemxf/YcciFLIrq IJhYwwnXmpH59FpQY40CUruznGx//aqSQtxoyEBZrufYuaxmDmqM6EfwiT5oMEhA 8UVigdXrgbSxigKSfjmu8gcB1ayKWO0frymkaiuSp4WsrXgqz9TdUYYxgPOjZOO6 PLr7lOIKQHV7TEfQ1cLcbr7FIeGscSkPBFsJJi+zaNcokITqOkQEWoN/UdrliIWB X6f+RjDwrtfZhGBajJtGAU+9cPPRZkzPka5fME/340ivaNwlnDv5SySvKYPaBMLm rvANRWZ4xCsZfLPFrvwjetsoaA9vIdKGeMfakKnp+dvw0L1vOM6zHfurYhL4BIpu U2HqYaoz1yaMIvOpmLgzQ5l5VwBc65CsLI1UCRvV7iukYN4R20xeAlnRhGBjiiPK jaM+cIwdlqG7J4xVcW6I =s7ez -----END PGP SIGNATURE----- --X+WXP0omYNJFGow2--