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:	Mon, 5 Sep 2011 12:54:31 -0700
From:	"H.J. Lu" <hjl.tools@...il.com>
To:	Arnd Bergmann <arnd@...db.de>
Cc:	"H. Peter Anvin" <hpa@...or.com>, Valdis.Kletnieks@...edu,
	Linus Torvalds <torvalds@...ux-foundation.org>,
	Christoph Hellwig <hch@...radead.org>,
	LKML <linux-kernel@...r.kernel.org>, Ingo Molnar <mingo@...e.hu>,
	Thomas Gleixner <tglx@...utronix.de>,
	Richard Kuo <rkuo@...eaurora.org>,
	Mark Salter <msalter@...hat.com>,
	Jonas Bonn <jonas@...thpole.se>,
	Tobias Klauser <tklauser@...tanz.ch>
Subject: Re: RFD: x32 ABI system call numbers

On Mon, Sep 5, 2011 at 12:34 PM, H.J. Lu <hjl.tools@...il.com> wrote:
> On Mon, Sep 5, 2011 at 10:21 AM, Arnd Bergmann <arnd@...db.de> wrote:
>> On Monday 05 September 2011, H.J. Lu wrote:
>>> I added MSG_CMSG_COMPAT64 and new compat system calls with
>>> 64bit timespec/val to support it.  See the enclosed patch.
>>
>> Yes, looks good. Maybe there should be an #ifdef in there though,
>> so the other compat architectures don't get the extra code.
>>
>>> BTW, I also added
>>>
>>> compat_sys_preadv64(unsigned long fd, const struct compat_iovec __user *vec,
>>>          unsigned long vlen, loff_t pos)
>>> compat_sys_pwritev64(unsigned long fd, const struct compat_iovec __user *vec,
>>>          unsigned long vlen, loff_t pos)
>>>
>>> to support 32bit compat_iovec * and 64bit offset.
>>
>> Does that make much of a difference? I would guess that it's just as
>> easy to do in libc by splitting the pos argument and calling the
>> existing compat_sys_preadv. Alternatively, you could make glibc
>> copy the iovec array to the 64 bit format and call the native syscall,
>> because compat_rw_copy_check_uvector() otherwise just ends up doing that
>> in kernel space. Or you just define the x32 libc iovec to
>>
>> struct iovec {
>>        void *iov_base;
>>        unsigned int __pad; /* gets cleared by libc */
>>        __u64 iov_len;
>> }
>>
>
> I need to clear __pad for every readv/writev/preadv/pwritev call
> even if it has been cleared before.  Is compat_sys_xxx faster
> than this?
>
>

Since  readv/writev/preadv/pwritev have const struct iovec *iov, I
have to copy the whole array.  compat_sys seems more efficient.

-- 
H.J.
--
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