Re: [PATCH v6 13/20] arm64: ilp32: share aarch32 syscall wrappers to ilp32

From: Arnd Bergmann
Date: Wed Dec 30 2015 - 17:37:31 EST


On Wednesday 30 December 2015 20:29:05 Yury Norov wrote:
>
> So. For ilp32, the only wrapper left here, is compat_sys_mmap2_wrapper.
> But this is workaroud, as comment tells:
> Note: off_4k (w5) is always in units of 4K. If we can't do the
> requested offset because it is not page-aligned, we return -EINVAL.
>
> Not sure we should pull it to ILP32. If so, we can call sys_mmap_pgoff()
> directly. And we don't need this patch at all therefore. Any throughts?
>
>

I think providing the 64-bit version of sys_mmap() would be the simplest
API, as that avoids any possible confusion about the shift amount (hardcoded
12 bits vs PAGE_BITS). It fits in with the other syscalls that pass an loff_t
value here.

Arnd
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/