Re: [PATCH 17/23] arm64: ptrace: handle ptrace_request differently for aarch32 and ilp32

2016-06-08 Thread Yury Norov
On Wed, Jun 08, 2016 at 09:34:09AM +0800, zhouchengming wrote: > On 2016/5/24 8:04, Yury Norov wrote: > >Here new aarch32 ptrace syscall handler is introsuced to avoid run-time > >detection of the task type. > > > >Signed-off-by: Yury Norov<yno...@caviumnetworks.com&g

Re: [PATCH 21/23] arm64: ilp32: introduce ilp32-specific handlers for sigframe and ucontext

2016-06-12 Thread Yury Norov
Hi Bamvor, Sorry, I missed this patch. On Sat, Jun 04, 2016 at 07:34:32PM +0800, Zhangjian (Bamvor) wrote: > Hi, > > I found an issue of unwind with the following code. The correct backtrace > should be: > (gdb) where > #0 0x004004d0 in my_sig (sig=11) at test_force3.c:16 > #1 > #2 func2

Re: [PATCH 01/23] all: syscall wrappers: add documentation

2016-05-25 Thread Yury Norov
On Wed, May 25, 2016 at 12:30:17PM -0700, David Miller wrote: > From: Yury Norov <yno...@caviumnetworks.com> > Date: Tue, 24 May 2016 03:04:30 +0300 > > > +To clear that top halves, automatic wrappers are introduced. They clear all > > +required registers before passing

Re: [PATCH 01/23] all: syscall wrappers: add documentation

2016-05-27 Thread Yury Norov
On Fri, May 27, 2016 at 02:04:47PM +0100, Catalin Marinas wrote: > On Fri, May 27, 2016 at 12:49:11PM +0200, Arnd Bergmann wrote: > > On Friday, May 27, 2016 10:30:52 AM CEST Catalin Marinas wrote: > > > On Fri, May 27, 2016 at 10:42:59AM +0200, Arnd Bergmann wrote: > > > > On Friday, May 27, 2016

Re: [PATCH 01/23] all: syscall wrappers: add documentation

2016-05-26 Thread Yury Norov
On Wed, May 25, 2016 at 02:28:21PM -0700, David Miller wrote: > From: Arnd Bergmann > Date: Wed, 25 May 2016 23:01:06 +0200 > > > On Wednesday, May 25, 2016 1:50:39 PM CEST David Miller wrote: > >> From: Arnd Bergmann > >> Date: Wed, 25 May 2016 22:47:33 +0200 > >>

Re: [PATCH 16/23] arm64: ilp32: introduce binfmt_ilp32.c

2016-05-26 Thread Yury Norov
regset_t), > - datap); > + REGSET_COMPAT_GPR, 0, > + pr_reg_size, datap); > break; > > case COMPAT_PTRACE_SETREGS: > ret = copy_reg

Re: [PATCH 01/23] all: syscall wrappers: add documentation

2016-06-14 Thread Yury Norov
Hi Catalin, David, all > COMPAT_SYSCALL_WRAP2(creat, ...): > mov w0, w0 > b > > > > Cost wise, this seems like it all cancels out in the end, but what > > > do I know? > > > > I think you know something, and I also think Heiko and other s390 guys > > know something as

Re: [PATCH 16/23] arm64: ilp32: introduce binfmt_ilp32.c

2016-06-14 Thread Yury Norov
On Thu, May 26, 2016 at 09:49:42PM +0800, Zhangjian (Bamvor) wrote: > Hi, yury > > The coredump is usable in our platform. It miss the following definition: > +#define compat_elf_greg_telf_greg_t > +#define compat_elf_gregset_t elf_gregset_t > > And it leads to the wrong register save in

[PATCH 02/19] 32-bit ABI: introduce ARCH_32BIT_OFF_T config option

2016-06-17 Thread Yury Norov
-bit off_t, and therefore want to limit the file size to 4GB unless specified differently in the open flags. Signed-off-by: Yury Norov <yno...@caviumnetworks.com> --- arch/Kconfig| 4 arch/arc/Kconfig| 1 + arch/arm/Kconfig| 1 + arch/blackfin/Kconfig | 1 +

[PATCH 05/19] arm64: rename COMPAT to AARCH32_EL0 in Kconfig

2016-06-17 Thread Yury Norov
tworks.com> Signed-off-by: Philipp Tomsich <philipp.toms...@theobroma-systems.com> Signed-off-by: Christoph Muellner <christoph.muell...@theobroma-systems.com> Signed-off-by: Bamvor Jian Zhang <bamvor.zhangj...@linaro.org> Signed-off-by: Yury Norov <yno...@c

[PATCH 09/19] arm64: ilp32: add is_ilp32_compat_{task,thread} and TIF_32BIT_AARCH64

