[PATCH 04/24] 32-bit userspace ABI: introduce ARCH_32BIT_OFF_T config option

2018-05-16 Thread Yury Norov
All new 32-bit architectures should have 64-bit userspace off_t type, but existing architectures has 32-bit ones. To enforce the rule, new config option is added to arch/Kconfig that defaults ARCH_32BIT_OFF_T to be disabled for new 32-bit architectures. All existing 32-bit architectures enable it

[PATCH 06/24] thread: move thread bits accessors to separated file

2018-05-16 Thread Yury Norov
Thread bits may be accessed from low-level code, so isolating is a measure to avoid circular dependencies in header files. The exact reason for circular dependency is WARN_ON() macro added in patch edd63a27 "set_restore_sigmask() is never called without SIGPENDING (and never should be)"

[PATCH 09/24] arm64: rename functions that reference compat term

2018-05-16 Thread Yury Norov
The ILP32 for ARM64 patch series introduces another 'compat' mode for arm64. So to avoid confusing, aarch32-only functions renamed in according to it. Signed-off-by: Yury Norov --- arch/arm64/include/asm/ptrace.h | 10 ++-- arch/arm64/include/asm/signal32.h|

[PATCH v9 00/24] ILP32 for ARM64

2018-05-16 Thread Yury Norov
This series enables AARCH64 with ILP32 mode. As supporting work, it introduces ARCH_32BIT_OFF_T configuration option that is enabled for existing 32-bit architectures but disabled for new arches (so 64-bit off_t userspace type is used by new userspace). Also it deprecates getrlimit and setrlimit

[PATCH 02/24] ptrace: Add compat PTRACE_{G,S}ETSIGMASK handlers

2018-05-16 Thread Yury Norov
From: James Morse compat_ptrace_request() lacks handlers for PTRACE_{G,S}ETSIGMASK, instead using those in ptrace_request(). The compat variant should read a compat_sigset_t from userspace instead of ptrace_request()s sigset_t. While compat_sigset_t is the same size as

[PATCH 03/24] compat ABI: use non-compat openat and open_by_handle_at variants

2018-05-16 Thread Yury Norov
The only difference between native and compat openat and open_by_handle_at is that non-compat version forces O_LARGEFILE, and it should be the default behaviour for all architectures, as we are going to drop the support of 32-bit userspace off_t. The exception is tile32 that continues with compat

[PATCH 01/24] arm64: signal: Make parse_user_sigframe() independent of rt_sigframe layout

2018-05-16 Thread Yury Norov
From: Dave Martin ILP32 uses the same struct sigcontext as the native ABI (i.e., LP64), but a different layout for the rest of the signal frame (since siginfo_t and ucontext_t are both ABI-dependent). Since the purpose of parse_user_sigframe() is really to parse sigcontext

[PATCH 13/24] arm64: introduce binfmt_elf32.c

2018-05-16 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 --- arch/arm64/Kconfig

[PATCH 08/24] arm64: rename COMPAT to AARCH32_EL0 in Kconfig

2018-05-16 Thread Yury Norov
From: Andrew Pinski In this patchset ILP32 ABI support is added. Additionally to AARCH32, which is binary-compatible with ARM, ILP32 is (mostly) ABI-compatible. >From now, AARCH32_EL0 (former COMPAT) config option means the support of AARCH32 userspace, and ARM64_ILP32 -

[PATCH 07/24] arm64: ilp32: add documentation on the ILP32 ABI for ARM64

2018-05-16 Thread Yury Norov
Based on Andrew Pinski's patch-series. Signed-off-by: Yury Norov --- Documentation/arm64/ilp32.txt | 45 +++ 1 file changed, 45 insertions(+) create mode 100644 Documentation/arm64/ilp32.txt diff --git a/Documentation/arm64/ilp32.txt

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

2018-05-16 Thread Yury Norov
ILP32 needs to mix 32bit struct siginfo and 64bit sigframe for its signal handlers. Move the existing compat code for copying siginfo to user space and manipulating signal masks into signal32_common.c so it can be used to deliver aarch32 and ilp32 signals. Signed-off-by: Yury Norov

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

2018-05-16 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 15/24] arm64: ilp32: introduce binfmt_ilp32.c

2018-05-16 Thread Yury Norov
Like binfmt_elf32.c for AARCH32, binfmt_ilp32.c is needed to handle ILP32 binaries. Signed-off-by: Yury Norov Signed-off-by: Bamvor Jian Zhang --- arch/arm64/kernel/Makefile | 1 + arch/arm64/kernel/binfmt_ilp32.c | 87

[PATCH 20/24] arm64: ilp32: introduce ilp32-specific sigframe and ucontext

2018-05-16 Thread Yury Norov
From: Yury Norov ILP32 uses AARCH32 compat structures and syscall handlers for signals. But ILP32 rt_sigframe and ucontext structures differ from both LP64 and AARCH32. >From software point of view ILP32 is typical 32-bit compat ABI, and from hardware point of view,

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

