Re: [PATCH 13/15] sparc: add renameat2 syscall
From: Miklos Szeredi Date: Fri, 16 May 2014 11:09:02 +0200 > On Thu, May 15, 2014 at 6:49 PM, David Miller wrote: >> From: Miklos Szeredi >> Date: Thu, 15 May 2014 14:22:33 +0200 >> >>> On Fri, Apr 11, 2014 at 12:25 PM, Miklos Szeredi wrote: From: Miklos Szeredi Signed-off-by: Miklos Szeredi Cc: David S. Miller >>> >>> David, >>> >>> I'll be sending a batch of patches with arch support for the renameat2 >>> syscall to Linus next week. If you'd like me to send this as well, >>> could you please ACK it? >> >> For the 32-bit compat case on sparc64, you need to add a wrapper to >> sign extend the oldfd and newfd arguments. >> >> This usually occurs in arch/sparc/kernel/sys32.S, probably something >> like: >> >> SIGN2(sys32_renameat2, sys_renameat2, %o0, %o2) >> >> and then you hook up sys32_renameat2 instead of sys_renameat2 in the >> 32-bit compat syscall table in syscall_64.S > > Are you sure? None of the *at() functions (including renameat()) are in > there. Those are in error too. Any argument which is signed needs this treatment. -- To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to majord...@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/
Re: [PATCH 13/15] sparc: add renameat2 syscall
From: Miklos Szeredi mik...@szeredi.hu Date: Fri, 16 May 2014 11:09:02 +0200 On Thu, May 15, 2014 at 6:49 PM, David Miller da...@davemloft.net wrote: From: Miklos Szeredi mik...@szeredi.hu Date: Thu, 15 May 2014 14:22:33 +0200 On Fri, Apr 11, 2014 at 12:25 PM, Miklos Szeredi mik...@szeredi.hu wrote: From: Miklos Szeredi mszer...@suse.cz Signed-off-by: Miklos Szeredi mszer...@suse.cz Cc: David S. Miller da...@davemloft.net David, I'll be sending a batch of patches with arch support for the renameat2 syscall to Linus next week. If you'd like me to send this as well, could you please ACK it? For the 32-bit compat case on sparc64, you need to add a wrapper to sign extend the oldfd and newfd arguments. This usually occurs in arch/sparc/kernel/sys32.S, probably something like: SIGN2(sys32_renameat2, sys_renameat2, %o0, %o2) and then you hook up sys32_renameat2 instead of sys_renameat2 in the 32-bit compat syscall table in syscall_64.S Are you sure? None of the *at() functions (including renameat()) are in there. Those are in error too. Any argument which is signed needs this treatment. -- To unsubscribe from this list: send the line unsubscribe linux-kernel in the body of a message to majord...@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/
Re: [PATCH 13/15] sparc: add renameat2 syscall
On Thu, May 15, 2014 at 6:49 PM, David Miller wrote: > From: Miklos Szeredi > Date: Thu, 15 May 2014 14:22:33 +0200 > >> On Fri, Apr 11, 2014 at 12:25 PM, Miklos Szeredi wrote: >>> From: Miklos Szeredi >>> >>> Signed-off-by: Miklos Szeredi >>> Cc: David S. Miller >> >> David, >> >> I'll be sending a batch of patches with arch support for the renameat2 >> syscall to Linus next week. If you'd like me to send this as well, >> could you please ACK it? > > For the 32-bit compat case on sparc64, you need to add a wrapper to > sign extend the oldfd and newfd arguments. > > This usually occurs in arch/sparc/kernel/sys32.S, probably something > like: > > SIGN2(sys32_renameat2, sys_renameat2, %o0, %o2) > > and then you hook up sys32_renameat2 instead of sys_renameat2 in the > 32-bit compat syscall table in syscall_64.S Are you sure? None of the *at() functions (including renameat()) are in there. Thanks, Miklos -- To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to majord...@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/
Re: [PATCH 13/15] sparc: add renameat2 syscall
On Thu, May 15, 2014 at 6:49 PM, David Miller da...@davemloft.net wrote: From: Miklos Szeredi mik...@szeredi.hu Date: Thu, 15 May 2014 14:22:33 +0200 On Fri, Apr 11, 2014 at 12:25 PM, Miklos Szeredi mik...@szeredi.hu wrote: From: Miklos Szeredi mszer...@suse.cz Signed-off-by: Miklos Szeredi mszer...@suse.cz Cc: David S. Miller da...@davemloft.net David, I'll be sending a batch of patches with arch support for the renameat2 syscall to Linus next week. If you'd like me to send this as well, could you please ACK it? For the 32-bit compat case on sparc64, you need to add a wrapper to sign extend the oldfd and newfd arguments. This usually occurs in arch/sparc/kernel/sys32.S, probably something like: SIGN2(sys32_renameat2, sys_renameat2, %o0, %o2) and then you hook up sys32_renameat2 instead of sys_renameat2 in the 32-bit compat syscall table in syscall_64.S Are you sure? None of the *at() functions (including renameat()) are in there. Thanks, Miklos -- To unsubscribe from this list: send the line unsubscribe linux-kernel in the body of a message to majord...@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/
Re: [PATCH 13/15] sparc: add renameat2 syscall
From: Miklos Szeredi Date: Thu, 15 May 2014 14:22:33 +0200 > On Fri, Apr 11, 2014 at 12:25 PM, Miklos Szeredi wrote: >> From: Miklos Szeredi >> >> Signed-off-by: Miklos Szeredi >> Cc: David S. Miller > > David, > > I'll be sending a batch of patches with arch support for the renameat2 > syscall to Linus next week. If you'd like me to send this as well, > could you please ACK it? For the 32-bit compat case on sparc64, you need to add a wrapper to sign extend the oldfd and newfd arguments. This usually occurs in arch/sparc/kernel/sys32.S, probably something like: SIGN2(sys32_renameat2, sys_renameat2, %o0, %o2) and then you hook up sys32_renameat2 instead of sys_renameat2 in the 32-bit compat syscall table in syscall_64.S -- To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to majord...@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/
Re: [PATCH 13/15] sparc: add renameat2 syscall
On Fri, Apr 11, 2014 at 12:25 PM, Miklos Szeredi wrote: > From: Miklos Szeredi > > Signed-off-by: Miklos Szeredi > Cc: David S. Miller David, I'll be sending a batch of patches with arch support for the renameat2 syscall to Linus next week. If you'd like me to send this as well, could you please ACK it? Thanks, Miklos > --- > arch/sparc/include/uapi/asm/unistd.h | 3 ++- > arch/sparc/kernel/systbls_32.S | 1 + > arch/sparc/kernel/systbls_64.S | 2 ++ > 3 files changed, 5 insertions(+), 1 deletion(-) > > diff --git a/arch/sparc/include/uapi/asm/unistd.h > b/arch/sparc/include/uapi/asm/unistd.h > index b73274fb961a..42f2bca1d338 100644 > --- a/arch/sparc/include/uapi/asm/unistd.h > +++ b/arch/sparc/include/uapi/asm/unistd.h > @@ -410,8 +410,9 @@ > #define __NR_finit_module 342 > #define __NR_sched_setattr 343 > #define __NR_sched_getattr 344 > +#define __NR_renameat2 345 > > -#define NR_syscalls345 > +#define NR_syscalls346 > > /* Bitmask values returned from kern_features system call. */ > #define KERN_FEATURE_MIXED_MODE_STACK 0x0001 > diff --git a/arch/sparc/kernel/systbls_32.S b/arch/sparc/kernel/systbls_32.S > index 151ace8766cc..85fe9b1087cd 100644 > --- a/arch/sparc/kernel/systbls_32.S > +++ b/arch/sparc/kernel/systbls_32.S > @@ -86,3 +86,4 @@ sys_call_table: > /*330*/.long sys_fanotify_mark, sys_prlimit64, > sys_name_to_handle_at, sys_open_by_handle_at, sys_clock_adjtime > /*335*/.long sys_syncfs, sys_sendmmsg, sys_setns, > sys_process_vm_readv, sys_process_vm_writev > /*340*/.long sys_ni_syscall, sys_kcmp, sys_finit_module, > sys_sched_setattr, sys_sched_getattr > +/*345*/.long sys_renameat2 > diff --git a/arch/sparc/kernel/systbls_64.S b/arch/sparc/kernel/systbls_64.S > index 4bd4e2bb26cf..814beaeda4dc 100644 > --- a/arch/sparc/kernel/systbls_64.S > +++ b/arch/sparc/kernel/systbls_64.S > @@ -87,6 +87,7 @@ sys_call_table32: > /*330*/.word compat_sys_fanotify_mark, sys_prlimit64, > sys_name_to_handle_at, compat_sys_open_by_handle_at, compat_sys_clock_adjtime > .word sys_syncfs, compat_sys_sendmmsg, sys_setns, > compat_sys_process_vm_readv, compat_sys_process_vm_writev > /*340*/.word sys_kern_features, sys_kcmp, sys_finit_module, > sys_sched_setattr, sys_sched_getattr > + .word sys_renameat2 > > #endif /* CONFIG_COMPAT */ > > @@ -165,3 +166,4 @@ sys_call_table: > /*330*/.word sys_fanotify_mark, sys_prlimit64, > sys_name_to_handle_at, sys_open_by_handle_at, sys_clock_adjtime > .word sys_syncfs, sys_sendmmsg, sys_setns, sys_process_vm_readv, > sys_process_vm_writev > /*340*/.word sys_kern_features, sys_kcmp, sys_finit_module, > sys_sched_setattr, sys_sched_getattr > + .word sys_renameat2 > -- > 1.8.1.4 > -- To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to majord...@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/
Re: [PATCH 13/15] sparc: add renameat2 syscall
On Fri, Apr 11, 2014 at 12:25 PM, Miklos Szeredi mik...@szeredi.hu wrote: From: Miklos Szeredi mszer...@suse.cz Signed-off-by: Miklos Szeredi mszer...@suse.cz Cc: David S. Miller da...@davemloft.net David, I'll be sending a batch of patches with arch support for the renameat2 syscall to Linus next week. If you'd like me to send this as well, could you please ACK it? Thanks, Miklos --- arch/sparc/include/uapi/asm/unistd.h | 3 ++- arch/sparc/kernel/systbls_32.S | 1 + arch/sparc/kernel/systbls_64.S | 2 ++ 3 files changed, 5 insertions(+), 1 deletion(-) diff --git a/arch/sparc/include/uapi/asm/unistd.h b/arch/sparc/include/uapi/asm/unistd.h index b73274fb961a..42f2bca1d338 100644 --- a/arch/sparc/include/uapi/asm/unistd.h +++ b/arch/sparc/include/uapi/asm/unistd.h @@ -410,8 +410,9 @@ #define __NR_finit_module 342 #define __NR_sched_setattr 343 #define __NR_sched_getattr 344 +#define __NR_renameat2 345 -#define NR_syscalls345 +#define NR_syscalls346 /* Bitmask values returned from kern_features system call. */ #define KERN_FEATURE_MIXED_MODE_STACK 0x0001 diff --git a/arch/sparc/kernel/systbls_32.S b/arch/sparc/kernel/systbls_32.S index 151ace8766cc..85fe9b1087cd 100644 --- a/arch/sparc/kernel/systbls_32.S +++ b/arch/sparc/kernel/systbls_32.S @@ -86,3 +86,4 @@ sys_call_table: /*330*/.long sys_fanotify_mark, sys_prlimit64, sys_name_to_handle_at, sys_open_by_handle_at, sys_clock_adjtime /*335*/.long sys_syncfs, sys_sendmmsg, sys_setns, sys_process_vm_readv, sys_process_vm_writev /*340*/.long sys_ni_syscall, sys_kcmp, sys_finit_module, sys_sched_setattr, sys_sched_getattr +/*345*/.long sys_renameat2 diff --git a/arch/sparc/kernel/systbls_64.S b/arch/sparc/kernel/systbls_64.S index 4bd4e2bb26cf..814beaeda4dc 100644 --- a/arch/sparc/kernel/systbls_64.S +++ b/arch/sparc/kernel/systbls_64.S @@ -87,6 +87,7 @@ sys_call_table32: /*330*/.word compat_sys_fanotify_mark, sys_prlimit64, sys_name_to_handle_at, compat_sys_open_by_handle_at, compat_sys_clock_adjtime .word sys_syncfs, compat_sys_sendmmsg, sys_setns, compat_sys_process_vm_readv, compat_sys_process_vm_writev /*340*/.word sys_kern_features, sys_kcmp, sys_finit_module, sys_sched_setattr, sys_sched_getattr + .word sys_renameat2 #endif /* CONFIG_COMPAT */ @@ -165,3 +166,4 @@ sys_call_table: /*330*/.word sys_fanotify_mark, sys_prlimit64, sys_name_to_handle_at, sys_open_by_handle_at, sys_clock_adjtime .word sys_syncfs, sys_sendmmsg, sys_setns, sys_process_vm_readv, sys_process_vm_writev /*340*/.word sys_kern_features, sys_kcmp, sys_finit_module, sys_sched_setattr, sys_sched_getattr + .word sys_renameat2 -- 1.8.1.4 -- To unsubscribe from this list: send the line unsubscribe linux-kernel in the body of a message to majord...@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/
Re: [PATCH 13/15] sparc: add renameat2 syscall
From: Miklos Szeredi mik...@szeredi.hu Date: Thu, 15 May 2014 14:22:33 +0200 On Fri, Apr 11, 2014 at 12:25 PM, Miklos Szeredi mik...@szeredi.hu wrote: From: Miklos Szeredi mszer...@suse.cz Signed-off-by: Miklos Szeredi mszer...@suse.cz Cc: David S. Miller da...@davemloft.net David, I'll be sending a batch of patches with arch support for the renameat2 syscall to Linus next week. If you'd like me to send this as well, could you please ACK it? For the 32-bit compat case on sparc64, you need to add a wrapper to sign extend the oldfd and newfd arguments. This usually occurs in arch/sparc/kernel/sys32.S, probably something like: SIGN2(sys32_renameat2, sys_renameat2, %o0, %o2) and then you hook up sys32_renameat2 instead of sys_renameat2 in the 32-bit compat syscall table in syscall_64.S -- To unsubscribe from this list: send the line unsubscribe linux-kernel in the body of a message to majord...@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/
[PATCH 13/15] sparc: add renameat2 syscall
From: Miklos Szeredi Signed-off-by: Miklos Szeredi Cc: David S. Miller --- arch/sparc/include/uapi/asm/unistd.h | 3 ++- arch/sparc/kernel/systbls_32.S | 1 + arch/sparc/kernel/systbls_64.S | 2 ++ 3 files changed, 5 insertions(+), 1 deletion(-) diff --git a/arch/sparc/include/uapi/asm/unistd.h b/arch/sparc/include/uapi/asm/unistd.h index b73274fb961a..42f2bca1d338 100644 --- a/arch/sparc/include/uapi/asm/unistd.h +++ b/arch/sparc/include/uapi/asm/unistd.h @@ -410,8 +410,9 @@ #define __NR_finit_module 342 #define __NR_sched_setattr 343 #define __NR_sched_getattr 344 +#define __NR_renameat2 345 -#define NR_syscalls345 +#define NR_syscalls346 /* Bitmask values returned from kern_features system call. */ #define KERN_FEATURE_MIXED_MODE_STACK 0x0001 diff --git a/arch/sparc/kernel/systbls_32.S b/arch/sparc/kernel/systbls_32.S index 151ace8766cc..85fe9b1087cd 100644 --- a/arch/sparc/kernel/systbls_32.S +++ b/arch/sparc/kernel/systbls_32.S @@ -86,3 +86,4 @@ sys_call_table: /*330*/.long sys_fanotify_mark, sys_prlimit64, sys_name_to_handle_at, sys_open_by_handle_at, sys_clock_adjtime /*335*/.long sys_syncfs, sys_sendmmsg, sys_setns, sys_process_vm_readv, sys_process_vm_writev /*340*/.long sys_ni_syscall, sys_kcmp, sys_finit_module, sys_sched_setattr, sys_sched_getattr +/*345*/.long sys_renameat2 diff --git a/arch/sparc/kernel/systbls_64.S b/arch/sparc/kernel/systbls_64.S index 4bd4e2bb26cf..814beaeda4dc 100644 --- a/arch/sparc/kernel/systbls_64.S +++ b/arch/sparc/kernel/systbls_64.S @@ -87,6 +87,7 @@ sys_call_table32: /*330*/.word compat_sys_fanotify_mark, sys_prlimit64, sys_name_to_handle_at, compat_sys_open_by_handle_at, compat_sys_clock_adjtime .word sys_syncfs, compat_sys_sendmmsg, sys_setns, compat_sys_process_vm_readv, compat_sys_process_vm_writev /*340*/.word sys_kern_features, sys_kcmp, sys_finit_module, sys_sched_setattr, sys_sched_getattr + .word sys_renameat2 #endif /* CONFIG_COMPAT */ @@ -165,3 +166,4 @@ sys_call_table: /*330*/.word sys_fanotify_mark, sys_prlimit64, sys_name_to_handle_at, sys_open_by_handle_at, sys_clock_adjtime .word sys_syncfs, sys_sendmmsg, sys_setns, sys_process_vm_readv, sys_process_vm_writev /*340*/.word sys_kern_features, sys_kcmp, sys_finit_module, sys_sched_setattr, sys_sched_getattr + .word sys_renameat2 -- 1.8.1.4 -- To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to majord...@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/
[PATCH 13/15] sparc: add renameat2 syscall
From: Miklos Szeredi mszer...@suse.cz Signed-off-by: Miklos Szeredi mszer...@suse.cz Cc: David S. Miller da...@davemloft.net --- arch/sparc/include/uapi/asm/unistd.h | 3 ++- arch/sparc/kernel/systbls_32.S | 1 + arch/sparc/kernel/systbls_64.S | 2 ++ 3 files changed, 5 insertions(+), 1 deletion(-) diff --git a/arch/sparc/include/uapi/asm/unistd.h b/arch/sparc/include/uapi/asm/unistd.h index b73274fb961a..42f2bca1d338 100644 --- a/arch/sparc/include/uapi/asm/unistd.h +++ b/arch/sparc/include/uapi/asm/unistd.h @@ -410,8 +410,9 @@ #define __NR_finit_module 342 #define __NR_sched_setattr 343 #define __NR_sched_getattr 344 +#define __NR_renameat2 345 -#define NR_syscalls345 +#define NR_syscalls346 /* Bitmask values returned from kern_features system call. */ #define KERN_FEATURE_MIXED_MODE_STACK 0x0001 diff --git a/arch/sparc/kernel/systbls_32.S b/arch/sparc/kernel/systbls_32.S index 151ace8766cc..85fe9b1087cd 100644 --- a/arch/sparc/kernel/systbls_32.S +++ b/arch/sparc/kernel/systbls_32.S @@ -86,3 +86,4 @@ sys_call_table: /*330*/.long sys_fanotify_mark, sys_prlimit64, sys_name_to_handle_at, sys_open_by_handle_at, sys_clock_adjtime /*335*/.long sys_syncfs, sys_sendmmsg, sys_setns, sys_process_vm_readv, sys_process_vm_writev /*340*/.long sys_ni_syscall, sys_kcmp, sys_finit_module, sys_sched_setattr, sys_sched_getattr +/*345*/.long sys_renameat2 diff --git a/arch/sparc/kernel/systbls_64.S b/arch/sparc/kernel/systbls_64.S index 4bd4e2bb26cf..814beaeda4dc 100644 --- a/arch/sparc/kernel/systbls_64.S +++ b/arch/sparc/kernel/systbls_64.S @@ -87,6 +87,7 @@ sys_call_table32: /*330*/.word compat_sys_fanotify_mark, sys_prlimit64, sys_name_to_handle_at, compat_sys_open_by_handle_at, compat_sys_clock_adjtime .word sys_syncfs, compat_sys_sendmmsg, sys_setns, compat_sys_process_vm_readv, compat_sys_process_vm_writev /*340*/.word sys_kern_features, sys_kcmp, sys_finit_module, sys_sched_setattr, sys_sched_getattr + .word sys_renameat2 #endif /* CONFIG_COMPAT */ @@ -165,3 +166,4 @@ sys_call_table: /*330*/.word sys_fanotify_mark, sys_prlimit64, sys_name_to_handle_at, sys_open_by_handle_at, sys_clock_adjtime .word sys_syncfs, sys_sendmmsg, sys_setns, sys_process_vm_readv, sys_process_vm_writev /*340*/.word sys_kern_features, sys_kcmp, sys_finit_module, sys_sched_setattr, sys_sched_getattr + .word sys_renameat2 -- 1.8.1.4 -- To unsubscribe from this list: send the line unsubscribe linux-kernel in the body of a message to majord...@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/