lkml.org 
[lkml]   [2011]   [Sep]   [1]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
SubjectRe: RFD: x32 ABI system call numbers
On 09/01/2011 05:49 PM, Pedro Alves wrote:
>>>
>>> struct iovec
>>> {
>>> void __user *iov_base; /* BSD uses caddr_t (1003.1g requires
>>> void *) */
>>> __kernel_size_t iov_len; /* Must be size_t (1003.1g) */
>>> } __attribute__((x32_abi_64));
>>>
>>> typedef long time_t __attribute__((x32_abi_64));
>>>
>>> The x32_abi_64 attribute converts pointers and longs back to 64-bit and
>>> adjusts the alignment accordingly. If we tag all userspace visible
>>> structures with this attribute, we can use the 64-bit ABI without changes.
>
> I would expect no new gcc extension to be needed for that -- there's the
> mode attribute (you can read DI as 64-bit):
>
> typedef void * __kernel_ptr64 __attribute ((mode(DI)));
>
> struct iovec
> {
> __kernel_ptr64 iov_base;
> ...
> };
>

Does that work for *writing*, too? That might be a very useful little
escape hatch for some particularly tight corners.

-hpa


\
 
 \ /
  Last update: 2011-09-02 03:55    [W:0.052 / U:1.384 seconds]
©2003-2018 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site