lkml.org 
[lkml]   [2008]   [Dec]   [16]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
SubjectRe: [PATCH v3 0/3] preadv & pwritev syscalls.
On Tue, Dec 16, 2008 at 05:48:58PM +0100, Gerd Hoffmann wrote:
> i.e. the ordering of the splitted argument depends on the os endianness?
> What is the reason for this?
>

Eh? The splitting will occur at the C ABI level, not as a result of
glibc (though, it could be done that way if you really wanted, but then
you're just moving the wrapper up the chain.)

A 64-bit value on a 32-bit machine will look like, in a register pair,
like it looks in memory, with MSB/LSB ordering.

> I'd prefer to have the ordering coded explicitly instead, like this:
>
> asmlinkage int compat_sys_pwritev(unsigned long fd,
> const struct compat_iovec __user *vec, unsigned long vlen,
> unsigned pos_low, unsigned pos_high)
> {
> loff_t pos = pos_low | (loff_t)pos_high << 32;
> [ ... ]
>

Sadly this isn't possible without a wrapper unless you can guarantee
it was passed low high instead of high low. Unless you munge it in
userspace, you can't.

regards, Kyle


\
 
 \ /
  Last update: 2008-12-16 18:05    [W:0.059 / U:0.512 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site