Re: [PATCH v2 08/29] m68k: assign syscall number for seccomp

2019-01-21 Thread Geert Uytterhoeven
On Fri, Jan 18, 2019 at 5:20 PM Arnd Bergmann wrote: > Most architectures have assigned a numbers for the seccomp syscall > even when they do not implement it. > > m68k is an exception here, so for consistency lets add the number. > Unless CONFIG_SECCOMP is implemented, the system call just >

Re: [PATCH v2 13/29] arch: add split IPC system calls where needed

2019-01-21 Thread Geert Uytterhoeven
On Fri, Jan 18, 2019 at 5:20 PM Arnd Bergmann wrote: > The IPC system call handling is highly inconsistent across architectures, > some use sys_ipc, some use separate calls, and some use both. We also > have some architectures that require passing IPC_64 in the flags, and > others that set it

Re: [PATCH v2 28/29] y2038: rename old time and utime syscalls

2019-01-21 Thread Geert Uytterhoeven
On Fri, Jan 18, 2019 at 5:21 PM Arnd Bergmann wrote: > The time, stime, utime, utimes, and futimesat system calls are only > used on older architectures, and we do not provide y2038 safe variants > of them, as they are replaced by clock_gettime64, clock_settime64, > and utimensat_time64. > >

Re: [PATCH v2 26/29] y2038: use time32 syscall names on 32-bit

2019-01-21 Thread Geert Uytterhoeven
On Fri, Jan 18, 2019 at 5:21 PM Arnd Bergmann wrote: > This is the big flip, where all 32-bit architectures set COMPAT_32BIT_TIME > abd use the _time32 system calls from the former compat layer instead > of the system calls that take __kernel_timespec and similar arguments. > > The temporary

Re: [PATCH v2 14/29] arch: add pkey and rseq syscall numbers everywhere

2019-01-21 Thread Geert Uytterhoeven
On Fri, Jan 18, 2019 at 5:20 PM Arnd Bergmann wrote: > Most architectures define system call numbers for the rseq and pkey system > calls, even when they don't support the features, and perhaps never will. > > Only a few architectures are missing these, so just define them anyway > for

Re: [PATCH v2 29/29] y2038: add 64-bit time_t syscalls to all 32-bit architectures

2019-01-21 Thread Geert Uytterhoeven
On Fri, Jan 18, 2019 at 5:25 PM Arnd Bergmann wrote: > This adds 21 new system calls on each ABI that has 32-bit time_t > today. All of these have the exact same semantics as their existing > counterparts, and the new ones all have macro names that end in 'time64' > for clarification. > > This

Re: [PATCH v4 3/3] fs: let filldir_t return bool instead of an error code

2019-01-21 Thread Dave Chinner
On Fri, Jan 18, 2019 at 05:14:40PM +0100, Jann Horn wrote: > As Al Viro pointed out, many filldir_t functions return error codes, but > all callers of filldir_t functions just check whether the return value is > non-zero (to determine whether to continue reading the directory); more > precise

Re: [PATCH v2 13/29] arch: add split IPC system calls where needed

2019-01-21 Thread Heiko Carstens
On Fri, Jan 18, 2019 at 05:18:19PM +0100, Arnd Bergmann wrote: > The IPC system call handling is highly inconsistent across architectures, > some use sys_ipc, some use separate calls, and some use both. We also > have some architectures that require passing IPC_64 in the flags, and > others that

Re: [PATCH v2 17/29] syscalls: remove obsolete __IGNORE_ macros

2019-01-21 Thread Heiko Carstens
On Fri, Jan 18, 2019 at 05:18:23PM +0100, Arnd Bergmann wrote: > These are all for ignoring the lack of obsolete system calls, > which have been marked the same way in scripts/checksyscall.sh, > so these can be removed. > > Signed-off-by: Arnd Bergmann > --- > arch/mips/include/asm/unistd.h |

Re: [PATCH v2 14/29] arch: add pkey and rseq syscall numbers everywhere

2019-01-21 Thread Heiko Carstens
On Fri, Jan 18, 2019 at 05:18:20PM +0100, Arnd Bergmann wrote: > Most architectures define system call numbers for the rseq and pkey system > calls, even when they don't support the features, and perhaps never will. > > Only a few architectures are missing these, so just define them anyway > for

Re: [PATCH v2 29/29] y2038: add 64-bit time_t syscalls to all 32-bit architectures

