Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1753801AbbEKLxx (ORCPT ); Mon, 11 May 2015 07:53:53 -0400 Received: from e06smtp10.uk.ibm.com ([195.75.94.106]:47247 "EHLO e06smtp10.uk.ibm.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1753721AbbEKLxr (ORCPT ); Mon, 11 May 2015 07:53:47 -0400 Message-ID: <55509844.7010304@linux.vnet.ibm.com> Date: Mon, 11 May 2015 13:53:40 +0200 From: Laurent Dufour User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:31.0) Gecko/20100101 Thunderbird/31.6.0 MIME-Version: 1.0 To: Michael Ellerman , linuxppc-dev@lists.ozlabs.org CC: paulus@samba.org, linux-kernel@vger.kernel.org Subject: Re: powerpc: Enabling sys_kcmp for CRIU References: <20150511103115.DFE85140187@ozlabs.org> In-Reply-To: <20150511103115.DFE85140187@ozlabs.org> Content-Type: text/plain; charset=windows-1252 Content-Transfer-Encoding: 7bit X-TM-AS-MML: disable X-Content-Scanned: Fidelis XPS MAILER x-cbid: 15051111-0041-0000-0000-000004329AA7 Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Length: 1683 Lines: 37 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. -- To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/