2016-06-17 Thread Yury Norov
accordingly. Signed-off-by: Andrew Pinski <andrew.pin...@caviumnetworks.com> Signed-off-by: Philipp Tomsich <philipp.toms...@theobroma-systems.com> Signed-off-by: Christoph Muellner <christoph.muell...@theobroma-systems.com> Signed-off-by: Yury Norov <yno...@caviumnetworks.com>

[PATCH 08/19] arm64: introduce is_a32_task and is_a32_thread (for AArch32 compat)

2016-06-17 Thread Yury Norov
because has already included. It was fixed too. Signed-off-by: Yury Norov <yno...@caviumnetworks.com> Signed-off-by: Philipp Tomsich <philipp.toms...@theobroma-systems.com> Signed-off-by: Christoph Muellner <christoph.muell...@theobroma-systems.com> Signed-off-by: Andrew

[PATCH 13/19] arm64: ilp32: share aarch32 syscall handlers

2016-06-17 Thread Yury Norov
off_t is passed in register pair just like in aarch32. In this patch corresponding aarch32 handlers are shared to ilp32 code. Signed-off-by: Yury Norov <yno...@caviumnetworks.com> --- arch/arm64/kernel/Makefile | 1 + arch/arm64/kernel/entry32.S

[PATCH 12/19] arm64: ptrace: handle ptrace_request differently for aarch32 and ilp32

2016-06-17 Thread Yury Norov
Here new aarch32 ptrace syscall handler is introsuced to avoid run-time detection of the task type. Signed-off-by: Yury Norov <yno...@caviumnetworks.com> --- arch/arm64/include/asm/unistd32.h | 2 +- arch/arm64/kernel/ptrace.c| 50 ++- arch

[PATCH 10/19] arm64: introduce binfmt_elf32.c

2016-06-17 Thread Yury Norov
As we support more than one compat formats, it looks more reasonable to not use fs/compat_binfmt.c. Custom binfmt_elf32.c allows to move aarch32 specific definitions there and make code more maintainable and readable. Signed-off-by: Yury Norov <yno...@caviumnetworks.com> --- arch/arm64/K

[PATCH 04/19] arm64: ensure the kernel is compiled for LP64

2016-06-17 Thread Yury Norov
Pinski <andrew.pin...@caviumnetworks.com> Signed-off-by: Philipp Tomsich <philipp.toms...@theobroma-systems.com> Signed-off-by: Christoph Muellner <christoph.muell...@theobroma-systems.com> Signed-off-by: Yury Norov <yno...@caviumnetworks.com> Reviewed-by: David Daney <dda

[PATCH 17/19] arm64: ilp32: introduce ilp32-specific handlers for sigframe and ucontext

2016-06-17 Thread Yury Norov
ndrew.pin...@caviumnetworks.com> Signed-off-by: Yury Norov <yno...@caviumnetworks.com> --- arch/arm64/include/asm/signal_ilp32.h | 34 ++ arch/arm64/kernel/Makefile| 3 +- arch/arm64/kernel/entry_ilp32.S | 23 arch/arm64/kernel/signal.c| 3 +

[PATCH 11/19] arm64: ilp32: introduce binfmt_ilp32.c

2016-06-17 Thread Yury Norov
to handle ILP32 binaries Signed-off-by: Yury Norov <yno...@caviumnetworks.com> --- arch/arm64/include/asm/elf.h | 6 +++ arch/arm64/kernel/Makefile | 1 + arch/arm64/kernel/binfmt_ilp32.c | 96 3 files changed, 103 insertions(+) creat

[PATCH 15/19] arm64: signal: share lp64 signal routines to ilp32

2016-06-17 Thread Yury Norov
After that, it will be possible to reuse it in ilp32. Signed-off-by: Yury Norov <yno...@caviumnetworks.com> --- arch/arm64/include/asm/signal_common.h | 33 arch/arm64/kernel/signal.c | 93 +- 2 files changed, 92 insertions(

[PATCH 03/19] arm64: ilp32: add documentation on the ILP32 ABI for ARM64

2016-06-17 Thread Yury Norov
Based on Andrew Pinski's patch-series. Signed-off-by: Yury Norov <yno...@caviumnetworks.com> --- Documentation/arm64/ilp32.txt | 54 +++ 1 file changed, 54 insertions(+) create mode 100644 Documentation/arm64/ilp32.txt diff --git a/Documentation

[PATCH 07/19] thread: move thread bits accessors to separated file

2016-06-17 Thread Yury Norov
hould be)" Signed-off-by: Yury Norov <yno...@caviumnetworks.com> --- include/linux/thread_bits.h | 55 + include/linux/thread_info.h | 44 +--- 2 files changed, 56 insertions(+), 43 deletions(-) create mode 1006

[PATCH 01/19] compat ABI: use non-compat openat and open_by_handle_at variants

2016-06-17 Thread Yury Norov
The only difference is that non-compat version forces O_LARGEFILE, and it should be the default behaviour for all architectures, as we don't support 32-bit off_t. The only exception is tile32, that continues with compat version of syscalls. Signed-off-by: Yury Norov <yno...@caviumnetworks.

