On Mon, Mar 19, 2018 at 11:23:42PM +, Al Viro wrote:
> Benefits:
> * all SyS... wrappers (i.e. the thing that really ought to
> go into syscall tables) have the same type.
> * we could have SYSCALL_DEFINE produce a trivial compat
> wrapper, have explicit COMPAT_SYSCALL_DEFINE discar
* Al Viro wrote:
> > For example this attempt at creating a new system call:
> >
> > SYSCALL_DEFINE3(moron, int, fd, loff_t, offset, size_t, count)
> >
> > ... would translate into something like:
> >
> > .name = "moron", .pattern = "WWW", .type = "int",.size = 4,
> > .name = NU
On Mon, Mar 19, 2018 at 11:23:42PM +, Al Viro wrote:
> static inline long C_S_moron(int, loff_t, size_t);
> long compat_SyS_moron(long a0, long a1, long a2, long a3, long a4, long a5,
> long a6)
> {
> return C_S_moron((__force int)a0,
> (__force loff_t)(((u64)a2 << 32)|a1
On Mon, Mar 19, 2018 at 10:29:20AM +0100, Ingo Molnar wrote:
>
> * Al Viro wrote:
>
> > On Sun, Mar 18, 2018 at 06:18:48PM +, Al Viro wrote:
> >
> > > I'd done some digging in that area, will find the notes and post.
> >
> > OK, found:
>
> Very nice writeup - IMHO this should go into Docu
* Al Viro wrote:
> On Sun, Mar 18, 2018 at 06:18:48PM +, Al Viro wrote:
>
> > I'd done some digging in that area, will find the notes and post.
>
> OK, found:
Very nice writeup - IMHO this should go into Documentation/!
> OTOH, consider arm. There we have
> * r0, r1, r2, r3, [sp,#
On Sun, Mar 18, 2018 at 06:18:48PM +, Al Viro wrote:
> I'd done some digging in that area, will find the notes and post.
OK, found:
We have two ABIs in the game - syscall and normal C. The latter
(for all targets we support) can be described in the following
terms:
* there is a seri
On Sun, Mar 18, 2018 at 11:06:42AM -0700, Linus Torvalds wrote:
> and then we can do
>
> COMPAT_SYSCALL_DEFINE5(readahead, int, fd,
> COMPAT_ARG_64BIT_ODD(off), compat_size_t, count)
> {
> return do_readahead(fd, off_lo + ((u64)off_hi << 64), count);
> }
>
> which at least looks reas
On Sun, Mar 18, 2018 at 05:10:54PM +0100, Dominik Brodowski wrote:
> +#ifdef __ARCH_WANT_COMPAT_SYS_READAHEAD
> +#if defined(__ARCH_WANT_COMPAT_SYS_WITH_PADDING) && \
> + defined(__ARCH_WANT_LE_COMPAT_SYS)
> +COMPAT_SYSCALL_DEFINE5(readahead, int, fd, unsigned int, padding,
> +
On Sun, Mar 18, 2018 at 10:40 AM, Al Viro wrote:
>
> *UGH*
>
> static inline compat_to_u64(u32 w0, u32 w1)
> {
> #ifdef __BIG_ENDIAN
> return ((u64)w0 << 32) | w1;
> #else
> return ((u64)w1 << 32) | w0;
> #endif
> }
>
> in compat.h, then this turns into
>
> #ifdef __ARCH_WANT_COMPA
The compat_sys_readahead() implementations in mips, powerpc, s390, sparc
and x86 only differed based on whether the u64 parameter needed padding
and on their endianness.
Oh, and some defined the parameters as u64 or "unsigned long" which
expanded to u64, though it only expected u32 in these parame
10 matches
Mail list logo