Skip site navigation (1)Skip section navigation (2)
Date:      Wed, 19 Jan 2011 05:06:19 +1100 (EST)
From:      Bruce Evans <brde@optusnet.com.au>
To:        Kostik Belousov <kostikbel@gmail.com>
Cc:        fs@freebsd.org
Subject:   Re: Inconsistency and bug with *chflags functions
Message-ID:  <20110119045713.N2631@besplex.bde.org>
In-Reply-To: <20110118161637.GS2518@deviant.kiev.zoral.com.ua>
References:  <AANLkTintj_eM=aRF4pO8PcT8VXvVJ=Booxag%2BwBg3gaX@mail.gmail.com> <20110118041447.GA2087@tops.skynet.lt> <20110118234350.R1077@besplex.bde.org> <20110118161637.GS2518@deviant.kiev.zoral.com.ua>

next in thread | previous in thread | raw e-mail | index | archive | help
On Tue, 18 Jan 2011, Kostik Belousov wrote:

> On Wed, Jan 19, 2011 at 01:18:08AM +1100, Bruce Evans wrote:
>> The downcast in the call to setfflags() is safe, but the type puns given
>> by the wrong types in syscalls.master are not.  I think the big-endian
>> 64-bit long case is the only case seriously broken by these puns, but
>> FreeBSD doesn't notice since it doesn't support any big-endian 64-bit
>> arches.
> Just a note, do you consider sparc64/mips64/powerpc64 unsupported ?

No.  I forget that sparc64 is big-endian so this has been tested for
long enough to find any bugs, and didn't worry about the others since
they are relatively new.

In fact, there seems to be no problem with unsigned long fflags on 64-bit
bit-endian either, since the least significant bits end up in the top bits
of each arg in the args struct no matter how syscalls.master (mis)declares
them.  Little-endian is of course exactly the opposite.

Bruce



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