[RFC nowrap: PATCH v7 00/19] ILP32 for ARM64

2016-06-17 Thread Yury Norov
: add sys_ilp32.c and a separate table (in entry.S) to use it arm64: ilp32: introduce ilp32-specific handlers for sigframe and ucontext arm64:ilp32: add ARM64_ILP32 to Kconfig Philipp Tomsich (1): arm64:ilp32: add vdso-ilp32 and use for signal return Yury Norov (12): compat ABI: use non

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

2016-06-20 Thread Yury Norov
On Sat, Jun 18, 2016 at 02:54:23AM +0300, Yury Norov wrote: > From: Andrew Pinski <apin...@cavium.com> > > Add a separate syscall-table for ILP32, which dispatches either to native > LP64 system call implementation or to compat-syscalls, as appropriate. > > Sign

Re: [PATCH] ilp32: fix {GET,SET}SIGMASK request for ptrace

2016-06-26 Thread Yury Norov
Hi Zhou, Thank you for the patch. The idea is ok, but patch format got broken for some reason. Could you re-send it? Yury. On Mon, Jun 27, 2016 at 12:49:05PM +0800, zhouchengming wrote: > atus: RO > Content-Length: 4732 > Lines: 181 > > The function compat_ptrace_request(used by ilp32) don't

[PATCH 3/5] all: s390: move wrapper infrastructure to generic headers

2016-02-24 Thread Yury Norov
. But architectures that generate that tables with C code (ARM64/ILP32) should redefine it as '#define __SC_WRAP(name) compat_##name'. Signed-off-by: Yury Norov <yno...@caviumnetworks.com> --- arch/s390/include/asm/compat.h| 17 +-- arch/s390/kernel/compat_wrapper.

[PATCH 5/5] all: wrap needed syscalls in generic unistd

2016-02-24 Thread Yury Norov
As generic unistd syscall table is written in C, syscall prototypes declaration is needed. It's added to compat header. Signed-off-by: Yury Norov <yno...@caviumnetworks.com> --- include/linux/compat.h| 225 + include/uapi/asm-generic/unistd.h

[PATCH 1/5] all: syscall wrappers: add documentation

2016-02-24 Thread Yury Norov
Signed-off-by: Yury Norov <yno...@caviumnetworks.com> --- Documentation/adding-syscalls.txt | 32 1 file changed, 32 insertions(+) diff --git a/Documentation/adding-syscalls.txt b/Documentation/adding-syscalls.txt index cc2d4ac..1db880c

[PATCH v2 0/5] all: s390: make compat wrappers the generic solution

2016-02-24 Thread Yury Norov
-tested on s390. [1] http://www.spinics.net/lists/linux-s390/msg11593.html Yury Norov (5): all: syscall wrappers: add documentation all: introduce COMPAT_WRAPPER option and enable it for s390 all: s390: move wrapper infrastructure to generic headers all: s390: move compat_wrappers.c from arch

[PATCH 2/5] all: introduce COMPAT_WRAPPER option and enable it for s390

2016-02-24 Thread Yury Norov
Signed-off-by: Yury Norov <yno...@caviumnetworks.com> --- arch/Kconfig | 4 arch/s390/Kconfig | 1 + 2 files changed, 5 insertions(+) diff --git a/arch/Kconfig b/arch/Kconfig index f6b649d..6393093 100644 --- a/arch/Kconfig +++ b/arch/Kconfig @@ -583,6 +583,10 @@

[PATCH 4/5] all: s390: move compat_wrappers.c from arch/s390/kernel to kernel/

2016-02-24 Thread Yury Norov
Some syscalls are declared conditionally, so corresponding wrappers are conditional accordingly. Signed-off-by: Yury Norov <yno...@caviumnetworks.com> --- arch/s390/kernel/Makefile | 2 +- arch/s390/kernel/compat_wrapper.c | 129 - kernel/Ma

Re: [PATCH 3/5] all: s390: move wrapper infrastructure to generic headers

2016-02-25 Thread Yury Norov
On Thu, Feb 25, 2016 at 09:51:40AM +0100, Heiko Carstens wrote: > On Wed, Feb 24, 2016 at 09:34:12PM +0300, Yury Norov wrote: > > diff --git a/include/linux/syscalls_structs.h > > b/include/linux/syscalls_structs.h > > new file mode 100644 > > index 000..a920cbc

Re: [PATCH 2/5] all: introduce COMPAT_WRAPPER option and enable it for s390

2016-02-25 Thread Yury Norov
On Thu, Feb 25, 2016 at 09:49:43AM +0100, Heiko Carstens wrote: > On Wed, Feb 24, 2016 at 09:34:11PM +0300, Yury Norov wrote: > > Signed-off-by: Yury Norov <yno...@caviumnetworks.com> > > --- > > arch/Kconfig | 4 > > arch/s390/Kconfig | 1 + &

