Re: [PATCH 20/25] arm64:ilp32: add sys_ilp32.c and a separate table (in entry.S) to use it

2016-05-18 Thread Yury Norov
On Wed, May 18, 2016 at 12:21:46PM +0100, Catalin Marinas wrote: > On Tue, May 17, 2016 at 10:05:26PM +0300, Yury Norov wrote: > > On Mon, May 16, 2016 at 06:06:05PM +0100, Catalin Marinas wrote: > > > On Sat, May 14, 2016 at 06:03:52PM +0300, Yury Norov wrote: > > > > +SYSCALL_DEFINE6(mmap2,

Re: [PATCH 20/25] arm64:ilp32: add sys_ilp32.c and a separate table (in entry.S) to use it

2016-05-18 Thread Yury Norov
On Wed, May 18, 2016 at 12:21:46PM +0100, Catalin Marinas wrote: > On Tue, May 17, 2016 at 10:05:26PM +0300, Yury Norov wrote: > > On Mon, May 16, 2016 at 06:06:05PM +0100, Catalin Marinas wrote: > > > On Sat, May 14, 2016 at 06:03:52PM +0300, Yury Norov wrote: > > > > +SYSCALL_DEFINE6(mmap2,

Re: [PATCH 20/25] arm64:ilp32: add sys_ilp32.c and a separate table (in entry.S) to use it

2016-05-18 Thread Catalin Marinas
On Tue, May 17, 2016 at 10:05:26PM +0300, Yury Norov wrote: > On Mon, May 16, 2016 at 06:06:05PM +0100, Catalin Marinas wrote: > > On Sat, May 14, 2016 at 06:03:52PM +0300, Yury Norov wrote: > > > +SYSCALL_DEFINE6(mmap2, unsigned long, addr, unsigned long, len, > > > + unsigned long, prot,

Re: [PATCH 20/25] arm64:ilp32: add sys_ilp32.c and a separate table (in entry.S) to use it

2016-05-18 Thread Catalin Marinas
On Tue, May 17, 2016 at 10:05:26PM +0300, Yury Norov wrote: > On Mon, May 16, 2016 at 06:06:05PM +0100, Catalin Marinas wrote: > > On Sat, May 14, 2016 at 06:03:52PM +0300, Yury Norov wrote: > > > +SYSCALL_DEFINE6(mmap2, unsigned long, addr, unsigned long, len, > > > + unsigned long, prot,

Re: [PATCH 20/25] arm64:ilp32: add sys_ilp32.c and a separate table (in entry.S) to use it

2016-05-17 Thread Yury Norov
On Mon, May 16, 2016 at 06:06:05PM +0100, Catalin Marinas wrote: > On Sat, May 14, 2016 at 06:03:52PM +0300, Yury Norov wrote: > > +SYSCALL_DEFINE6(mmap2, unsigned long, addr, unsigned long, len, > > + unsigned long, prot, unsigned long, flags, unsigned long, fd, > > + unsigned long,

Re: [PATCH 20/25] arm64:ilp32: add sys_ilp32.c and a separate table (in entry.S) to use it

2016-05-17 Thread Yury Norov
On Mon, May 16, 2016 at 06:06:05PM +0100, Catalin Marinas wrote: > On Sat, May 14, 2016 at 06:03:52PM +0300, Yury Norov wrote: > > +SYSCALL_DEFINE6(mmap2, unsigned long, addr, unsigned long, len, > > + unsigned long, prot, unsigned long, flags, unsigned long, fd, > > + unsigned long,

Re: [PATCH 20/25] arm64:ilp32: add sys_ilp32.c and a separate table (in entry.S) to use it

2016-05-16 Thread Catalin Marinas
On Sat, May 14, 2016 at 06:03:52PM +0300, Yury Norov wrote: > +SYSCALL_DEFINE6(mmap2, unsigned long, addr, unsigned long, len, > + unsigned long, prot, unsigned long, flags, unsigned long, fd, > + unsigned long, pgoff) To avoid the types confusion we could add __SC_WRAP to mmap2 in

Re: [PATCH 20/25] arm64:ilp32: add sys_ilp32.c and a separate table (in entry.S) to use it

2016-05-16 Thread Catalin Marinas
On Sat, May 14, 2016 at 06:03:52PM +0300, Yury Norov wrote: > +SYSCALL_DEFINE6(mmap2, unsigned long, addr, unsigned long, len, > + unsigned long, prot, unsigned long, flags, unsigned long, fd, > + unsigned long, pgoff) To avoid the types confusion we could add __SC_WRAP to mmap2 in

Re: [PATCH 20/25] arm64:ilp32: add sys_ilp32.c and a separate table (in entry.S) to use it

2016-05-14 Thread Yury Norov
So, after all discussions, this patch is looking like this. Changes: - assembler part reworked to be more clear, as Catalin recommended; - mmap now points to mmap2, as in 1st versions (suggested by Bamvor), and ilp32 wrapper delouses required arguments; - pread64 and pwrite64 wrappers

Re: [PATCH 20/25] arm64:ilp32: add sys_ilp32.c and a separate table (in entry.S) to use it

2016-05-14 Thread Yury Norov
So, after all discussions, this patch is looking like this. Changes: - assembler part reworked to be more clear, as Catalin recommended; - mmap now points to mmap2, as in 1st versions (suggested by Bamvor), and ilp32 wrapper delouses required arguments; - pread64 and pwrite64 wrappers

Re: [PATCH 20/25] arm64:ilp32: add sys_ilp32.c and a separate table (in entry.S) to use it

2016-05-14 Thread Yury Norov
On Thu, May 12, 2016 at 04:19:48PM +0300, Yury Norov wrote: [...] > > I think that's a good idea. The function used to be slightly different > > for each architecture, but now it seems we have a significant number > > of identical implementations that we could just merge them together > > into

Re: [PATCH 20/25] arm64:ilp32: add sys_ilp32.c and a separate table (in entry.S) to use it

2016-05-14 Thread Yury Norov
On Thu, May 12, 2016 at 04:19:48PM +0300, Yury Norov wrote: [...] > > I think that's a good idea. The function used to be slightly different > > for each architecture, but now it seems we have a significant number > > of identical implementations that we could just merge them together > > into

Re: [PATCH 20/25] arm64:ilp32: add sys_ilp32.c and a separate table (in entry.S) to use it

2016-05-12 Thread Yury Norov
On Thu, May 12, 2016 at 03:06:39PM +0200, Arnd Bergmann wrote: > On Thursday 12 May 2016 20:49:24 Zhangjian wrote: > > Hi, > > > > On 2016/5/12 17:21, Arnd Bergmann wrote: > > > On Thursday 12 May 2016 10:17:58 Catalin Marinas wrote: > > >> On Wed, May 11, 2016 at 09:30:07PM +0200, Arnd Bergmann

Re: [PATCH 20/25] arm64:ilp32: add sys_ilp32.c and a separate table (in entry.S) to use it

2016-05-12 Thread Yury Norov
On Thu, May 12, 2016 at 03:06:39PM +0200, Arnd Bergmann wrote: > On Thursday 12 May 2016 20:49:24 Zhangjian wrote: > > Hi, > > > > On 2016/5/12 17:21, Arnd Bergmann wrote: > > > On Thursday 12 May 2016 10:17:58 Catalin Marinas wrote: > > >> On Wed, May 11, 2016 at 09:30:07PM +0200, Arnd Bergmann

Re: [PATCH 20/25] arm64:ilp32: add sys_ilp32.c and a separate table (in entry.S) to use it

2016-05-12 Thread Yury Norov
On Thu, May 12, 2016 at 08:52:46PM +0800, Zhangjian (Bamvor) wrote: > Hi, > > On 2016/5/12 16:24, Yury Norov wrote: > >On Thu, May 12, 2016 at 11:45:53AM +0800, Zhangjian (Bamvor) wrote: > > > >[...] > > > >>>Hmm, that is indeed tricky. I think COMPAT_SYSCALL_WRAP4 rightfully > >>>refuses the

Re: [PATCH 20/25] arm64:ilp32: add sys_ilp32.c and a separate table (in entry.S) to use it

2016-05-12 Thread Yury Norov
On Thu, May 12, 2016 at 08:52:46PM +0800, Zhangjian (Bamvor) wrote: > Hi, > > On 2016/5/12 16:24, Yury Norov wrote: > >On Thu, May 12, 2016 at 11:45:53AM +0800, Zhangjian (Bamvor) wrote: > > > >[...] > > > >>>Hmm, that is indeed tricky. I think COMPAT_SYSCALL_WRAP4 rightfully > >>>refuses the

Re: [PATCH 20/25] arm64:ilp32: add sys_ilp32.c and a separate table (in entry.S) to use it

2016-05-12 Thread Arnd Bergmann
On Thursday 12 May 2016 20:49:24 Zhangjian wrote: > Hi, > > On 2016/5/12 17:21, Arnd Bergmann wrote: > > On Thursday 12 May 2016 10:17:58 Catalin Marinas wrote: > >> On Wed, May 11, 2016 at 09:30:07PM +0200, Arnd Bergmann wrote: > >>> On Wednesday 11 May 2016 17:59:01 Catalin Marinas wrote: > >>>

Re: [PATCH 20/25] arm64:ilp32: add sys_ilp32.c and a separate table (in entry.S) to use it

2016-05-12 Thread Arnd Bergmann
On Thursday 12 May 2016 20:49:24 Zhangjian wrote: > Hi, > > On 2016/5/12 17:21, Arnd Bergmann wrote: > > On Thursday 12 May 2016 10:17:58 Catalin Marinas wrote: > >> On Wed, May 11, 2016 at 09:30:07PM +0200, Arnd Bergmann wrote: > >>> On Wednesday 11 May 2016 17:59:01 Catalin Marinas wrote: > >>>

Re: [PATCH 20/25] arm64:ilp32: add sys_ilp32.c and a separate table (in entry.S) to use it

2016-05-12 Thread Zhangjian (Bamvor)
Hi, On 2016/5/12 16:24, Yury Norov wrote: On Thu, May 12, 2016 at 11:45:53AM +0800, Zhangjian (Bamvor) wrote: [...] Hmm, that is indeed tricky. I think COMPAT_SYSCALL_WRAP4 rightfully refuses the loff_t argument here, as the common case is that this is not possible. It works if I apply the

Re: [PATCH 20/25] arm64:ilp32: add sys_ilp32.c and a separate table (in entry.S) to use it

2016-05-12 Thread Zhangjian (Bamvor)
Hi, On 2016/5/12 16:24, Yury Norov wrote: On Thu, May 12, 2016 at 11:45:53AM +0800, Zhangjian (Bamvor) wrote: [...] Hmm, that is indeed tricky. I think COMPAT_SYSCALL_WRAP4 rightfully refuses the loff_t argument here, as the common case is that this is not possible. It works if I apply the

Re: [PATCH 20/25] arm64:ilp32: add sys_ilp32.c and a separate table (in entry.S) to use it

2016-05-12 Thread Zhangjian (Bamvor)
Hi, On 2016/5/12 17:21, Arnd Bergmann wrote: On Thursday 12 May 2016 10:17:58 Catalin Marinas wrote: On Wed, May 11, 2016 at 09:30:07PM +0200, Arnd Bergmann wrote: On Wednesday 11 May 2016 17:59:01 Catalin Marinas wrote: I don't think the shifts are a problem, the main downside would be the

Re: [PATCH 20/25] arm64:ilp32: add sys_ilp32.c and a separate table (in entry.S) to use it

2016-05-12 Thread Zhangjian (Bamvor)
Hi, On 2016/5/12 17:21, Arnd Bergmann wrote: On Thursday 12 May 2016 10:17:58 Catalin Marinas wrote: On Wed, May 11, 2016 at 09:30:07PM +0200, Arnd Bergmann wrote: On Wednesday 11 May 2016 17:59:01 Catalin Marinas wrote: I don't think the shifts are a problem, the main downside would be the

Re: [PATCH 20/25] arm64:ilp32: add sys_ilp32.c and a separate table (in entry.S) to use it

2016-05-12 Thread Arnd Bergmann
On Thursday 12 May 2016 10:17:58 Catalin Marinas wrote: > On Wed, May 11, 2016 at 09:30:07PM +0200, Arnd Bergmann wrote: > > On Wednesday 11 May 2016 17:59:01 Catalin Marinas wrote: > > > > I don't think the shifts are a problem, the main downside would be > > the limit to 44 bits of file offsets

Re: [PATCH 20/25] arm64:ilp32: add sys_ilp32.c and a separate table (in entry.S) to use it

2016-05-12 Thread Arnd Bergmann
On Thursday 12 May 2016 10:17:58 Catalin Marinas wrote: > On Wed, May 11, 2016 at 09:30:07PM +0200, Arnd Bergmann wrote: > > On Wednesday 11 May 2016 17:59:01 Catalin Marinas wrote: > > > > I don't think the shifts are a problem, the main downside would be > > the limit to 44 bits of file offsets

Re: [PATCH 20/25] arm64:ilp32: add sys_ilp32.c and a separate table (in entry.S) to use it

2016-05-12 Thread Catalin Marinas
On Wed, May 11, 2016 at 09:30:07PM +0200, Arnd Bergmann wrote: > On Wednesday 11 May 2016 17:59:01 Catalin Marinas wrote: > > On Wed, May 11, 2016 at 12:55:01PM +0200, Arnd Bergmann wrote: > > > On Wednesday 11 May 2016 11:04:38 Yury Norov wrote: > > > > On Wed, May 11, 2016 at 10:04:16AM +0800,

Re: [PATCH 20/25] arm64:ilp32: add sys_ilp32.c and a separate table (in entry.S) to use it

2016-05-12 Thread Catalin Marinas
On Wed, May 11, 2016 at 09:30:07PM +0200, Arnd Bergmann wrote: > On Wednesday 11 May 2016 17:59:01 Catalin Marinas wrote: > > On Wed, May 11, 2016 at 12:55:01PM +0200, Arnd Bergmann wrote: > > > On Wednesday 11 May 2016 11:04:38 Yury Norov wrote: > > > > On Wed, May 11, 2016 at 10:04:16AM +0800,

Re: [PATCH 20/25] arm64:ilp32: add sys_ilp32.c and a separate table (in entry.S) to use it

2016-05-12 Thread Yury Norov
On Thu, May 12, 2016 at 11:45:53AM +0800, Zhangjian (Bamvor) wrote: [...] > >Hmm, that is indeed tricky. I think COMPAT_SYSCALL_WRAP4 rightfully > >refuses the loff_t argument here, as the common case is that this is > >not possible. > It works if I apply the following patch, I defined the wrong

Re: [PATCH 20/25] arm64:ilp32: add sys_ilp32.c and a separate table (in entry.S) to use it

2016-05-12 Thread Yury Norov
On Thu, May 12, 2016 at 11:45:53AM +0800, Zhangjian (Bamvor) wrote: [...] > >Hmm, that is indeed tricky. I think COMPAT_SYSCALL_WRAP4 rightfully > >refuses the loff_t argument here, as the common case is that this is > >not possible. > It works if I apply the following patch, I defined the wrong

Re: [PATCH 20/25] arm64:ilp32: add sys_ilp32.c and a separate table (in entry.S) to use it

2016-05-11 Thread Zhangjian (Bamvor)
Hi, Arnd On 2016/5/11 22:50, Arnd Bergmann wrote: On Wednesday 11 May 2016 19:16:44 Zhangjian wrote: Hi, On 2016/5/11 18:12, Zhangjian (Bamvor) wrote: Hi, Arnd On 2016/5/11 16:09, Arnd Bergmann wrote: > On Wednesday 11 May 2016 10:04:16 Zhangjian wrote: >>> I don't remember. It's

Re: [PATCH 20/25] arm64:ilp32: add sys_ilp32.c and a separate table (in entry.S) to use it

2016-05-11 Thread Zhangjian (Bamvor)
Hi, Arnd On 2016/5/11 22:50, Arnd Bergmann wrote: On Wednesday 11 May 2016 19:16:44 Zhangjian wrote: Hi, On 2016/5/11 18:12, Zhangjian (Bamvor) wrote: Hi, Arnd On 2016/5/11 16:09, Arnd Bergmann wrote: > On Wednesday 11 May 2016 10:04:16 Zhangjian wrote: >>> I don't remember. It's

Re: [PATCH 20/25] arm64:ilp32: add sys_ilp32.c and a separate table (in entry.S) to use it

2016-05-11 Thread Arnd Bergmann
On Wednesday 11 May 2016 17:59:01 Catalin Marinas wrote: > On Wed, May 11, 2016 at 12:55:01PM +0200, Arnd Bergmann wrote: > > On Wednesday 11 May 2016 11:04:38 Yury Norov wrote: > > > On Wed, May 11, 2016 at 10:04:16AM +0800, Zhangjian (Bamvor) wrote: > > > [...] > > > > > > > >>Ok, I will test

Re: [PATCH 20/25] arm64:ilp32: add sys_ilp32.c and a separate table (in entry.S) to use it

2016-05-11 Thread Arnd Bergmann
On Wednesday 11 May 2016 17:59:01 Catalin Marinas wrote: > On Wed, May 11, 2016 at 12:55:01PM +0200, Arnd Bergmann wrote: > > On Wednesday 11 May 2016 11:04:38 Yury Norov wrote: > > > On Wed, May 11, 2016 at 10:04:16AM +0800, Zhangjian (Bamvor) wrote: > > > [...] > > > > > > > >>Ok, I will test

Re: [PATCH 20/25] arm64:ilp32: add sys_ilp32.c and a separate table (in entry.S) to use it

2016-05-11 Thread Catalin Marinas
On Wed, May 11, 2016 at 12:55:01PM +0200, Arnd Bergmann wrote: > On Wednesday 11 May 2016 11:04:38 Yury Norov wrote: > > On Wed, May 11, 2016 at 10:04:16AM +0800, Zhangjian (Bamvor) wrote: > > [...] > > > > > >>Ok, I will test the ltp syscall test. > > > >>With this changes, the issue I mentioned

Re: [PATCH 20/25] arm64:ilp32: add sys_ilp32.c and a separate table (in entry.S) to use it

2016-05-11 Thread Catalin Marinas
On Wed, May 11, 2016 at 12:55:01PM +0200, Arnd Bergmann wrote: > On Wednesday 11 May 2016 11:04:38 Yury Norov wrote: > > On Wed, May 11, 2016 at 10:04:16AM +0800, Zhangjian (Bamvor) wrote: > > [...] > > > > > >>Ok, I will test the ltp syscall test. > > > >>With this changes, the issue I mentioned

Re: [PATCH 20/25] arm64:ilp32: add sys_ilp32.c and a separate table (in entry.S) to use it

2016-05-11 Thread Arnd Bergmann
On Wednesday 11 May 2016 19:16:44 Zhangjian wrote: > Hi, > > On 2016/5/11 18:12, Zhangjian (Bamvor) wrote: > > Hi, Arnd > > > > On 2016/5/11 16:09, Arnd Bergmann wrote: > > > On Wednesday 11 May 2016 10:04:16 Zhangjian wrote: > > >>> I don't remember. It's probably not important whether we have

Re: [PATCH 20/25] arm64:ilp32: add sys_ilp32.c and a separate table (in entry.S) to use it

2016-05-11 Thread Arnd Bergmann
On Wednesday 11 May 2016 19:16:44 Zhangjian wrote: > Hi, > > On 2016/5/11 18:12, Zhangjian (Bamvor) wrote: > > Hi, Arnd > > > > On 2016/5/11 16:09, Arnd Bergmann wrote: > > > On Wednesday 11 May 2016 10:04:16 Zhangjian wrote: > > >>> I don't remember. It's probably not important whether we have

Re: [PATCH 20/25] arm64:ilp32: add sys_ilp32.c and a separate table (in entry.S) to use it

2016-05-11 Thread Zhangjian (Bamvor)
Hi, On 2016/5/11 18:12, Zhangjian (Bamvor) wrote: Hi, Arnd On 2016/5/11 16:09, Arnd Bergmann wrote: > On Wednesday 11 May 2016 10:04:16 Zhangjian wrote: >>> I don't remember. It's probably not important whether we have the shift >>> in there, as long as it's independent of the actual kernel

Re: [PATCH 20/25] arm64:ilp32: add sys_ilp32.c and a separate table (in entry.S) to use it

2016-05-11 Thread Zhangjian (Bamvor)
Hi, On 2016/5/11 18:12, Zhangjian (Bamvor) wrote: Hi, Arnd On 2016/5/11 16:09, Arnd Bergmann wrote: > On Wednesday 11 May 2016 10:04:16 Zhangjian wrote: >>> I don't remember. It's probably not important whether we have the shift >>> in there, as long as it's independent of the actual kernel

Re: [PATCH 20/25] arm64:ilp32: add sys_ilp32.c and a separate table (in entry.S) to use it

2016-05-11 Thread Arnd Bergmann
On Wednesday 11 May 2016 11:04:38 Yury Norov wrote: > On Wed, May 11, 2016 at 10:04:16AM +0800, Zhangjian (Bamvor) wrote: > [...] > > > >>Ok, I will test the ltp syscall test. > > >>With this changes, the issue I mentioned should be fixed. But we still > > >>use mmap2 syscall for ILP32

Re: [PATCH 20/25] arm64:ilp32: add sys_ilp32.c and a separate table (in entry.S) to use it

2016-05-11 Thread Arnd Bergmann
On Wednesday 11 May 2016 11:04:38 Yury Norov wrote: > On Wed, May 11, 2016 at 10:04:16AM +0800, Zhangjian (Bamvor) wrote: > [...] > > > >>Ok, I will test the ltp syscall test. > > >>With this changes, the issue I mentioned should be fixed. But we still > > >>use mmap2 syscall for ILP32

Re: [PATCH 20/25] arm64:ilp32: add sys_ilp32.c and a separate table (in entry.S) to use it

2016-05-11 Thread Zhangjian (Bamvor)
Hi, Arnd On 2016/5/11 16:09, Arnd Bergmann wrote: > On Wednesday 11 May 2016 10:04:16 Zhangjian wrote: >>> I don't remember. It's probably not important whether we have the shift >>> in there, as long as it's independent of the actual kernel page size and >>> user space and kernel agree on the

Re: [PATCH 20/25] arm64:ilp32: add sys_ilp32.c and a separate table (in entry.S) to use it

2016-05-11 Thread Zhangjian (Bamvor)
Hi, Arnd On 2016/5/11 16:09, Arnd Bergmann wrote: > On Wednesday 11 May 2016 10:04:16 Zhangjian wrote: >>> I don't remember. It's probably not important whether we have the shift >>> in there, as long as it's independent of the actual kernel page size and >>> user space and kernel agree on the

Re: [PATCH 20/25] arm64:ilp32: add sys_ilp32.c and a separate table (in entry.S) to use it

2016-05-11 Thread Arnd Bergmann
On Wednesday 11 May 2016 10:04:16 Zhangjian wrote: > > I don't remember. It's probably not important whether we have the shift > > in there, as long as it's independent of the actual kernel page size and > > user space and kernel agree on the calling conventions. > Well. I am ok with where to

Re: [PATCH 20/25] arm64:ilp32: add sys_ilp32.c and a separate table (in entry.S) to use it

2016-05-11 Thread Arnd Bergmann
On Wednesday 11 May 2016 10:04:16 Zhangjian wrote: > > I don't remember. It's probably not important whether we have the shift > > in there, as long as it's independent of the actual kernel page size and > > user space and kernel agree on the calling conventions. > Well. I am ok with where to

Re: [PATCH 20/25] arm64:ilp32: add sys_ilp32.c and a separate table (in entry.S) to use it

2016-05-11 Thread Yury Norov
On Wed, May 11, 2016 at 10:04:16AM +0800, Zhangjian (Bamvor) wrote: [...] > >>Ok, I will test the ltp syscall test. > >>With this changes, the issue I mentioned should be fixed. But we still > >>use mmap2 syscall for ILP32 application when we pass the offset instead > >>of page offset. Is it

Re: [PATCH 20/25] arm64:ilp32: add sys_ilp32.c and a separate table (in entry.S) to use it

2016-05-11 Thread Yury Norov
On Wed, May 11, 2016 at 10:04:16AM +0800, Zhangjian (Bamvor) wrote: [...] > >>Ok, I will test the ltp syscall test. > >>With this changes, the issue I mentioned should be fixed. But we still > >>use mmap2 syscall for ILP32 application when we pass the offset instead > >>of page offset. Is it

Re: [PATCH 20/25] arm64:ilp32: add sys_ilp32.c and a separate table (in entry.S) to use it

2016-05-10 Thread Zhangjian (Bamvor)
Hi, On 2016/5/10 20:50, Arnd Bergmann wrote: On Tuesday 10 May 2016 20:39:41 Zhangjian wrote: Hi, On 2016/5/10 19:48, Arnd Bergmann wrote: On Tuesday 10 May 2016 17:47:26 Zhangjian wrote: On 2016/5/10 16:36, Arnd Bergmann wrote: On Tuesday 10 May 2016 15:42:07 Zhangjian wrote: On 2016/5/6

Re: [PATCH 20/25] arm64:ilp32: add sys_ilp32.c and a separate table (in entry.S) to use it

2016-05-10 Thread Zhangjian (Bamvor)
Hi, On 2016/5/10 20:50, Arnd Bergmann wrote: On Tuesday 10 May 2016 20:39:41 Zhangjian wrote: Hi, On 2016/5/10 19:48, Arnd Bergmann wrote: On Tuesday 10 May 2016 17:47:26 Zhangjian wrote: On 2016/5/10 16:36, Arnd Bergmann wrote: On Tuesday 10 May 2016 15:42:07 Zhangjian wrote: On 2016/5/6

Re: [PATCH 20/25] arm64:ilp32: add sys_ilp32.c and a separate table (in entry.S) to use it

2016-05-10 Thread Arnd Bergmann
On Tuesday 10 May 2016 20:39:41 Zhangjian wrote: > Hi, > > On 2016/5/10 19:48, Arnd Bergmann wrote: > > On Tuesday 10 May 2016 17:47:26 Zhangjian wrote: > >> On 2016/5/10 16:36, Arnd Bergmann wrote: > >>> On Tuesday 10 May 2016 15:42:07 Zhangjian wrote: > On 2016/5/6 20:37, Yury Norov wrote:

Re: [PATCH 20/25] arm64:ilp32: add sys_ilp32.c and a separate table (in entry.S) to use it

2016-05-10 Thread Arnd Bergmann
On Tuesday 10 May 2016 20:39:41 Zhangjian wrote: > Hi, > > On 2016/5/10 19:48, Arnd Bergmann wrote: > > On Tuesday 10 May 2016 17:47:26 Zhangjian wrote: > >> On 2016/5/10 16:36, Arnd Bergmann wrote: > >>> On Tuesday 10 May 2016 15:42:07 Zhangjian wrote: > On 2016/5/6 20:37, Yury Norov wrote:

Re: [PATCH 20/25] arm64:ilp32: add sys_ilp32.c and a separate table (in entry.S) to use it

2016-05-10 Thread Zhangjian (Bamvor)
Hi, On 2016/5/10 19:48, Arnd Bergmann wrote: On Tuesday 10 May 2016 17:47:26 Zhangjian wrote: On 2016/5/10 16:36, Arnd Bergmann wrote: On Tuesday 10 May 2016 15:42:07 Zhangjian wrote: On 2016/5/6 20:37, Yury Norov wrote: "include/uapi/asm-generic/posix_types.h" is uapi, we could not check

Re: [PATCH 20/25] arm64:ilp32: add sys_ilp32.c and a separate table (in entry.S) to use it

2016-05-10 Thread Zhangjian (Bamvor)
Hi, On 2016/5/10 19:48, Arnd Bergmann wrote: On Tuesday 10 May 2016 17:47:26 Zhangjian wrote: On 2016/5/10 16:36, Arnd Bergmann wrote: On Tuesday 10 May 2016 15:42:07 Zhangjian wrote: On 2016/5/6 20:37, Yury Norov wrote: "include/uapi/asm-generic/posix_types.h" is uapi, we could not check

Re: [PATCH 20/25] arm64:ilp32: add sys_ilp32.c and a separate table (in entry.S) to use it

2016-05-10 Thread Arnd Bergmann
On Tuesday 10 May 2016 17:47:26 Zhangjian wrote: > On 2016/5/10 16:36, Arnd Bergmann wrote: > > On Tuesday 10 May 2016 15:42:07 Zhangjian wrote: > >> On 2016/5/6 20:37, Yury Norov wrote: > > "include/uapi/asm-generic/posix_types.h" is uapi, we could not check > "ARCH_32BIT_OFF_T" here. Besides,

Re: [PATCH 20/25] arm64:ilp32: add sys_ilp32.c and a separate table (in entry.S) to use it

2016-05-10 Thread Arnd Bergmann
On Tuesday 10 May 2016 17:47:26 Zhangjian wrote: > On 2016/5/10 16:36, Arnd Bergmann wrote: > > On Tuesday 10 May 2016 15:42:07 Zhangjian wrote: > >> On 2016/5/6 20:37, Yury Norov wrote: > > "include/uapi/asm-generic/posix_types.h" is uapi, we could not check > "ARCH_32BIT_OFF_T" here. Besides,

Re: [PATCH 20/25] arm64:ilp32: add sys_ilp32.c and a separate table (in entry.S) to use it

2016-05-10 Thread Zhangjian (Bamvor)
Hi, Arnd On 2016/5/10 16:36, Arnd Bergmann wrote: On Tuesday 10 May 2016 15:42:07 Zhangjian wrote: On 2016/5/6 20:37, Yury Norov wrote: On Fri, May 06, 2016 at 08:16:48PM +0800, Zhangjian (Bamvor) wrote: AFAIR, here we don't shift offset, as it's 64-bit both in user- and kernel-space, In

Re: [PATCH 20/25] arm64:ilp32: add sys_ilp32.c and a separate table (in entry.S) to use it

2016-05-10 Thread Zhangjian (Bamvor)
Hi, Arnd On 2016/5/10 16:36, Arnd Bergmann wrote: On Tuesday 10 May 2016 15:42:07 Zhangjian wrote: On 2016/5/6 20:37, Yury Norov wrote: On Fri, May 06, 2016 at 08:16:48PM +0800, Zhangjian (Bamvor) wrote: AFAIR, here we don't shift offset, as it's 64-bit both in user- and kernel-space, In

Re: [PATCH 20/25] arm64:ilp32: add sys_ilp32.c and a separate table (in entry.S) to use it

2016-05-10 Thread Arnd Bergmann
On Tuesday 10 May 2016 15:42:07 Zhangjian wrote: > On 2016/5/6 20:37, Yury Norov wrote: > > On Fri, May 06, 2016 at 08:16:48PM +0800, Zhangjian (Bamvor) wrote: > > > > AFAIR, here we don't shift offset, as it's 64-bit both in user- > > and kernel-space, > In your ilp32-2.22 branch, you wrapper

Re: [PATCH 20/25] arm64:ilp32: add sys_ilp32.c and a separate table (in entry.S) to use it

2016-05-10 Thread Arnd Bergmann
On Tuesday 10 May 2016 15:42:07 Zhangjian wrote: > On 2016/5/6 20:37, Yury Norov wrote: > > On Fri, May 06, 2016 at 08:16:48PM +0800, Zhangjian (Bamvor) wrote: > > > > AFAIR, here we don't shift offset, as it's 64-bit both in user- > > and kernel-space, > In your ilp32-2.22 branch, you wrapper

Re: [PATCH 20/25] arm64:ilp32: add sys_ilp32.c and a separate table (in entry.S) to use it

2016-05-10 Thread Zhangjian (Bamvor)
Hi, Sorry I forget to paste my test code: #include #include #include #include #define TEMPFILE "mmapfile" int main(int argc, char *argv[]) { int fd; void *addr; unsigned long offset; unsigned long size; if (argc == 3) { if

Re: [PATCH 20/25] arm64:ilp32: add sys_ilp32.c and a separate table (in entry.S) to use it

2016-05-10 Thread Zhangjian (Bamvor)
Hi, Sorry I forget to paste my test code: #include #include #include #include #define TEMPFILE "mmapfile" int main(int argc, char *argv[]) { int fd; void *addr; unsigned long offset; unsigned long size; if (argc == 3) { if

Re: [PATCH 20/25] arm64:ilp32: add sys_ilp32.c and a separate table (in entry.S) to use it

2016-05-10 Thread Zhangjian (Bamvor)
Hi, Yury On 2016/5/6 20:37, Yury Norov wrote: On Fri, May 06, 2016 at 08:16:48PM +0800, Zhangjian (Bamvor) wrote: Hi, On 2016/4/6 6:08, Yury Norov wrote: From: Andrew Pinski Add a separate syscall-table for ILP32, which dispatches either to native LP64 system call

Re: [PATCH 20/25] arm64:ilp32: add sys_ilp32.c and a separate table (in entry.S) to use it

2016-05-10 Thread Zhangjian (Bamvor)
Hi, Yury On 2016/5/6 20:37, Yury Norov wrote: On Fri, May 06, 2016 at 08:16:48PM +0800, Zhangjian (Bamvor) wrote: Hi, On 2016/4/6 6:08, Yury Norov wrote: From: Andrew Pinski Add a separate syscall-table for ILP32, which dispatches either to native LP64 system call implementation or to

Re: [PATCH 20/25] arm64:ilp32: add sys_ilp32.c and a separate table (in entry.S) to use it

2016-05-06 Thread Yury Norov
On Fri, May 06, 2016 at 08:16:48PM +0800, Zhangjian (Bamvor) wrote: > Hi, > > On 2016/4/6 6:08, Yury Norov wrote: > >From: Andrew Pinski > > > >Add a separate syscall-table for ILP32, which dispatches either to native > >LP64 system call implementation or to compat-syscalls,

Re: [PATCH 20/25] arm64:ilp32: add sys_ilp32.c and a separate table (in entry.S) to use it

2016-05-06 Thread Yury Norov
On Fri, May 06, 2016 at 08:16:48PM +0800, Zhangjian (Bamvor) wrote: > Hi, > > On 2016/4/6 6:08, Yury Norov wrote: > >From: Andrew Pinski > > > >Add a separate syscall-table for ILP32, which dispatches either to native > >LP64 system call implementation or to compat-syscalls, as appropriate. > >

Re: [PATCH 20/25] arm64:ilp32: add sys_ilp32.c and a separate table (in entry.S) to use it

2016-05-06 Thread Zhangjian (Bamvor)
Hi, On 2016/4/6 6:08, Yury Norov wrote: From: Andrew Pinski Add a separate syscall-table for ILP32, which dispatches either to native LP64 system call implementation or to compat-syscalls, as appropriate. Signed-off-by: Andrew Pinski

Re: [PATCH 20/25] arm64:ilp32: add sys_ilp32.c and a separate table (in entry.S) to use it

2016-05-06 Thread Zhangjian (Bamvor)
Hi, On 2016/4/6 6:08, Yury Norov wrote: From: Andrew Pinski Add a separate syscall-table for ILP32, which dispatches either to native LP64 system call implementation or to compat-syscalls, as appropriate. Signed-off-by: Andrew Pinski Signed-off-by: Yury Norov ---

Re: [PATCH 20/25] arm64:ilp32: add sys_ilp32.c and a separate table (in entry.S) to use it

2016-04-29 Thread Arnd Bergmann
On Friday 29 April 2016 16:13:38 Yury Norov wrote: > On Fri, Apr 29, 2016 at 12:43:41AM +0200, Arnd Bergmann wrote: > > On Friday 29 April 2016 01:21:37 Yury Norov wrote: > > > > > > arch/arm64/kernel/sys_ilp32.c:59:0: warning: "__SYSCALL" redefined > > > #define __SYSCALL(nr, sym) [nr] = sym,

Re: [PATCH 20/25] arm64:ilp32: add sys_ilp32.c and a separate table (in entry.S) to use it

2016-04-29 Thread Arnd Bergmann
On Friday 29 April 2016 16:13:38 Yury Norov wrote: > On Fri, Apr 29, 2016 at 12:43:41AM +0200, Arnd Bergmann wrote: > > On Friday 29 April 2016 01:21:37 Yury Norov wrote: > > > > > > arch/arm64/kernel/sys_ilp32.c:59:0: warning: "__SYSCALL" redefined > > > #define __SYSCALL(nr, sym) [nr] = sym,

Re: [PATCH 20/25] arm64:ilp32: add sys_ilp32.c and a separate table (in entry.S) to use it

2016-04-29 Thread Yury Norov
On Fri, Apr 29, 2016 at 12:43:41AM +0200, Arnd Bergmann wrote: > On Friday 29 April 2016 01:21:37 Yury Norov wrote: > > index 1458ad7..410d817 100644 > > --- a/arch/arm64/kernel/sys_ilp32.c > > +++ b/arch/arm64/kernel/sys_ilp32.c > > @@ -17,6 +17,8 @@ > > * along with this program. If not, see >

Re: [PATCH 20/25] arm64:ilp32: add sys_ilp32.c and a separate table (in entry.S) to use it

2016-04-29 Thread Yury Norov
On Fri, Apr 29, 2016 at 12:43:41AM +0200, Arnd Bergmann wrote: > On Friday 29 April 2016 01:21:37 Yury Norov wrote: > > index 1458ad7..410d817 100644 > > --- a/arch/arm64/kernel/sys_ilp32.c > > +++ b/arch/arm64/kernel/sys_ilp32.c > > @@ -17,6 +17,8 @@ > > * along with this program. If not, see >

Re: [PATCH 20/25] arm64:ilp32: add sys_ilp32.c and a separate table (in entry.S) to use it

2016-04-28 Thread Arnd Bergmann
On Friday 29 April 2016 01:21:37 Yury Norov wrote: > index 1458ad7..410d817 100644 > --- a/arch/arm64/kernel/sys_ilp32.c > +++ b/arch/arm64/kernel/sys_ilp32.c > @@ -17,6 +17,8 @@ > * along with this program. If not, see > * . > */ > > +#define

Re: [PATCH 20/25] arm64:ilp32: add sys_ilp32.c and a separate table (in entry.S) to use it

2016-04-28 Thread Arnd Bergmann
On Friday 29 April 2016 01:21:37 Yury Norov wrote: > index 1458ad7..410d817 100644 > --- a/arch/arm64/kernel/sys_ilp32.c > +++ b/arch/arm64/kernel/sys_ilp32.c > @@ -17,6 +17,8 @@ > * along with this program. If not, see > * . > */ > > +#define

Re: [PATCH 20/25] arm64:ilp32: add sys_ilp32.c and a separate table (in entry.S) to use it

2016-04-28 Thread Yury Norov
On Thu, Apr 28, 2016 at 10:43:59PM +0200, Arnd Bergmann wrote: > On Thursday 28 April 2016 22:19:14 Yury Norov wrote: > > > > Yes, we need. Otherwise we have circular dependency like this: > > arch/arm64/kernel/sys_ilp32.c:60:0: warning: "__SC_WRAP" redefined > > #define __SC_WRAP(nr, sym) [nr]

Re: [PATCH 20/25] arm64:ilp32: add sys_ilp32.c and a separate table (in entry.S) to use it

2016-04-28 Thread Yury Norov
On Thu, Apr 28, 2016 at 10:43:59PM +0200, Arnd Bergmann wrote: > On Thursday 28 April 2016 22:19:14 Yury Norov wrote: > > > > Yes, we need. Otherwise we have circular dependency like this: > > arch/arm64/kernel/sys_ilp32.c:60:0: warning: "__SC_WRAP" redefined > > #define __SC_WRAP(nr, sym) [nr]

Re: [PATCH 20/25] arm64:ilp32: add sys_ilp32.c and a separate table (in entry.S) to use it

2016-04-28 Thread Arnd Bergmann
On Thursday 28 April 2016 22:19:14 Yury Norov wrote: > > Yes, we need. Otherwise we have circular dependency like this: > arch/arm64/kernel/sys_ilp32.c:60:0: warning: "__SC_WRAP" redefined > #define __SC_WRAP(nr, sym) [nr] = compat_##sym, > ^ > In file included from

Re: [PATCH 20/25] arm64:ilp32: add sys_ilp32.c and a separate table (in entry.S) to use it

2016-04-28 Thread Arnd Bergmann
On Thursday 28 April 2016 22:19:14 Yury Norov wrote: > > Yes, we need. Otherwise we have circular dependency like this: > arch/arm64/kernel/sys_ilp32.c:60:0: warning: "__SC_WRAP" redefined > #define __SC_WRAP(nr, sym) [nr] = compat_##sym, > ^ > In file included from

Re: [PATCH 20/25] arm64:ilp32: add sys_ilp32.c and a separate table (in entry.S) to use it

2016-04-28 Thread Yury Norov
On Tue, Apr 26, 2016 at 05:57:01PM +0100, Catalin Marinas wrote: > On Wed, Apr 06, 2016 at 01:08:42AM +0300, Yury Norov wrote: > > +/* Using non-compat syscalls where necessary */ > > +#define compat_sys_fadvise64_64sys_fadvise64_64 > > +#define compat_sys_fallocate sys_fallocate

Re: [PATCH 20/25] arm64:ilp32: add sys_ilp32.c and a separate table (in entry.S) to use it

2016-04-28 Thread Yury Norov
On Tue, Apr 26, 2016 at 05:57:01PM +0100, Catalin Marinas wrote: > On Wed, Apr 06, 2016 at 01:08:42AM +0300, Yury Norov wrote: > > +/* Using non-compat syscalls where necessary */ > > +#define compat_sys_fadvise64_64sys_fadvise64_64 > > +#define compat_sys_fallocate sys_fallocate

Re: [PATCH 20/25] arm64:ilp32: add sys_ilp32.c and a separate table (in entry.S) to use it

2016-04-26 Thread Catalin Marinas
On Wed, Apr 06, 2016 at 01:08:42AM +0300, Yury Norov wrote: > +/* Using non-compat syscalls where necessary */ > +#define compat_sys_fadvise64_64sys_fadvise64_64 > +#define compat_sys_fallocate sys_fallocate > +#define compat_sys_ftruncate64 sys_ftruncate > +#define

Re: [PATCH 20/25] arm64:ilp32: add sys_ilp32.c and a separate table (in entry.S) to use it

2016-04-26 Thread Catalin Marinas
On Wed, Apr 06, 2016 at 01:08:42AM +0300, Yury Norov wrote: > +/* Using non-compat syscalls where necessary */ > +#define compat_sys_fadvise64_64sys_fadvise64_64 > +#define compat_sys_fallocate sys_fallocate > +#define compat_sys_ftruncate64 sys_ftruncate > +#define

Re: [PATCH 20/25] arm64:ilp32: add sys_ilp32.c and a separate table (in entry.S) to use it

2016-04-26 Thread Catalin Marinas
On Mon, Apr 25, 2016 at 09:47:40PM +0300, Yury Norov wrote: > On Mon, Apr 25, 2016 at 09:19:13PM +0300, Yury Norov wrote: > > On Mon, Apr 25, 2016 at 06:26:56PM +0100, Catalin Marinas wrote: > > > On Wed, Apr 06, 2016 at 01:08:42AM +0300, Yury Norov wrote: > > > > --- a/arch/arm64/kernel/entry.S >

Re: [PATCH 20/25] arm64:ilp32: add sys_ilp32.c and a separate table (in entry.S) to use it

2016-04-26 Thread Catalin Marinas
On Mon, Apr 25, 2016 at 09:47:40PM +0300, Yury Norov wrote: > On Mon, Apr 25, 2016 at 09:19:13PM +0300, Yury Norov wrote: > > On Mon, Apr 25, 2016 at 06:26:56PM +0100, Catalin Marinas wrote: > > > On Wed, Apr 06, 2016 at 01:08:42AM +0300, Yury Norov wrote: > > > > --- a/arch/arm64/kernel/entry.S >

Re: [PATCH 20/25] arm64:ilp32: add sys_ilp32.c and a separate table (in entry.S) to use it

2016-04-25 Thread Yury Norov
On Mon, Apr 25, 2016 at 09:19:13PM +0300, Yury Norov wrote: > On Mon, Apr 25, 2016 at 06:26:56PM +0100, Catalin Marinas wrote: > > On Wed, Apr 06, 2016 at 01:08:42AM +0300, Yury Norov wrote: > > > --- a/arch/arm64/kernel/entry.S > > > +++ b/arch/arm64/kernel/entry.S > > > @@ -715,9 +715,13 @@

Re: [PATCH 20/25] arm64:ilp32: add sys_ilp32.c and a separate table (in entry.S) to use it

2016-04-25 Thread Yury Norov
On Mon, Apr 25, 2016 at 09:19:13PM +0300, Yury Norov wrote: > On Mon, Apr 25, 2016 at 06:26:56PM +0100, Catalin Marinas wrote: > > On Wed, Apr 06, 2016 at 01:08:42AM +0300, Yury Norov wrote: > > > --- a/arch/arm64/kernel/entry.S > > > +++ b/arch/arm64/kernel/entry.S > > > @@ -715,9 +715,13 @@

Re: [PATCH 20/25] arm64:ilp32: add sys_ilp32.c and a separate table (in entry.S) to use it

2016-04-25 Thread Yury Norov
On Mon, Apr 25, 2016 at 06:26:56PM +0100, Catalin Marinas wrote: > On Wed, Apr 06, 2016 at 01:08:42AM +0300, Yury Norov wrote: > > --- a/arch/arm64/kernel/entry.S > > +++ b/arch/arm64/kernel/entry.S > > @@ -715,9 +715,13 @@ ENDPROC(ret_from_fork) > > */ > > .align 6 > > el0_svc: > > -

Re: [PATCH 20/25] arm64:ilp32: add sys_ilp32.c and a separate table (in entry.S) to use it

2016-04-25 Thread Yury Norov
On Mon, Apr 25, 2016 at 06:26:56PM +0100, Catalin Marinas wrote: > On Wed, Apr 06, 2016 at 01:08:42AM +0300, Yury Norov wrote: > > --- a/arch/arm64/kernel/entry.S > > +++ b/arch/arm64/kernel/entry.S > > @@ -715,9 +715,13 @@ ENDPROC(ret_from_fork) > > */ > > .align 6 > > el0_svc: > > -

Re: [PATCH 20/25] arm64:ilp32: add sys_ilp32.c and a separate table (in entry.S) to use it

2016-04-25 Thread Catalin Marinas
On Wed, Apr 06, 2016 at 01:08:42AM +0300, Yury Norov wrote: > --- a/arch/arm64/kernel/entry.S > +++ b/arch/arm64/kernel/entry.S > @@ -715,9 +715,13 @@ ENDPROC(ret_from_fork) > */ > .align 6 > el0_svc: > - adrpstbl, sys_call_table// load syscall table pointer >

Re: [PATCH 20/25] arm64:ilp32: add sys_ilp32.c and a separate table (in entry.S) to use it

2016-04-25 Thread Catalin Marinas
On Wed, Apr 06, 2016 at 01:08:42AM +0300, Yury Norov wrote: > --- a/arch/arm64/kernel/entry.S > +++ b/arch/arm64/kernel/entry.S > @@ -715,9 +715,13 @@ ENDPROC(ret_from_fork) > */ > .align 6 > el0_svc: > - adrpstbl, sys_call_table// load syscall table pointer >

[PATCH 20/25] arm64:ilp32: add sys_ilp32.c and a separate table (in entry.S) to use it

2016-04-05 Thread Yury Norov
From: Andrew Pinski Add a separate syscall-table for ILP32, which dispatches either to native LP64 system call implementation or to compat-syscalls, as appropriate. Signed-off-by: Andrew Pinski Signed-off-by: Yury Norov

[PATCH 20/25] arm64:ilp32: add sys_ilp32.c and a separate table (in entry.S) to use it

2016-04-05 Thread Yury Norov
From: Andrew Pinski Add a separate syscall-table for ILP32, which dispatches either to native LP64 system call implementation or to compat-syscalls, as appropriate. Signed-off-by: Andrew Pinski Signed-off-by: Yury Norov --- arch/arm64/include/asm/unistd.h | 11 ++-