* [PATCH] powerpc: Enabling sys_kcmp for CRIU
@ 2015-05-05 15:30 ` Laurent Dufour
0 siblings, 0 replies; 4+ messages in thread
From: Laurent Dufour @ 2015-05-05 15:30 UTC (permalink / raw)
To: linuxppc-dev, mpe; +Cc: benh, paulus, linux-kernel, Tony Breeds
The commit 8170a83f15ee ("powerpc: Wireup the kcmp syscall to sys_ni") has
disabled the kcmp syscall for powerpc. This has been done due to the use
of unsigned long parameters which may require a dedicated wrapper to handle
32bit process on top of 64bit kernel. However in the kcmp() case, the 2
unsigned long parameters are currently only used to carry file descriptors
from user space to the kernel. Since such a parameter is passed through
register, and file descriptor doesn't need to get extended, there is,
today, no need for a wrapper.
In the case there will be a need to pass address in or out of this system
call, then a wrapper could be required, it will then be to care of it.
As today this is not the case, it is safe to enable kcmp() on powerpc.
Cc: Tony Breeds <tony@bakeyournoodle.com>
Signed-off-by: Laurent Dufour <ldufour@linux.vnet.ibm.com>
---
arch/powerpc/include/asm/systbl.h | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/arch/powerpc/include/asm/systbl.h b/arch/powerpc/include/asm/systbl.h
index 91062eef582f..b257f02ab6bf 100644
--- a/arch/powerpc/include/asm/systbl.h
+++ b/arch/powerpc/include/asm/systbl.h
@@ -358,7 +358,7 @@ SYSCALL_SPU(setns)
COMPAT_SYS(process_vm_readv)
COMPAT_SYS(process_vm_writev)
SYSCALL(finit_module)
-SYSCALL(ni_syscall) /* sys_kcmp */
+SYSCALL(kcmp) /* sys_kcmp */
SYSCALL_SPU(sched_setattr)
SYSCALL_SPU(sched_getattr)
SYSCALL_SPU(renameat2)
--
1.9.1
^ permalink raw reply related [flat|nested] 4+ messages in thread
* [PATCH] powerpc: Enabling sys_kcmp for CRIU
@ 2015-05-05 15:30 ` Laurent Dufour
0 siblings, 0 replies; 4+ messages in thread
From: Laurent Dufour @ 2015-05-05 15:30 UTC (permalink / raw)
To: linuxppc-dev, mpe; +Cc: paulus, linux-kernel
The commit 8170a83f15ee ("powerpc: Wireup the kcmp syscall to sys_ni") has
disabled the kcmp syscall for powerpc. This has been done due to the use
of unsigned long parameters which may require a dedicated wrapper to handle
32bit process on top of 64bit kernel. However in the kcmp() case, the 2
unsigned long parameters are currently only used to carry file descriptors
from user space to the kernel. Since such a parameter is passed through
register, and file descriptor doesn't need to get extended, there is,
today, no need for a wrapper.
In the case there will be a need to pass address in or out of this system
call, then a wrapper could be required, it will then be to care of it.
As today this is not the case, it is safe to enable kcmp() on powerpc.
Cc: Tony Breeds <tony@bakeyournoodle.com>
Signed-off-by: Laurent Dufour <ldufour@linux.vnet.ibm.com>
---
arch/powerpc/include/asm/systbl.h | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/arch/powerpc/include/asm/systbl.h b/arch/powerpc/include/asm/systbl.h
index 91062eef582f..b257f02ab6bf 100644
--- a/arch/powerpc/include/asm/systbl.h
+++ b/arch/powerpc/include/asm/systbl.h
@@ -358,7 +358,7 @@ SYSCALL_SPU(setns)
COMPAT_SYS(process_vm_readv)
COMPAT_SYS(process_vm_writev)
SYSCALL(finit_module)
-SYSCALL(ni_syscall) /* sys_kcmp */
+SYSCALL(kcmp) /* sys_kcmp */
SYSCALL_SPU(sched_setattr)
SYSCALL_SPU(sched_getattr)
SYSCALL_SPU(renameat2)
--
1.9.1
^ permalink raw reply related [flat|nested] 4+ messages in thread
* Re: powerpc: Enabling sys_kcmp for CRIU
2015-05-05 15:30 ` Laurent Dufour
(?)
@ 2015-05-11 10:31 ` Michael Ellerman
2015-05-11 11:53 ` Laurent Dufour
-1 siblings, 1 reply; 4+ messages in thread
From: Michael Ellerman @ 2015-05-11 10:31 UTC (permalink / raw)
To: Laurent Dufour, linuxppc-dev; +Cc: paulus, linux-kernel
On Tue, 2015-05-05 at 15:30:21 UTC, Laurent Dufour wrote:
> The commit 8170a83f15ee ("powerpc: Wireup the kcmp syscall to sys_ni") has
> disabled the kcmp syscall for powerpc. This has been done due to the use
> of unsigned long parameters which may require a dedicated wrapper to handle
> 32bit process on top of 64bit kernel. However in the kcmp() case, the 2
> unsigned long parameters are currently only used to carry file descriptors
> from user space to the kernel. Since such a parameter is passed through
> register, and file descriptor doesn't need to get extended, there is,
> today, no need for a wrapper.
>
> In the case there will be a need to pass address in or out of this system
> call, then a wrapper could be required, it will then be to care of it.
>
> As today this is not the case, it is safe to enable kcmp() on powerpc.
That's mostly convincing. Though I see that s390 does have a compat wrapper,
i386 doesn't. So who knows what that means.
But, there's a selftest in tools/testing/selftests/kcmp. So can you run that as
32-bit and confirm it works? Then I'd be 100% convinced :)
cheers
^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: powerpc: Enabling sys_kcmp for CRIU
2015-05-11 10:31 ` Michael Ellerman
@ 2015-05-11 11:53 ` Laurent Dufour
0 siblings, 0 replies; 4+ messages in thread
From: Laurent Dufour @ 2015-05-11 11:53 UTC (permalink / raw)
To: Michael Ellerman, linuxppc-dev; +Cc: paulus, linux-kernel
On 11/05/2015 12:31, Michael Ellerman wrote:
> On Tue, 2015-05-05 at 15:30:21 UTC, Laurent Dufour wrote:
>> The commit 8170a83f15ee ("powerpc: Wireup the kcmp syscall to sys_ni") has
>> disabled the kcmp syscall for powerpc. This has been done due to the use
>> of unsigned long parameters which may require a dedicated wrapper to handle
>> 32bit process on top of 64bit kernel. However in the kcmp() case, the 2
>> unsigned long parameters are currently only used to carry file descriptors
>> from user space to the kernel. Since such a parameter is passed through
>> register, and file descriptor doesn't need to get extended, there is,
>> today, no need for a wrapper.
>>
>> In the case there will be a need to pass address in or out of this system
>> call, then a wrapper could be required, it will then be to care of it.
>>
>> As today this is not the case, it is safe to enable kcmp() on powerpc.
>
> That's mostly convincing. Though I see that s390 does have a compat wrapper,
> i386 doesn't. So who knows what that means.
>
> But, there's a selftest in tools/testing/selftests/kcmp. So can you run that as
> 32-bit and confirm it works? Then I'd be 100% convinced :)
Hi Michael,
I was myself a bit confused about this system call, so to be sure before
sending the patch I ran the selftest/kcmp series on 64bit, 32bit, and
also build it in 32bit and run it on top of a 64bit kernel without any
trouble...
Cheers,
Laurent.
^ permalink raw reply [flat|nested] 4+ messages in thread
end of thread, other threads:[~2015-05-11 11:53 UTC | newest]
Thread overview: 4+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2015-05-05 15:30 [PATCH] powerpc: Enabling sys_kcmp for CRIU Laurent Dufour
2015-05-05 15:30 ` Laurent Dufour
2015-05-11 10:31 ` Michael Ellerman
2015-05-11 11:53 ` Laurent Dufour
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.