Re: [PATCH 4/5] all: s390: move compat_wrappers.c from arch/s390/kernel to kernel/

2016-02-25 Thread Yury Norov
On Wed, Feb 24, 2016 at 09:34:13PM +0300, Yury Norov wrote: [...] > +COMPAT_SYSCALL_WRAP3(bpf, int, cmd, union bpf_attr *, attr, unsigned int, > size); > +COMPAT_SYSCALL_WRAP3(s390_pci_mmio_write, const unsigned long, mmio_addr, > const void __user *, user_buffer, const si

[PATCH v3 0/5] all: s390: make compat wrappers the generic solution

2016-02-26 Thread Yury Norov
es all wrappers in separated file kernel/compat_wrapper.c v3: - move 2 s390-related wrappers from kernel/compat_wrappers.h to arch/s390/kernel/compat_linux.c - comments extended Build-tested on s390. [1] http://www.spinics.net/lists/linux-s390/msg11593.html Yury Norov (5): all: syscall wr

[PATCH 4/5] all: s390: move compat_wrappers.c from arch/s390/kernel to kernel

2016-02-26 Thread Yury Norov
S390-specific wrappers are moved to arch/s390/kernel/compat_linux.c Some syscalls are declared conditionally, so corresponding wrappers are conditional accordingly. Signed-off-by: Yury Norov <yno...@caviumnetworks.com> --- arch/s390/kernel/Makefile | 2 +- arch/s390/

[PATCH 1/5] all: syscall wrappers: add documentation

2016-02-26 Thread Yury Norov
Signed-off-by: Yury Norov <yno...@caviumnetworks.com> --- Documentation/adding-syscalls.txt | 32 1 file changed, 32 insertions(+) diff --git a/Documentation/adding-syscalls.txt b/Documentation/adding-syscalls.txt index cc2d4ac..d02a6bd

Re: [RFC6 PATCH v6 00/21] ILP32 for ARM64

2016-04-06 Thread Yury Norov
Hi Geert, On Wed, Apr 06, 2016 at 08:51:50AM +0200, Geert Uytterhoeven wrote: > Hi Yuri, > > On Wed, Apr 6, 2016 at 12:08 AM, Yury Norov <yno...@caviumnetworks.com> wrote: > > This version is rebased on kernel v4.6-rc2, and has fixes in signal > > subsystem. > &g

[PATCH 19/25] arm64: ptrace: handle ptrace_request differently for aarch32 and ilp32

2016-04-05 Thread Yury Norov
Here new aarch32 ptrace syscall handler is introsuced to avoid run-time detection of the task type. Signed-off-by: Yury Norov <yno...@caviumnetworks.com> --- arch/arm64/include/asm/unistd32.h | 2 +- arch/arm64/kernel/ptrace.c| 50 ++- arch

[PATCH 14/25] thread: move thread bits accessors to separated file

2016-04-05 Thread Yury Norov
[edd63a27] Signed-off-by: Yury Norov <yno...@caviumnetworks.com> --- include/linux/thread_bits.h | 55 + include/linux/thread_info.h | 44 +--- 2 files changed, 56 insertions(+), 43 deletions(-) create mode 1006

[PATCH 18/25] arm64: ilp32: introduce binfmt_ilp32.c

2016-04-05 Thread Yury Norov
to handle ILP32 binaries Signed-off-by: Yury Norov <yno...@caviumnetworks.com> --- arch/arm64/kernel/Makefile | 1 + arch/arm64/kernel/binfmt_ilp32.c | 91 2 files changed, 92 insertions(+) create mode 100644 arch/arm64/kernel/binfmt_ilp32.c

[PATCH 13/25] arm64:uapi: set __BITS_PER_LONG correctly for ILP32 and LP64

2016-04-05 Thread Yury Norov
<apin...@cavium.com> Signed-off-by: Philipp Tomsich <philipp.toms...@theobroma-systems.com> Signed-off-by: Christoph Muellner <christoph.muell...@theobroma-systems.com> Signed-off-by: Yury Norov <yno...@caviumnetworks.com> Reviewed-by: David Daney <dda...@caviumnetworks.com&

[PATCH 22/25] arm64: signal32: move ilp32 and aarch32 common code to separated file

2016-04-05 Thread Yury Norov
Signed-off-by: Yury Norov <yno...@caviumnetworks.com> --- arch/arm64/include/asm/signal32_common.h | 25 +++ arch/arm64/kernel/Makefile | 1 + arch/arm64/kernel/signal32.c | 85 --- arch/arm64/kernel/signal32_common.c

[PATCH 17/25] arm64: introduce binfmt_elf32.c

2016-04-05 Thread Yury Norov
As we support more than one compat formats, it looks more reasonable to not use fs/compat_binfmt.c. Custom binfmt_elf32.c allows to move aarch32 specific definitions there and make code more maintainable and readable. Signed-off-by: Yury Norov <yno...@caviumnetworks.com> --- arch/arm64/K

[RFC6 PATCH v6 00/21] ILP32 for ARM64

2016-04-05 Thread Yury Norov
to aarch32 Philipp Tomsich (1): arm64:ilp32: add vdso-ilp32 and use for signal return Yury Norov (16): all: syscall wrappers: add documentation all: introduce COMPAT_WRAPPER option and enable it for s390 all: s390: move wrapper infrastructure to generic headers all: s390: move compat_

[PATCH 15/25] arm64: introduce is_a32_task and is_a32_thread (for AArch32 compat)

2016-04-05 Thread Yury Norov
because has already included. It was fixed too. Signed-off-by: Yury Norov <yno...@caviumnetworks.com> Signed-off-by: Philipp Tomsich <philipp.toms...@theobroma-systems.com> Signed-off-by: Christoph Muellner <christoph.muell...@theobroma-systems.com> Signed-off-by: Andrew

[PATCH 09/25] arm64: ensure the kernel is compiled for LP64

2016-04-05 Thread Yury Norov
Pinski <andrew.pin...@caviumnetworks.com> Signed-off-by: Philipp Tomsich <philipp.toms...@theobroma-systems.com> Signed-off-by: Christoph Muellner <christoph.muell...@theobroma-systems.com> Signed-off-by: Yury Norov <yno...@caviumnetworks.com> Reviewed-by: David Daney <dda

[PATCH 16/25] arm64: ilp32: add is_ilp32_compat_{task,thread} and TIF_32BIT_AARCH64

2016-04-05 Thread Yury Norov
accordingly. Signed-off-by: Andrew Pinski <andrew.pin...@caviumnetworks.com> Signed-off-by: Philipp Tomsich <philipp.toms...@theobroma-systems.com> Signed-off-by: Christoph Muellner <christoph.muell...@theobroma-systems.com> Signed-off-by: Yury Norov <yno...@caviumnetworks.com>

Re: [RFC6 PATCH v6 00/21] ILP32 for ARM64 - LTP results

2016-04-05 Thread Yury Norov
There are about 20 failing tests of 782 in lite scenario. float_bessel float_exp_log float_iperb float_power float_trigo pipeio_1 pipeio_3 pipeio_5 pipeio_8 abort01 clone02 kill11 mmap16 open12 pause01

[PATCH 23/25] arm64: ilp32: introduce ilp32-specific handlers for sigframe and ucontext

2016-04-05 Thread Yury Norov
ndrew.pin...@caviumnetworks.com> Signed-off-by: Yury Norov <yno...@caviumnetworks.com> --- arch/arm64/include/asm/signal_ilp32.h | 34 ++ arch/arm64/kernel/Makefile| 3 +- arch/arm64/kernel/entry_ilp32.S | 23 arch/arm64/kernel/signal.c| 3 +

[PATCH 10/25] arm64: rename COMPAT to AARCH32_EL0 in Kconfig

2016-04-05 Thread Yury Norov
stoph.muell...@theobroma-systems.com> Signed-off-by: Yury Norov <yno...@caviumnetworks.com> Reviewed-by: David Daney <dda...@caviumnetworks.com> --- arch/arm64/Kconfig | 4 1 file changed, 4 insertions(+) diff --git a/arch/arm64/Kconfig b/arch/arm64/Kconfig index 4f43622..f923687 100

[PATCH 06/25] compat ABI: use non-compat openat and open_by_handle_at variants

2016-04-05 Thread Yury Norov
The only difference is that non-compat version forces O_LARGEFILE, and it should be the default behaviour for all architectures, as we don't support 32-bit off_t. The only exception is tile32, that continues with compat version of syscalls. Signed-off-by: Yury Norov <yno...@caviumnetworks.

[PATCH 24/25] arm64:ilp32: add vdso-ilp32 and use for signal return

2016-04-05 Thread Yury Norov
christoph.muell...@theobroma-systems.com> Signed-off-by: Yury Norov <yno...@caviumnetworks.com> --- arch/arm64/include/asm/vdso.h | 6 ++ arch/arm64/kernel/Makefile| 5 ++ arch/arm64/kernel/signal.c| 2 + arch/arm64/kernel/vdso-ilp

[PATCH 21/25] arm64: signal: share lp64 signal routines to ilp32

2016-04-05 Thread Yury Norov
After that, it will be possible to reuse it in ilp32. Signed-off-by: Yury Norov <yno...@caviumnetworks.com> --- arch/arm64/include/asm/signal_common.h | 33 arch/arm64/kernel/signal.c | 91 +- 2 files changed, 90 insertions(

[PATCH 07/25] 32-bit ABI: introduce ARCH_32BIT_OFF_T config option

2016-04-05 Thread Yury Norov
-bit off_t, and therefore want to limit the file size to 4GB unless specified differently in the open flags. Signed-off-by: Yury Norov <yno...@caviumnetworks.com> Acked-by: Thomas Gleixner <t...@linutronix.de> (For the x86 part) Acked-by: Arnd Bergmann <a...@arndb.de> --- arch/Kcon

[PATCH 04/25] all: s390: move compat_wrappers.c from arch/s390/kernel to kernel/

2016-04-05 Thread Yury Norov
Some syscalls are declared conditionally, so corresponding wrappers are conditional accordingly. Signed-off-by: Yury Norov <yno...@caviumnetworks.com> Acked-by: Heiko Carstens <heiko.carst...@de.ibm.com> --- arch/s390/kernel/Makefile | 2 +- arch/s390/kernel/compat_lin

[PATCH 02/25] all: introduce COMPAT_WRAPPER option and enable it for s390

2016-04-05 Thread Yury Norov
Signed-off-by: Yury Norov <yno...@caviumnetworks.com> Acked-by: Heiko Carstens <heiko.carst...@de.ibm.com> --- arch/Kconfig | 4 arch/s390/Kconfig | 1 + 2 files changed, 5 insertions(+) diff --git a/arch/Kconfig b/arch/Kconfig index 81869a5..92fcbd4 100644 --- a/arch/K

[PATCH 03/25] all: s390: move wrapper infrastructure to generic headers

2016-04-05 Thread Yury Norov
it as '#define __SC_WRAP(name) compat_##name'. Signed-off-by: Yury Norov <yno...@caviumnetworks.com> Acked-by: Heiko Carstens <heiko.carst...@de.ibm.com> --- arch/s390/include/asm/compat.h| 17 +-- arch/s390/kernel/compat_wrapper.c | 51 - i

[PATCH 05/25] all: wrap needed syscalls in generic unistd

2016-04-05 Thread Yury Norov
As generic unistd syscall table is written in C, syscall prototypes declaration is needed. It's added to compat header. Signed-off-by: Yury Norov <yno...@caviumnetworks.com> Acked-by: Heiko Carstens <heiko.carst...@de.ibm.com> --- include/linux/compat.h

Re: [PATCH 24/25] arm64:ilp32: add vdso-ilp32 and use for signal return

2016-04-13 Thread Yury Norov
this must be built first to generate the symbol offsets > +ifeq ($(CONFIG_ARM64_ILP32),y) > $(call objectify,$(arm64-obj-y)): $(obj)/vdso-ilp32/vdso-ilp32-offsets.h > $(obj)/vdso-ilp32/vdso-ilp32-offsets.h: $(obj)/vdso-ilp32 > +endif > -- > 1.8.4.5 > > On 2016/4/6 6:08, Yu

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) > > */ >

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/entr

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 @@ > > * alon

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 >

[PATCH 22/23] arm64:ilp32: add vdso-ilp32 and use for signal return

2016-05-23 Thread Yury Norov
christoph.muell...@theobroma-systems.com> Signed-off-by: Yury Norov <yno...@caviumnetworks.com> --- arch/arm64/include/asm/vdso.h | 6 ++ arch/arm64/kernel/Makefile| 7 ++ arch/arm64/kernel/asm-offsets.c | 7 ++ arch/arm64/kernel/signal.c

[PATCH 05/23] all: wrap needed syscalls in generic unistd

2016-05-23 Thread Yury Norov
As generic unistd syscall table is written in C, syscall prototypes declaration is needed. It's added to compat header. Signed-off-by: Yury Norov <yno...@caviumnetworks.com> --- include/linux/compat.h| 225 + include/uapi/asm-generic/unistd.h

[PATCH 10/23] arm64: rename COMPAT to AARCH32_EL0 in Kconfig

2016-05-23 Thread Yury Norov
tworks.com> Signed-off-by: Philipp Tomsich <philipp.toms...@theobroma-systems.com> Signed-off-by: Christoph Muellner <christoph.muell...@theobroma-systems.com> Signed-off-by: Bamvor Jian Zhang <bamvor.zhangj...@linaro.org> Signed-off-by: Yury Norov <yno...@c

[PATCH 21/23] arm64: ilp32: introduce ilp32-specific handlers for sigframe and ucontext

2016-05-23 Thread Yury Norov
ndrew.pin...@caviumnetworks.com> Signed-off-by: Yury Norov <yno...@caviumnetworks.com> --- arch/arm64/include/asm/signal_ilp32.h | 34 ++ arch/arm64/kernel/Makefile| 3 +- arch/arm64/kernel/entry_ilp32.S | 23 arch/arm64/kernel/signal.c| 3 +

[PATCH 16/23] arm64: ilp32: introduce binfmt_ilp32.c

2016-05-23 Thread Yury Norov
to handle ILP32 binaries Signed-off-by: Yury Norov <yno...@caviumnetworks.com> --- arch/arm64/kernel/Makefile | 1 + arch/arm64/kernel/binfmt_ilp32.c | 91 2 files changed, 92 insertions(+) create mode 100644 arch/arm64/kernel/binfmt_ilp32.c

[PATCH 19/23] arm64: signal: share lp64 signal routines to ilp32

2016-05-23 Thread Yury Norov
After that, it will be possible to reuse it in ilp32. Signed-off-by: Yury Norov <yno...@caviumnetworks.com> --- arch/arm64/include/asm/signal_common.h | 33 arch/arm64/kernel/signal.c | 91 +- 2 files changed, 90 insertions(

[PATCH 20/23] arm64: signal32: move ilp32 and aarch32 common code to separated file

2016-05-23 Thread Yury Norov
Signed-off-by: Yury Norov <yno...@caviumnetworks.com> --- arch/arm64/include/asm/signal32_common.h | 25 +++ arch/arm64/kernel/Makefile | 1 + arch/arm64/kernel/signal32.c | 85 --- arch/arm64/kernel/signal32_common.c

[PATCH 12/23] thread: move thread bits accessors to separated file

2016-05-23 Thread Yury Norov
hould be)" Signed-off-by: Yury Norov <yno...@caviumnetworks.com> --- include/linux/thread_bits.h | 55 + include/linux/thread_info.h | 44 +--- 2 files changed, 56 insertions(+), 43 deletions(-) create mode 1006

[PATCH 06/23] compat ABI: use non-compat openat and open_by_handle_at variants

2016-05-23 Thread Yury Norov
The only difference is that non-compat version forces O_LARGEFILE, and it should be the default behaviour for all architectures, as we don't support 32-bit off_t. The only exception is tile32, that continues with compat version of syscalls. Signed-off-by: Yury Norov <yno...@caviumnetworks.

[PATCH 14/23] arm64: ilp32: add is_ilp32_compat_{task,thread} and TIF_32BIT_AARCH64

2016-05-23 Thread Yury Norov
accordingly. Signed-off-by: Andrew Pinski <andrew.pin...@caviumnetworks.com> Signed-off-by: Philipp Tomsich <philipp.toms...@theobroma-systems.com> Signed-off-by: Christoph Muellner <christoph.muell...@theobroma-systems.com> Signed-off-by: Yury Norov <yno...@caviumnetworks.com>

[PATCH 15/23] arm64: introduce binfmt_elf32.c

2016-05-23 Thread Yury Norov
As we support more than one compat formats, it looks more reasonable to not use fs/compat_binfmt.c. Custom binfmt_elf32.c allows to move aarch32 specific definitions there and make code more maintainable and readable. Signed-off-by: Yury Norov <yno...@caviumnetworks.com> --- arch/arm64/K

[PATCH 09/23] arm64: ensure the kernel is compiled for LP64

2016-05-23 Thread Yury Norov
Pinski <andrew.pin...@caviumnetworks.com> Signed-off-by: Philipp Tomsich <philipp.toms...@theobroma-systems.com> Signed-off-by: Christoph Muellner <christoph.muell...@theobroma-systems.com> Signed-off-by: Yury Norov <yno...@caviumnetworks.com> Reviewed-by: David Daney <dda

[PATCH 08/23] arm64: ilp32: add documentation on the ILP32 ABI for ARM64

2016-05-23 Thread Yury Norov
Based on Andrew Pinski's patch-series. Signed-off-by: Yury Norov <yno...@caviumnetworks.com> --- Documentation/arm64/ilp32.txt | 25 + 1 file changed, 25 insertions(+) create mode 100644 Documentation/arm64/ilp32.txt diff --git a/Documentation/arm64/ilp32

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

2016-05-23 Thread Yury Norov
From: Andrew Pinski <apin...@cavium.com> 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 <andrew.pin...@caviumnetworks.com> Signed-off-by: Yur

[PATCH 03/23] all: s390: move wrapper infrastructure to generic headers

2016-05-23 Thread Yury Norov
it as '#define __SC_WRAP(name) compat_##name'. Signed-off-by: Yury Norov <yno...@caviumnetworks.com> --- arch/s390/include/asm/compat.h| 17 +-- arch/s390/kernel/compat_wrapper.c | 51 - include/linux/compat.h

[PATCH 01/23] all: syscall wrappers: add documentation

2016-05-23 Thread Yury Norov
Signed-off-by: Yury Norov <yno...@caviumnetworks.com> --- Documentation/adding-syscalls.txt | 32 1 file changed, 32 insertions(+) diff --git a/Documentation/adding-syscalls.txt b/Documentation/adding-syscalls.txt index cc2d4ac..d02a6bd

[PATCH 02/23] all: introduce COMPAT_WRAPPER option and enable it for s390

2016-05-23 Thread Yury Norov
Signed-off-by: Yury Norov <yno...@caviumnetworks.com> --- arch/Kconfig | 4 arch/s390/Kconfig | 1 + 2 files changed, 5 insertions(+) diff --git a/arch/Kconfig b/arch/Kconfig index 81869a5..92fcbd4 100644 --- a/arch/Kconfig +++ b/arch/Kconfig @@ -589,6 +589,10 @@

[PATCH v6 00/21] ILP32 for ARM64

2016-05-23 Thread Yury Norov
Yury Norov (15): all: introduce COMPAT_WRAPPER option and enable it for s390 all: s390: move wrapper infrastructure to generic headers all: s390: move compat_wrappers.c from arch/s390/kernel to kernel/ all: wrap needed syscalls in generic unistd compat ABI: use non-compat openat

[PATCH 07/23] 32-bit ABI: introduce ARCH_32BIT_OFF_T config option

2016-05-23 Thread Yury Norov
-bit off_t, and therefore want to limit the file size to 4GB unless specified differently in the open flags. Signed-off-by: Yury Norov <yno...@caviumnetworks.com> --- arch/Kconfig| 4 arch/arc/Kconfig| 1 + arch/arm/Kconfig| 1 + arch/blackfin/Kconfig | 1 +

[PATCH 04/23] all: s390: move compat_wrappers.c from arch/s390/kernel to kernel/

2016-05-23 Thread Yury Norov
Some syscalls are declared conditionally, so corresponding wrappers are conditional accordingly. Signed-off-by: Yury Norov <yno...@caviumnetworks.com> --- arch/s390/kernel/Makefile | 2 +- arch/s390/kernel/compat_linux.c | 4 + arch/s390/kernel/compat_wrapper.c

[PATCH 13/23] arm64: introduce is_a32_task and is_a32_thread (for AArch32 compat)

2016-05-23 Thread Yury Norov
because has already included. It was fixed too. Signed-off-by: Yury Norov <yno...@caviumnetworks.com> Signed-off-by: Philipp Tomsich <philipp.toms...@theobroma-systems.com> Signed-off-by: Christoph Muellner <christoph.muell...@theobroma-systems.com> Signed-off-by: Andrew

Re: [RFC6 PATCH v6 00/21] ILP32 for ARM64

2016-05-12 Thread Yury Norov
On Thu, May 12, 2016 at 03:07:35PM +0100, Catalin Marinas wrote: > On Thu, May 12, 2016 at 04:44:31PM +0300, Yury Norov wrote: > > On Thu, May 12, 2016 at 02:35:34PM +0100, Catalin Marinas wrote: > > > On Thu, May 12, 2016 at 03:20:00AM +0300, 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-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: [RFC6 PATCH v6 00/21] ILP32 for ARM64

2016-05-12 Thread Yury Norov
On Thu, May 12, 2016 at 02:35:34PM +0100, Catalin Marinas wrote: > On Thu, May 12, 2016 at 03:20:00AM +0300, Yury Norov wrote: > > I debugged preadv02 and pwritev02 failures and found very weird bug. > > Test passes {iovec_base = 0x, iovec_len = 64} as one element > >

Re: [RFC6 PATCH v6 00/21] ILP32 for ARM64

2016-05-11 Thread Yury Norov
letely ignore compat mode there. This patch fixes it. It also fixes USER_DS macro to return different values depending on compat. This patch is enough to handle preadv02 and pwritev02, but problem #2 is still there. Signed-off-by: Yury Norov <yno...@caviumnetworks.com> --- arch/arm64/inclu

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-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, > >

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 m

Re: [RFC6 PATCH v6 00/21] ILP32 for ARM64

2016-05-13 Thread Yury Norov
On Fri, May 13, 2016 at 09:28:03AM +, Catalin Marinas wrote: > > The discussion is mainly around whether USER_DS for 32-bit compat apps > should be the same as USER_DS for native 32-bit apps. Even for native > 32-bit kernels, we don't use STACK_TOP as addr_limit. A read/write from >

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: > > &g

Re: [RFC6 PATCH v6 00/21] ILP32 for ARM64

2016-05-12 Thread Yury Norov
On Thu, May 12, 2016 at 11:19:21AM +0200, Arnd Bergmann wrote: > On Thursday 12 May 2016 03:20:00 Yury Norov wrote: > > > > I debugged preadv02 and pwritev02 failures and found very weird bug. > > Test passes {iovec_base = 0x, iovec_len = 64} as one element >

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 24/25] arm64:ilp32: add vdso-ilp32 and use for signal return

2016-05-06 Thread Yury Norov
is too big and bad-structurized, and if I find how to refactor it, I'll incorporate this fix. Signed-off-by: Yury Norov <yno...@caviumnetworks.com> --- arch/arm64/kernel/asm-offsets.c | 7 +++ arch/arm64/kernel/vdso-ilp32/vdso-ilp32.lds.S | 2 +- arch/arm64/kerne

Re: [PATCH 24/25] arm64:ilp32: add vdso-ilp32 and use for signal return

2016-05-04 Thread Yury Norov
On Tue, May 03, 2016 at 08:41:25PM +0800, Zhangjian (Bamvor) wrote: > Hi, all > > After apply this patch with my small testcase, the vsyscall of gettimeofday in > ilp32 works in both big endian and small endian. In this patch, I use the > different register and offset for ilp32 and lp64.

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

  1   2   3   >