Skip to contentSkip to conversation

generic syscalls: Wire up statx syscall

PATCH In review Stafford Horne 4 participants 5 messages Mar 13, 2017 – Mar 20, 2017 Generic include/asm header files

lore
Share & tools
lore
#0 lore raw

PATCH v2 1/1 generic syscalls: Wire up statx syscall

The new syscall statx is implemented as generic code, so enable it for architectures like openrisc which use the generic syscall table.

Fixes a528d35e8bfcc ("statx: Add a system call to make enhanced file info available")
Cc Thomas Gleixner <[email protected]>
Cc Al Viro <[email protected]>
Cc David Howells <[email protected]>
Cc Catalin Marinas <[email protected]>
Cc Will Deacon <[email protected]>

---
Change in v2:
- Add a few more Cc's to get attention of the right people
- Add a fixes tag for better audit

 include/uapi/asm-generic/unistd.h | 4 +++-
 1 file changed, 3 insertions(+), 1 deletion(-)
include/uapi/asm-generic/unistd.h +3 -1
index 9b1462e..a076cf1 100644
@@ -730,9 +730,11 @@ __SYSCALL(__NR_pkey_mprotect, sys_pkey_mprotect)
 __SYSCALL(__NR_pkey_alloc,    sys_pkey_alloc)
 #define __NR_pkey_free 290
 __SYSCALL(__NR_pkey_free,     sys_pkey_free)
+#define __NR_statx 291
+__SYSCALL(__NR_statx,     sys_statx)
 
 #undef __NR_syscalls
-#define __NR_syscalls 291
+#define __NR_syscalls 292
 
 /*
  * All syscalls below here should go away really,
Signature · 1 line
2.9.3
#1 lore raw
Quoted 24 lines · Stafford Horne

The new syscall statx is implemented as generic code, so enable it for architectures like openrisc which use the generic syscall table.

Fixes a528d35e8bfcc ("statx: Add a system call to make enhanced file info available")
Cc Thomas Gleixner <[email protected]>
Cc Al Viro <[email protected]>
Cc David Howells <[email protected]>
Cc Catalin Marinas <[email protected]>
Cc Will Deacon <[email protected]>

---
Change in v2:
- Add a few more Cc's to get attention of the right people
- Add a fixes tag for better audit

 include/uapi/asm-generic/unistd.h | 4 +++-
 1 file changed, 3 insertions(+), 1 deletion(-)
include/uapi/asm-generic/unistd.h +0 -0
index 9b1462e..a076cf1 100644

include/uapi/asm-generic/unistd.h __SYSCALL(__NR_pkey_mprotect, sys_pkey_mprotect) · line 737

Quoted 9 lines
include/uapi/asm-generic/unistd.h +3 -1
@@ -730,9 +730,11 @@ __SYSCALL(__NR_pkey_mprotect, sys_pkey_mprotect)
 __SYSCALL(__NR_pkey_alloc,    sys_pkey_alloc)
 #define __NR_pkey_free 290
 __SYSCALL(__NR_pkey_free,     sys_pkey_free)
+#define __NR_statx 291
+__SYSCALL(__NR_statx,     sys_statx)
 
 #undef __NR_syscalls
-#define __NR_syscalls 291
+#define __NR_syscalls 292

Out of interest, anybody know OTOH which other stat syscalls statx supersedes (such that they could at some point be disabled by default in asm-generic for new arches, and implemented in userspace)?

Cheers

Signature · 1 line
James Hogan
maintainer
#2 lore raw
Quoted 9 lines · James Hogan

include/uapi/asm-generic/unistd.h __SYSCALL(__NR_pkey_mprotect, sys_pkey_mprotect) · line 737

Quoted 3 lines · Stafford Horne

#undef __NR_syscalls

include/uapi/asm-generic/unistd.h +1 -1
-#define __NR_syscalls 291
+#define __NR_syscalls 292

Out of interest, anybody know OTOH which other stat syscalls statx supersedes (such that they could at some point be disabled by default in asm-generic for new arches, and implemented in userspace)?

It should replace the entire stat family {old,new,}{f,}stat{at,}{64,}, but not the {f,}statfs{64,} family, which will eventually get another replacement.

Arnd

#3 lore raw
In reply to Stafford Horne
Quoted 11 lines · Stafford Horne

The new syscall statx is implemented as generic code, so enable it for architectures like openrisc which use the generic syscall table.

Fixes a528d35e8bfcc ("statx: Add a system call to make enhanced file info available")
Cc Thomas Gleixner <[email protected]>
Cc Al Viro <[email protected]>
Cc David Howells <[email protected]>
Cc Catalin Marinas <[email protected]>
Cc Will Deacon <[email protected]>
Quoted 7 lines

---
Change in v2:
- Add a few more Cc's to get attention of the right people
- Add a fixes tag for better audit

 include/uapi/asm-generic/unistd.h | 4 +++-
 1 file changed, 3 insertions(+), 1 deletion(-)

As suggested by Arnd, I'll pick this up via arm64 for 4.11. I was on holiday last week, so sorry for the delay.

Thanks,

Will

#4 lore raw
Quoted 17 lines · Will Deacon
Quoted 16 lines · Stafford Horne

The new syscall statx is implemented as generic code, so enable it for architectures like openrisc which use the generic syscall table.

Fixes a528d35e8bfcc ("statx: Add a system call to make enhanced file info available")
Cc Thomas Gleixner <[email protected]>
Cc Al Viro <[email protected]>
Cc David Howells <[email protected]>
Cc Catalin Marinas <[email protected]>
Cc Will Deacon <[email protected]>

---
Change in v2:
- Add a few more Cc's to get attention of the right people
- Add a fixes tag for better audit

Quoted 5 lines
Quoted 2 lines
 include/uapi/asm-generic/unistd.h | 4 +++-
 1 file changed, 3 insertions(+), 1 deletion(-)

As suggested by Arnd, I'll pick this up via arm64 for 4.11. I was on holiday last week, so sorry for the delay.

Thanks, I talked to Masami as well, and he told me that might be the case.

-Stafford

Quoted 3 lines

Thanks,

Will