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] [thread-next>] [day] [month] [year] [list]
Date:	Tue, 16 Dec 2008 22:03:05 +0100
From:	Arnd Bergmann <arnd@...db.de>
To:	Kyle McMartin <kyle@...radead.org>
Cc:	Gerd Hoffmann <kraxel@...hat.com>,
	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 Tuesday 16 December 2008, Kyle McMartin wrote:
> > 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.
> 

Exactly, we have to munge it in userspace anyway because of the
argument ordering requirement we get if we pass it as a single u64.
I vote for the explicit split as well, this will give us a straightforward
wrapper in user space, unlike the swapped arguments that are just asking
for trouble, and will make it easy to have a common compat_sys_pwritev
function.

	Arnd <><
--
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