prototypes for *at functions & typo fix
PATCH 1/1 prototypes for *at functions & typo fix
Here's the follow-up patch which introduces the prototypes for the new syscalls. There was also a typo in one of the new symbols. Do we really need the __NR_ia32_* macros? The userlevel on x86-64 should be bi-arch and provide the native ia32 unistd.h.
include/asm-x86_64/ia32_unistd.h +1 -1
@@ -300,7 +300,7 @@#define __NR_ia32_inotify_add_watch 292#define __NR_ia32_inotify_rm_watch 293#define __NR_ia32_migrate_pages 294 -#define __NR_ia32_opanat 295 +#define __NR_ia32_openat 295#define __NR_ia32_mkdirat 296#define __NR_ia32_mknodat 297#define __NR_ia32_fchownat 298
include/linux/syscalls.h +31 -0
@@ -534,4 +534,35 @@ asmlinkage long sys_spu_run(int fd, __u3asmlinkage long sys_spu_create (const char __user *name,unsigned int flags,mode_t mode); +asmlinkage long sys_mknodat (int dfd,const char __user * filename,int mode, +unsigned dev); +asmlinkage long sys_mkdirat (int dfd,const char __user * pathname,int mode); +asmlinkage long sys_unlinkat (int dfd,const char __user * pathname,int flag); +asmlinkage long sys_symlinkat (const char __user * oldname, +int newdfd,const char __user * newname); +asmlinkage long sys_linkat (int olddfd,const char __user *oldname, +int newdfd,const char __user *newname); +asmlinkage long sys_renameat (int olddfd,const char __user * oldname, +int newdfd,const char __user * newname); +asmlinkage long sys_futimesat (int dfd,char __user *filename, +struct timeval __user *utimes); +asmlinkage long sys_faccessat (int dfd,const char __user *filename,int mode); +asmlinkage long sys_fchmodat (int dfd,const char __user * filename, +mode_t mode); +asmlinkage long sys_fchownat (int dfd,const char __user *filename,uid_t user, +gid_t group,int flag); +asmlinkage long sys_openat (int dfd,const char __user *filename,int flags, +int mode); +asmlinkage long sys_newfstatat (int dfd,char __user *filename, +struct stat __user *statbuf,int flag); +asmlinkage long sys_readlinkat (int dfd,const char __user *path,char __user *buf, +int bufsiz); +asmlinkage long compat_sys_futimesat (int dfd,char __user *filename, +struct compat_timeval __user *t); +asmlinkage long compat_sys_newfstatat (int dfd,char __user * filename, +struct compat_stat __user *statbuf, +int flag); +asmlinkage long +compat_sys_openat(int dfd, const char __user *filename, +int flags,int mode); +#endif
Quoted 2 lines · Ulrich Drepper
Do we really need the __NR_ia32_* macros? The userlevel on x86-64 should be bi-arch and provide the native ia32
unistd.h.
I'd have thought that x86 and x86_64 could source-level-share the syscall table, yes. ppc manages to.
Quoted 6 lines · Andrew Morton
Quoted 2 lines · Ulrich Drepper
Do we really need the __NR_ia32_* macros? The userlevel on x86-64 should be bi-arch and provide the native ia32
unistd.h.I'd have thought that x86 and
x86_64could source-level-share the syscall table, yes. ppc manages to.
AMD64 renumbered all the syscalls for optimal cacheline usage or something stupid like that. I suppose the x86 emulation on AMD64 kernels could share the i386 table, but then _NR_foo will have a different value depending on context, and that'll just get confusing.
Signature · 1 line
Nicholas Miell <[email protected]>
Quoted 4 lines · Nicholas Miell
AMD64 renumbered all the syscalls for optimal cacheline usage or something stupid like that. I suppose the x86 emulation on AMD64 kernels could share the i386 table, but then
_NR_foowill have a different value depending on context, and that'll just get confusing.
Yes, the syscall numbers are quite different, especially because x86 has all syscalls, even the obsolete ones.
But what I mean is that the __NR_ia32_* macros in asm-x86-64/ia32_unistd.h aren't used anywhere in the kernel. And in userland the asm-x86/unistd.h file is used when compiling x86 apps. At least this is how the kernel headers for userlevel use should be set up.
Signature · 1 line
➧ Ulrich Drepper ➧ Red Hat, Inc. ➧ 444 Castro St ➧ Mountain View, CA ❖
Quoted 6 lines · Ulrich Drepper
Quoted 4 lines · Nicholas Miell
AMD64 renumbered all the syscalls for optimal cacheline usage or something stupid like that. I suppose the x86 emulation on AMD64 kernels could share the i386 table, but then
_NR_foowill have a different value depending on context, and that'll just get confusing.
Quoted 7 lines
Yes, the syscall numbers are quite different, especially because x86 has all syscalls, even the obsolete ones.
But what I mean is that the __NR_ia32_* macros in
asm-x86-64/ia32_unistd.haren't used anywhere in the kernel. And in userland theasm-x86/unistd.hfile is used when compiling x86 apps. At least this is how the kernel headers for userlevel use should be set up.
Ah, that makes sense. Actually, a few of them are used (sigreturn, rt_sigreturn, and restart_syscall), but I suppose those could be defined locally.
Signature · 1 line
Nicholas Miell <[email protected]>