[Cbe-oss-dev] [PATCH] libspe2: cast assist call off_t arguments to int

Arnd Bergmann arnd at arndb.de
Wed Jul 18 09:07:32 EST 2007


On Wednesday 18 July 2007, Patrick Mansfield wrote:
> We are already limited to 32 bits with the current assist call interface,
> and SPU is already using an off_t of 32 bits.
> 
> I don't see any way to change that and maintain compatibility (for the
> assist calls, we use the first 32 of 128 bits for arguments and results,
> and do not clear the unused portions).
> 
> Yeh, we should probably have used 64 bits to start with.

Ok, so there is nothing for us to do now. Let's keep it as it is for now.

I'd suggest coming up with a proper definition for all the data types at
some point in the future though.  We could for example implement a full
set of new posix calls and have a new major stop code for those.

Or we just deprecate the posix call interface as soon as we have the direct
system calls working, but that depends on the EA pointer support to
be implemented in the tool chain first.

> We have some similar issues with [s]size_t, some results are truncated to
> 32 bits without any checking.

With size_t, it could be much worse, as this directly impacts the ability
to address memory. Which calls are affected by this problem?

Do you know if we did the right thing for uid_t, gid_t, nlink_t, ipc_pid_t,
pid_t, ino_t, ptrdiff_t, time_t, clock_t, suseconds_t, fd_set, dev_t,
mode_t, caddr_t and daddr_t?

All these can potentially be used in posix interfaces and are likely to
not be the same in all of glibc, spu-newlib, 32 bit kernel and 64 bit kernel.

	Arnd <><



More information about the cbe-oss-dev mailing list