2018-05-16 Thread Yury Norov
ILP32 tasks are needed to be distinguished from LP64 and AARCH32. This patch adds helper functions is_ilp32_compat_{task,thread} and thread flag TIF_32BIT_AARCH64 to address it. This is a preparation for following patches in ILP32 patchset. For consistency, SET_PERSONALITY is changed here

[PATCH 10/24] arm64: uapi: set __BITS_PER_LONG correctly for ILP32 and LP64

2018-05-16 Thread Yury Norov
From: Andrew Pinski Define __BITS_PER_LONG depending on the ABI used (i.e. check whether __ILP32__ or __LP64__ is defined). This is necessary for glibc to determine the appropriate type definitions for the system call interface. Signed-off-by: Andrew Pinski

[PATCH 11/24] arm64: introduce is_a32_task and is_a32_thread (for AArch32 compat)

2018-05-16 Thread Yury Norov
Based on patch of Andrew Pinski. This patch introduces is_a32_compat_task and is_a32_thread so it is easier to say this is a a32 specific thread or a generic compat thread/task. Corresponding functions are located in to avoid mess in headers. Some files include both and , and this is wrong

[PATCH 14/24] arm64: change compat_elf_hwcap and compat_elf_hwcap2 prefix to a32

2018-05-16 Thread Yury Norov
ILP32 patch series introduces new type of binaries which is also compat. So rename existung aarch32 compat_elf_hwcap's helps to avoid confusing. Signed-off-by: Yury Norov --- arch/arm64/include/asm/hwcap.h | 2 +- arch/arm64/kernel/binfmt_elf32.c | 4 ++--

[PATCH 18/24] arm64: signal: share lp64 signal structures and routines to ilp32

2018-05-16 Thread Yury Norov
Following patches of the series introduce ILP32-specific structures and handlers for signal subsystem. In this patch, functions and structures that common for LP64 and ILP32 are moved to arch/arm64/include/asm/signal_common.h to let ILP32 code reuse them. Some functions work with struct

[PATCH 23/24] arm64:ilp32: add ARM64_ILP32 to Kconfig

2018-05-16 Thread Yury Norov
From: Andrew Pinski This patch adds the config option for ILP32. Signed-off-by: Andrew Pinski Signed-off-by: Philipp Tomsich Signed-off-by: Christoph Muellner

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

2018-05-16 Thread Yury Norov
From: Philipp Tomsich ILP32 VDSO exports following symbols: __kernel_rt_sigreturn; __kernel_gettimeofday; __kernel_clock_gettime; __kernel_clock_getres. What shared object to use, kernel selects depending on result of is_ilp32_compat_task() in

[PATCH 24/24] arm64: ilp32: Make the Kconfig option default y

2018-05-16 Thread Yury Norov
From: Catalin Marinas The intention of the ILP32 branches is to enable ILP32 by default. This default is to be revisited for upstream merging. Signed-off-by: Catalin Marinas Signed-off-by: Yury Norov ---

[PATCH 21/24] arm64: ptrace: handle ptrace_request differently for aarch32 and ilp32

2018-05-16 Thread Yury Norov
ILP32 has context-related structures different from both aarch32 and aarch64/lp64. In this patch compat_arch_ptrace() renamed to compat_a32_ptrace(), and compat_arch_ptrace() only makes choice between compat_a32_ptrace() and new compat_ilp32_ptrace() handler. compat_ilp32_ptrace() calls generic

[PATCH] Documentation: gpio: driver: Fix a typo and some odd grammar

2018-05-16 Thread Jonathan Neuschäfer
Signed-off-by: Jonathan Neuschäfer --- Documentation/driver-api/gpio/driver.rst | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/Documentation/driver-api/gpio/driver.rst b/Documentation/driver-api/gpio/driver.rst index 505ee906d7d9..cbe0242842d1

[PATCH 16/24] arm64: ilp32: share aarch32 syscall handlers

2018-05-16 Thread Yury Norov
According to userspace/kernel ABI, userspace 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 --- arch/arm64/kernel/Makefile | 1 +

Re: [PATCH v2] coresight: documentation: update sysfs section

2018-05-16 Thread Kim Phillips
On Wed, 16 May 2018 13:18:23 -0600 Jonathan Corbet wrote: > On Mon, 14 May 2018 12:19:59 -0500 > Kim Phillips wrote: > > > - Align and show updated ls devices output from the TC2, based on > > current driver > > > > - Provide an example from an ETMv4

Re: [PATCH] Documentation: gpio: driver: Fix a typo and some odd grammar

2018-05-16 Thread Jonathan Corbet
On Wed, 16 May 2018 14:08:00 +0200 Jonathan Neuschäfer wrote: > Signed-off-by: Jonathan Neuschäfer Applied, thanks. jon -- To unsubscribe from this list: send the line "unsubscribe linux-doc" in the body of a message to majord...@vger.kernel.org

Re: [PATCH v2] coresight: documentation: update sysfs section

2018-05-16 Thread Jonathan Corbet
On Mon, 14 May 2018 12:19:59 -0500 Kim Phillips wrote: > - Align and show updated ls devices output from the TC2, based on > current driver > > - Provide an example from an ETMv4 based system (Juno) > > - Reflect changes to the way the RAM write pointer is accessed