Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux
1
fork

Configure Feed

Select the types of activity you want to include in your feed.

open*(2) compat fixes (s390, arm64)

The usual rules for open()/openat()/open_by_handle_at() are
1) native 32bit - don't force O_LARGEFILE in flags
2) native 64bit - force O_LARGEFILE in flags
3) compat on 64bit host - as for native 32bit
4) native 32bit ABI for 64bit system (mips/n32, x86/x32) - as for
native 64bit

There are only two exceptions - s390 compat has open() forcing
O_LARGEFILE and arm64 compat has open_by_handle_at() doing the same
thing. The same binaries on native host (s390/31 and arm resp.) will
*not* force O_LARGEFILE, so IMO both are emulation bugs.

Objections? The fix is obvious...

Signed-off-by: Al Viro <viro@zeniv.linux.org.uk>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>

authored by

Al Viro and committed by
Linus Torvalds
9d73fc2d 3c46f3d6

+2 -2
+1 -1
arch/arm64/include/asm/unistd32.h
··· 392 392 __SYSCALL(368, compat_sys_fanotify_mark_wrapper) 393 393 __SYSCALL(369, sys_prlimit64) 394 394 __SYSCALL(370, sys_name_to_handle_at) 395 - __SYSCALL(371, sys_open_by_handle_at) 395 + __SYSCALL(371, compat_sys_open_by_handle_at) 396 396 __SYSCALL(372, sys_clock_adjtime) 397 397 __SYSCALL(373, sys_syncfs) 398 398
+1 -1
arch/s390/kernel/compat_wrapper.S
··· 28 28 llgtr %r2,%r2 # const char * 29 29 lgfr %r3,%r3 # int 30 30 lgfr %r4,%r4 # int 31 - jg sys_open # branch to system call 31 + jg compat_sys_open # branch to system call 32 32 33 33 ENTRY(sys32_close_wrapper) 34 34 llgfr %r2,%r2 # unsigned int