Re: [patch] inotify: add x86-64 syscall numbers
On Fri, 2005-07-15 at 22:01 +0200, Andi Kleen wrote: > It won't work anyways because you forgot to patch the compat > sys32_open. Well, "won't work" is a bit harsh, its just one hook. But that was next. I usually leave per-arch stuff to the arch folks. Robert Love Add fsnotify_open() hook to sys32_open() on x86-64. Signed-off-by: Robert Love <[EMAIL PROTECTED]> arch/x86_64/ia32/sys_ia32.c |5 - 1 files changed, 4 insertions(+), 1 deletion(-) diff -urN linux-2.6.13-rc3/arch/x86_64/ia32/sys_ia32.c linux/arch/x86_64/ia32/sys_ia32.c --- linux-2.6.13-rc3/arch/x86_64/ia32/sys_ia32.c2005-07-15 16:08:27.0 -0400 +++ linux/arch/x86_64/ia32/sys_ia32.c 2005-07-15 16:07:21.0 -0400 @@ -61,6 +61,7 @@ #include #include #include +#include #include #include #include @@ -984,8 +985,10 @@ if (IS_ERR(f)) { put_unused_fd(fd); fd = error; - } else + } else { + fsnotify_open(f->f_dentry); fd_install(fd, f); + } } putname(tmp); } - To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to [EMAIL PROTECTED] More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/
Re: [patch] inotify: add x86-64 syscall numbers
Robert Love <[EMAIL PROTECTED]> writes: > Andi, > > Attached patch adds the inotify syscall numbers to x86-64. Also adds > the new ioprio_get() and ioprio_set() calls to the IA32 layer. It won't work anyways because you forgot to patch the compat sys32_open. -Andi - To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to [EMAIL PROTECTED] More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/
[patch] inotify: add x86-64 syscall numbers
Andi, Attached patch adds the inotify syscall numbers to x86-64. Also adds the new ioprio_get() and ioprio_set() calls to the IA32 layer. Robert Love Add the inotify syscalls to x86-64 Signed-off-by: Robert Love <[EMAIL PROTECTED]> arch/x86_64/ia32/ia32entry.S |8 ++-- include/asm-x86_64/ia32_unistd.h |7 ++- include/asm-x86_64/unistd.h |8 +++- 3 files changed, 19 insertions(+), 4 deletions(-) diff -urN linux-2.6.13-rc3/arch/x86_64/ia32/ia32entry.S linux/arch/x86_64/ia32/ia32entry.S --- linux-2.6.13-rc3/arch/x86_64/ia32/ia32entry.S 2005-07-13 10:51:10.0 -0400 +++ linux/arch/x86_64/ia32/ia32entry.S 2005-07-15 15:47:59.0 -0400 @@ -591,11 +591,15 @@ .quad compat_sys_mq_getsetattr .quad compat_sys_kexec_load /* reserved for kexec */ .quad compat_sys_waitid - .quad quiet_ni_syscall /* sys_altroot */ + .quad quiet_ni_syscall /* 285: sys_altroot */ .quad sys_add_key .quad sys_request_key .quad sys_keyctl - /* don't forget to change IA32_NR_syscalls */ + .quad sys_ioprio_set + .quad sys_ioprio_get/* 290 */ + .quad sys_inotify_init + .quad sys_inotify_add_watch + .quad sys_inotify_rm_watch ia32_syscall_end: .rept IA32_NR_syscalls-(ia32_syscall_end-ia32_sys_call_table)/8 .quad ni_syscall diff -urN linux-2.6.13-rc3/include/asm-x86_64/ia32_unistd.h linux/include/asm-x86_64/ia32_unistd.h --- linux-2.6.13-rc3/include/asm-x86_64/ia32_unistd.h 2005-07-13 10:51:00.0 -0400 +++ linux/include/asm-x86_64/ia32_unistd.h 2005-07-15 15:48:50.0 -0400 @@ -294,7 +294,12 @@ #define __NR_ia32_add_key 286 #define __NR_ia32_request_key 287 #define __NR_ia32_keyctl 288 +#define __NR_ia32_ioprio_set 289 +#define __NR_ia32_ioprio_get 290 +#define __NR_ia32_inotify_init 291 +#define __NR_ia32_inotify_add_watch292 +#define __NR_ia32_inotify_rm_watch 293 -#define IA32_NR_syscalls 290 /* must be > than biggest syscall! */ +#define IA32_NR_syscalls 294 /* must be > than biggest syscall! */ #endif /* _ASM_X86_64_IA32_UNISTD_H_ */ diff -urN linux-2.6.13-rc3/include/asm-x86_64/unistd.h linux/include/asm-x86_64/unistd.h --- linux-2.6.13-rc3/include/asm-x86_64/unistd.h2005-07-13 10:51:14.0 -0400 +++ linux/include/asm-x86_64/unistd.h 2005-07-15 15:49:37.0 -0400 @@ -565,8 +565,14 @@ __SYSCALL(__NR_ioprio_set, sys_ioprio_set) #define __NR_ioprio_get252 __SYSCALL(__NR_ioprio_get, sys_ioprio_get) +#define __NR_inotify_init 253 +__SYSCALL(__NR_inotify_init, sys_inotify_init) +#define __NR_inotify_add_watch 254 +__SYSCALL(__NR_inotify_add_watch, sys_inotify_add_watch) +#define __NR_inotify_rm_watch 255 +__SYSCALL(__NR_inotify_rm_watch, sys_inotify_rm_watch) -#define __NR_syscall_max __NR_ioprio_get +#define __NR_syscall_max __NR_inotify_rm_watch #ifndef __NO_STUBS /* user-visible error numbers are in the range -1 - -4095 */ - To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to [EMAIL PROTECTED] More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/
[patch] inotify: add x86-64 syscall numbers
Andi, Attached patch adds the inotify syscall numbers to x86-64. Also adds the new ioprio_get() and ioprio_set() calls to the IA32 layer. Robert Love Add the inotify syscalls to x86-64 Signed-off-by: Robert Love [EMAIL PROTECTED] arch/x86_64/ia32/ia32entry.S |8 ++-- include/asm-x86_64/ia32_unistd.h |7 ++- include/asm-x86_64/unistd.h |8 +++- 3 files changed, 19 insertions(+), 4 deletions(-) diff -urN linux-2.6.13-rc3/arch/x86_64/ia32/ia32entry.S linux/arch/x86_64/ia32/ia32entry.S --- linux-2.6.13-rc3/arch/x86_64/ia32/ia32entry.S 2005-07-13 10:51:10.0 -0400 +++ linux/arch/x86_64/ia32/ia32entry.S 2005-07-15 15:47:59.0 -0400 @@ -591,11 +591,15 @@ .quad compat_sys_mq_getsetattr .quad compat_sys_kexec_load /* reserved for kexec */ .quad compat_sys_waitid - .quad quiet_ni_syscall /* sys_altroot */ + .quad quiet_ni_syscall /* 285: sys_altroot */ .quad sys_add_key .quad sys_request_key .quad sys_keyctl - /* don't forget to change IA32_NR_syscalls */ + .quad sys_ioprio_set + .quad sys_ioprio_get/* 290 */ + .quad sys_inotify_init + .quad sys_inotify_add_watch + .quad sys_inotify_rm_watch ia32_syscall_end: .rept IA32_NR_syscalls-(ia32_syscall_end-ia32_sys_call_table)/8 .quad ni_syscall diff -urN linux-2.6.13-rc3/include/asm-x86_64/ia32_unistd.h linux/include/asm-x86_64/ia32_unistd.h --- linux-2.6.13-rc3/include/asm-x86_64/ia32_unistd.h 2005-07-13 10:51:00.0 -0400 +++ linux/include/asm-x86_64/ia32_unistd.h 2005-07-15 15:48:50.0 -0400 @@ -294,7 +294,12 @@ #define __NR_ia32_add_key 286 #define __NR_ia32_request_key 287 #define __NR_ia32_keyctl 288 +#define __NR_ia32_ioprio_set 289 +#define __NR_ia32_ioprio_get 290 +#define __NR_ia32_inotify_init 291 +#define __NR_ia32_inotify_add_watch292 +#define __NR_ia32_inotify_rm_watch 293 -#define IA32_NR_syscalls 290 /* must be than biggest syscall! */ +#define IA32_NR_syscalls 294 /* must be than biggest syscall! */ #endif /* _ASM_X86_64_IA32_UNISTD_H_ */ diff -urN linux-2.6.13-rc3/include/asm-x86_64/unistd.h linux/include/asm-x86_64/unistd.h --- linux-2.6.13-rc3/include/asm-x86_64/unistd.h2005-07-13 10:51:14.0 -0400 +++ linux/include/asm-x86_64/unistd.h 2005-07-15 15:49:37.0 -0400 @@ -565,8 +565,14 @@ __SYSCALL(__NR_ioprio_set, sys_ioprio_set) #define __NR_ioprio_get252 __SYSCALL(__NR_ioprio_get, sys_ioprio_get) +#define __NR_inotify_init 253 +__SYSCALL(__NR_inotify_init, sys_inotify_init) +#define __NR_inotify_add_watch 254 +__SYSCALL(__NR_inotify_add_watch, sys_inotify_add_watch) +#define __NR_inotify_rm_watch 255 +__SYSCALL(__NR_inotify_rm_watch, sys_inotify_rm_watch) -#define __NR_syscall_max __NR_ioprio_get +#define __NR_syscall_max __NR_inotify_rm_watch #ifndef __NO_STUBS /* user-visible error numbers are in the range -1 - -4095 */ - To unsubscribe from this list: send the line unsubscribe linux-kernel in the body of a message to [EMAIL PROTECTED] More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/
Re: [patch] inotify: add x86-64 syscall numbers
Robert Love [EMAIL PROTECTED] writes: Andi, Attached patch adds the inotify syscall numbers to x86-64. Also adds the new ioprio_get() and ioprio_set() calls to the IA32 layer. It won't work anyways because you forgot to patch the compat sys32_open. -Andi - To unsubscribe from this list: send the line unsubscribe linux-kernel in the body of a message to [EMAIL PROTECTED] More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/
Re: [patch] inotify: add x86-64 syscall numbers
On Fri, 2005-07-15 at 22:01 +0200, Andi Kleen wrote: It won't work anyways because you forgot to patch the compat sys32_open. Well, won't work is a bit harsh, its just one hook. But that was next. I usually leave per-arch stuff to the arch folks. Robert Love Add fsnotify_open() hook to sys32_open() on x86-64. Signed-off-by: Robert Love [EMAIL PROTECTED] arch/x86_64/ia32/sys_ia32.c |5 - 1 files changed, 4 insertions(+), 1 deletion(-) diff -urN linux-2.6.13-rc3/arch/x86_64/ia32/sys_ia32.c linux/arch/x86_64/ia32/sys_ia32.c --- linux-2.6.13-rc3/arch/x86_64/ia32/sys_ia32.c2005-07-15 16:08:27.0 -0400 +++ linux/arch/x86_64/ia32/sys_ia32.c 2005-07-15 16:07:21.0 -0400 @@ -61,6 +61,7 @@ #include linux/ptrace.h #include linux/highuid.h #include linux/vmalloc.h +#include linux/fsnotify. #include asm/mman.h #include asm/types.h #include asm/uaccess.h @@ -984,8 +985,10 @@ if (IS_ERR(f)) { put_unused_fd(fd); fd = error; - } else + } else { + fsnotify_open(f-f_dentry); fd_install(fd, f); + } } putname(tmp); } - To unsubscribe from this list: send the line unsubscribe linux-kernel in the body of a message to [EMAIL PROTECTED] More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/