2019-01-21 Thread Heiko Carstens
On Fri, Jan 18, 2019 at 05:18:35PM +0100, Arnd Bergmann wrote: > This adds 21 new system calls on each ABI that has 32-bit time_t > today. All of these have the exact same semantics as their existing > counterparts, and the new ones all have macro names that end in 'time64' > for clarification. >

Re: [PATCH v2 28/29] y2038: rename old time and utime syscalls

2019-01-21 Thread Heiko Carstens
On Fri, Jan 18, 2019 at 05:18:34PM +0100, Arnd Bergmann wrote: > The time, stime, utime, utimes, and futimesat system calls are only > used on older architectures, and we do not provide y2038 safe variants > of them, as they are replaced by clock_gettime64, clock_settime64, > and utimensat_time64.

Re: [PATCH v4 3/3] fs: let filldir_t return bool instead of an error code

2019-01-21 Thread Jann Horn
On Sun, Jan 20, 2019 at 11:41 PM Dave Chinner wrote: > On Fri, Jan 18, 2019 at 05:14:40PM +0100, Jann Horn wrote: > > As Al Viro pointed out, many filldir_t functions return error codes, but > > all callers of filldir_t functions just check whether the return value is > > non-zero (to determine

followup: [FTBFS] kernel 4.18-rc7 bitsperlong.h issue on alpha

2019-01-21 Thread Bob Tracy
July 30, 2018 I reported the following to linux-kernel, linux-alpha, etc.: On an alpha system, got the following build error on the 4.18-rc7 mainline kernel source tree: HOSTCC net/bpfilter/main.o In file included from tools/include/uapi/asm/bitsperlong.h:17, from

Re: [PATCH v2 29/29] y2038: add 64-bit time_t syscalls to all 32-bit architectures

2019-01-21 Thread Arnd Bergmann
On Fri, Jan 18, 2019 at 5:25 PM Arnd Bergmann wrote: > > This adds 21 new system calls on each ABI that has 32-bit time_t > today. All of these have the exact same semantics as their existing > counterparts, and the new ones all have macro names that end in 'time64' > for clarification. > > This

Re: [PATCH v2 29/29] y2038: add 64-bit time_t syscalls to all 32-bit architectures

2019-01-21 Thread Arnd Bergmann
On Mon, Jan 21, 2019 at 9:19 AM Geert Uytterhoeven wrote: > On Sat, Jan 19, 2019 at 3:29 PM Russell King - ARM Linux admin > wrote: > > On Fri, Jan 18, 2019 at 11:53:25AM -0800, Andy Lutomirski wrote: > > > On Fri, Jan 18, 2019 at 11:33 AM Arnd Bergmann wrote: > > > > On Fri, Jan 18, 2019 at

Re: [PATCH v2 29/29] y2038: add 64-bit time_t syscalls to all 32-bit architectures

2019-01-21 Thread Arnd Bergmann
On Mon, Jan 21, 2019 at 6:08 PM Arnd Bergmann wrote: > On Mon, Jan 21, 2019 at 9:19 AM Geert Uytterhoeven > wrote: > > Regardless, I'm wondering what to do with the holes marked "room for > > arch specific calls". > > When is a syscall really arch-specific, and can it be added there, and > >

Re: [PATCH v2 14/29] arch: add pkey and rseq syscall numbers everywhere

2019-01-21 Thread Arnd Bergmann
On Mon, Jan 21, 2019 at 9:56 AM Geert Uytterhoeven wrote: > > Note that all architectures that already define pkey syscalls, list > pkey_mprotect first. It's easy enough to change, so I've reordered them for consistency now. > Regardless, for m68k: > Acked-by: Geert Uytterhoeven Thanks,

Re: [PATCH v2 19/21] treewide: add checks for the return value of memblock_alloc*()

2019-01-21 Thread Rob Herring
On Mon, Jan 21, 2019 at 10:04:06AM +0200, Mike Rapoport wrote: > Add check for the return value of memblock_alloc*() functions and call > panic() in case of error. > The panic message repeats the one used by panicing memblock allocators with > adjustment of parameters to include only relevant

[PATCH] 4.18-rc7 on alpha: bitsperlong issue

2019-01-21 Thread Bob Tracy
Apologies for what is essentially a repost with a proper subject header in the sense of trying to get the attention of people who collect/approve patches for submission upstream. See my posting from earlier today (followup: [FTBFS] kernel 4.18-rc7 bitsperlong.h issue on alpha) for the back story.

Re: [PATCH v4 1/3] fs: hoist EFSCORRUPTED definition into uapi header

2019-01-21 Thread Theodore Y. Ts'o
On Mon, Jan 21, 2019 at 03:51:58PM -0800, Darrick J. Wong wrote: > > I disagree with upending 13 years of established precedent for user > visible behavior. We possibly could've pulled this off ten years ago, > but it's wy too late now. Too much work, too little gain. I remember the

Re: [PATCH v4 1/3] fs: hoist EFSCORRUPTED definition into uapi header

2019-01-21 Thread Theodore Y. Ts'o
On Fri, Jan 18, 2019 at 05:14:38PM +0100, Jann Horn wrote: > Multiple filesystems can already return EFSCORRUPTED errors to userspace; > however, so far, definitions of EFSCORRUPTED were in filesystem-private > headers. > > I wanted to use EUCLEAN to indicate data corruption in the VFS layer; >

Re: [PATCH v4 3/3] fs: let filldir_t return bool instead of an error code

2019-01-21 Thread Dave Chinner
On Mon, Jan 21, 2019 at 04:49:45PM +0100, Jann Horn wrote: > On Sun, Jan 20, 2019 at 11:41 PM Dave Chinner wrote: > > On Fri, Jan 18, 2019 at 05:14:40PM +0100, Jann Horn wrote: > > > As Al Viro pointed out, many filldir_t functions return error codes, but > > > all callers of filldir_t functions

Re: [PATCH v4 1/3] fs: hoist EFSCORRUPTED definition into uapi header

2019-01-21 Thread David Sterba
On Mon, Jan 21, 2019 at 04:54:54PM -0500, Theodore Y. Ts'o wrote: > On Fri, Jan 18, 2019 at 05:14:38PM +0100, Jann Horn wrote: > > Multiple filesystems can already return EFSCORRUPTED errors to userspace; > > however, so far, definitions of EFSCORRUPTED were in filesystem-private > > headers. > >

Re: [PATCH v4 1/3] fs: hoist EFSCORRUPTED definition into uapi header

2019-01-21 Thread Dave Chinner
On Mon, Jan 21, 2019 at 04:54:54PM -0500, Theodore Y. Ts'o wrote: > On Fri, Jan 18, 2019 at 05:14:38PM +0100, Jann Horn wrote: > > Multiple filesystems can already return EFSCORRUPTED errors to userspace; > > however, so far, definitions of EFSCORRUPTED were in filesystem-private > > headers. > >

Re: [PATCH v4 1/3] fs: hoist EFSCORRUPTED definition into uapi header

2019-01-21 Thread Darrick J. Wong
On Mon, Jan 21, 2019 at 04:54:54PM -0500, Theodore Y. Ts'o wrote: > On Fri, Jan 18, 2019 at 05:14:38PM +0100, Jann Horn wrote: > > Multiple filesystems can already return EFSCORRUPTED errors to userspace; > > however, so far, definitions of EFSCORRUPTED were in filesystem-private > > headers. > >

Re: [PATCH] 4.18-rc7 on alpha: bitsperlong issue

2019-01-21 Thread Matt Turner
On Mon, Jan 21, 2019 at 1:42 PM Bob Tracy wrote: > > Apologies for what is essentially a repost with a proper subject header > in the sense of trying to get the attention of people who collect/approve > patches for submission upstream. See my posting from earlier today > (followup: [FTBFS]

Re: [PATCH v2] alpha: fix page fault handling for r16-r18 targets

2019-01-21 Thread Matt Turner
On Mon, Dec 31, 2018 at 3:54 AM Sergei Trofimovich wrote: > > Fix page fault handling code to fixup r16-r18 registers. > Before the patch code had off-by-two registers bug. > This bug caused overwriting of ps,pc,gp registers instead > of fixing intended r16,r17,r18 (see `struct pt_regs`). > >

[PATCH v2 01/21] openrisc: prefer memblock APIs returning virtual address

2019-01-21 Thread Mike Rapoport
The allocation of the page tables memory in openrics uses memblock_phys_alloc() and then converts the returned physical address to virtual one. Use memblock_alloc_raw() and add a panic() if the allocation fails. Signed-off-by: Mike Rapoport --- arch/openrisc/mm/init.c | 5 - 1 file changed,

[PATCH v2 19/21] treewide: add checks for the return value of memblock_alloc*()

2019-01-21 Thread Mike Rapoport
Add check for the return value of memblock_alloc*() functions and call panic() in case of error. The panic message repeats the one used by panicing memblock allocators with adjustment of parameters to include only relevant ones. The replacement was mostly automated with semantic patches like the

[PATCH v2 17/21] init/main: add checks for the return value of memblock_alloc*()

2019-01-21 Thread Mike Rapoport
Add panic() calls if memblock_alloc() returns NULL. The panic() format duplicates the one used by memblock itself and in order to avoid explosion with long parameters list replace open coded allocation size calculations with a local variable. Signed-off-by: Mike Rapoport --- init/main.c | 26

[PATCH v2 05/21] memblock: emphasize that memblock_alloc_range() returns a physical address

2019-01-21 Thread Mike Rapoport
Rename memblock_alloc_range() to memblock_phys_alloc_range() to emphasize that it returns a physical address. While on it, remove the 'enum memblock_flags' parameter from this function as its only user anyway sets it to MEMBLOCK_NONE, which is the default for the most of memblock allocations.

[PATCH v2 21/21] memblock: drop memblock_alloc_*_nopanic() variants

2019-01-21 Thread Mike Rapoport
As all the memblock allocation functions return NULL in case of error rather than panic(), the duplicates with _nopanic suffix can be removed. Signed-off-by: Mike Rapoport Acked-by: Greg Kroah-Hartman --- arch/arc/kernel/unwind.c | 3 +-- arch/sh/mm/init.c | 2 +-

[PATCH v2 18/21] swiotlb: add checks for the return value of memblock_alloc*()

2019-01-21 Thread Mike Rapoport
Add panic() calls if memblock_alloc() returns NULL. The panic() format duplicates the one used by memblock itself and in order to avoid explosion with long parameters list replace open coded allocation size calculations with a local variable. Signed-off-by: Mike Rapoport ---

[PATCH v2 09/21] memblock: drop memblock_alloc_base()

2019-01-21 Thread Mike Rapoport
The memblock_alloc_base() function tries to allocate a memory up to the limit specified by its max_addr parameter and panics if the allocation fails. Replace its usage with memblock_phys_alloc_range() and make the callers check the return value and panic in case of error. Signed-off-by: Mike

[PATCH v2 15/21] sparc: add checks for the return value of memblock_alloc*()

2019-01-21 Thread Mike Rapoport
Add panic() calls if memblock_alloc*() returns NULL. Most of the changes are simply addition of if(!ptr) panic(); statements after the calls to memblock_alloc*() variants. Exceptions are pcpu_populate_pte() and kernel_map_range() that were slightly refactored to

[PATCH v2 16/21] mm/percpu: add checks for the return value of memblock_alloc*()

2019-01-21 Thread Mike Rapoport
Add panic() calls if memblock_alloc() returns NULL. The panic() format duplicates the one used by memblock itself and in order to avoid explosion with long parameters list replace open coded allocation size calculations with a local variable. Signed-off-by: Mike Rapoport --- mm/percpu.c | 73

[PATCH v2 20/21] memblock: memblock_alloc_try_nid: don't panic

2019-01-21 Thread Mike Rapoport
As all the memblock_alloc*() users are now checking the return value and panic() in case of error, the panic() call can be removed from the core memblock allocator, namely memblock_alloc_try_nid(). Signed-off-by: Mike Rapoport --- mm/memblock.c | 15 +-- 1 file changed, 5

[PATCH v2 03/21] memblock: replace memblock_alloc_base(ANYWHERE) with memblock_phys_alloc

2019-01-21 Thread Mike Rapoport
The calls to memblock_alloc_base(size, align, MEMBLOCK_ALLOC_ANYWHERE) and memblock_phys_alloc(size, align) are equivalent as both try to allocate 'size' bytes with 'align' alignment anywhere in the memory and panic if hte allocation fails. The conversion is done using the following semantic

[PATCH v2 14/21] ia64: add checks for the return value of memblock_alloc*()

2019-01-21 Thread Mike Rapoport
Add panic() calls if memblock_alloc*() returns NULL. Most of the changes are simply addition of if(!ptr) panic(); statements after the calls to memblock_alloc*() variants. Exceptions are create_mem_map_page_table() and ia64_log_init() that were slightly refactored to

Re: [PATCH v2 26/29] y2038: use time32 syscall names on 32-bit

2019-01-21 Thread Geert Uytterhoeven
Hi Arnd, On Fri, Jan 18, 2019 at 5:21 PM Arnd Bergmann wrote: > This is the big flip, where all 32-bit architectures set COMPAT_32BIT_TIME > abd use the _time32 system calls from the former compat layer instead and > of the system calls that take __kernel_timespec and similar arguments.

[PATCH v2 12/21] arch: use memblock_alloc() instead of memblock_alloc_from(size, align, 0)

2019-01-21 Thread Mike Rapoport
The last parameter of memblock_alloc_from() is the lower limit for the memory allocation. When it is 0, the call is equivalent to memblock_alloc(). Signed-off-by: Mike Rapoport Acked-by: Paul Burton # MIPS part --- arch/alpha/kernel/core_cia.c | 2 +- arch/alpha/kernel/pci_iommu.c | 4 ++--

[PATCH v2 13/21] arch: don't memset(0) memory returned by memblock_alloc()

2019-01-21 Thread Mike Rapoport
memblock_alloc() already clears the allocated memory, no point in doing it twice. Signed-off-by: Mike Rapoport Acked-by: Geert Uytterhoeven # m68k --- arch/c6x/mm/init.c | 1 - arch/h8300/mm/init.c| 1 - arch/ia64/kernel/mca.c | 2 -- arch/m68k/mm/mcfmmu.c | 1 -

[PATCH v2 08/21] memblock: drop __memblock_alloc_base()

2019-01-21 Thread Mike Rapoport
The __memblock_alloc_base() function tries to allocate a memory up to the limit specified by its max_addr parameter. Depending on the value of this parameter, the __memblock_alloc_base() can is replaced with the appropriate memblock_phys_alloc*() variant. Signed-off-by: Mike Rapoport Acked-by:

[PATCH v2 07/21] memblock: memblock_phys_alloc(): don't panic

2019-01-21 Thread Mike Rapoport
Make the memblock_phys_alloc() function an inline wrapper for memblock_phys_alloc_range() and update the memblock_phys_alloc() callers to check the returned value and panic in case of error. Signed-off-by: Mike Rapoport --- arch/arm/mm/init.c | 4 arch/arm64/mm/mmu.c

[PATCH v2 11/21] memblock: make memblock_find_in_range_node() and choose_memblock_flags() static

2019-01-21 Thread Mike Rapoport
These functions are not used outside memblock. Make them static. Signed-off-by: Mike Rapoport --- include/linux/memblock.h | 4 mm/memblock.c| 4 ++-- 2 files changed, 2 insertions(+), 6 deletions(-) diff --git a/include/linux/memblock.h b/include/linux/memblock.h index

[PATCH v2 00/21] Refine memblock API

2019-01-21 Thread Mike Rapoport
Hi, Current memblock API is quite extensive and, which is more annoying, duplicated. Except the low-level functions that allow searching for a free memory region and marking it as reserved, memblock provides three (well, two and a half) sets of functions to allocate memory. There are several

[PATCH v2 04/21] memblock: drop memblock_alloc_base_nid()

2019-01-21 Thread Mike Rapoport
The memblock_alloc_base_nid() is a oneliner wrapper for memblock_alloc_range_nid() without any side effect. Replace it's usage by the direct calls to memblock_alloc_range_nid(). Signed-off-by: Mike Rapoport --- include/linux/memblock.h | 3 --- mm/memblock.c| 15 --- 2

[PATCH v2 10/21] memblock: refactor internal allocation functions

2019-01-21 Thread Mike Rapoport
Currently, memblock has several internal functions with overlapping functionality. They all call memblock_find_in_range_node() to find free memory and then reserve the allocated range and mark it with kmemleak. However, there is difference in the allocation constraints and in fallback strategies.

[PATCH v2 06/21] memblock: memblock_phys_alloc_try_nid(): don't panic

2019-01-21 Thread Mike Rapoport
The memblock_phys_alloc_try_nid() function tries to allocate memory from the requested node and then falls back to allocation from any node in the system. The memblock_alloc_base() fallback used by this function panics if the allocation fails. Replace the memblock_alloc_base() fallback with the

Re: [PATCH v2 29/29] y2038: add 64-bit time_t syscalls to all 32-bit architectures

2019-01-21 Thread Geert Uytterhoeven
Hi Russell, On Sat, Jan 19, 2019 at 3:29 PM Russell King - ARM Linux admin wrote: > On Fri, Jan 18, 2019 at 11:53:25AM -0800, Andy Lutomirski wrote: > > On Fri, Jan 18, 2019 at 11:33 AM Arnd Bergmann wrote: > > > On Fri, Jan 18, 2019 at 7:50 PM Andy Lutomirski wrote: > > > > On Fri, Jan 18,