lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Date:	Tue, 16 Dec 2008 23:39:09 +0100
From:	Heiko Carstens <heiko.carstens@...ibm.com>
To:	Gerd Hoffmann <kraxel@...hat.com>
Cc:	Kyle McMartin <kyle@...radead.org>,
	Ralf Baechle <ralf@...ux-mips.org>,
	linux-kernel@...r.kernel.org, linux-arch@...r.kernel.org,
	linux-api@...r.kernel.org
Subject: Re: [PATCH v3 0/3] preadv & pwritev syscalls.

On Tue, Dec 16, 2008 at 10:34:49PM +0100, Gerd Hoffmann wrote:
> Kyle McMartin wrote:
> > 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.)
> 
> Ah, ok.  You'll just declare 64bit arg for userspace, gcc splits it into
> two 32bit in native byte order, and then the kernel picks up the two
> 32bit values and has to reassemble them correctly, right?
> 
> The application-visible API must be compatible to the existing
> implementations, i.e. this ...
> 
>    pread(long fd, struct iovec *vec, long vlen, off_t pos);
> 
> ... prototype with the unaligned 64bit pos argument (in 32compat case).
> 
> Looks like there is no way around wrapping stuff then for the archs
> wanting aligned 64bit values.  The only choice we have is to do the
> wrap-o-magic in glibc or in the kernel.
> 
> I'd tend handle the wrapping in kernel space then because it is less
> confusing and we have to wrap only in case the ABI for $arch requires it.
> 
> Comments?

Please do it just the way that Arnd suggested: explicitly pass the upper
and lower part of loff_t as separate arguments.
It's the most simple approach.
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