From mboxrd@z Thu Jan 1 00:00:00 1970 From: Janak Desai Subject: Re: [RFC][patch 1/2] new system call, unshare Date: Wed, 11 May 2005 08:11:59 -0400 Message-ID: <4281F68F.9040508@us.ibm.com> References: <20050510194422.4068.qmail@lwn.net> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii; format=flowed Content-Transfer-Encoding: 7bit Cc: linux-fsdevel@vger.kernel.org Return-path: Received: from e1.ny.us.ibm.com ([32.97.182.141]:54475 "EHLO e1.ny.us.ibm.com") by vger.kernel.org with ESMTP id S261163AbVEKMM2 (ORCPT ); Wed, 11 May 2005 08:12:28 -0400 Received: from d01relay04.pok.ibm.com (d01relay04.pok.ibm.com [9.56.227.236]) by e1.ny.us.ibm.com (8.12.11/8.12.11) with ESMTP id j4BCCPEw007544 for ; Wed, 11 May 2005 08:12:25 -0400 Received: from d01av03.pok.ibm.com (d01av03.pok.ibm.com [9.56.224.217]) by d01relay04.pok.ibm.com (8.12.10/NCO/VER6.6) with ESMTP id j4BCCPc0117170 for ; Wed, 11 May 2005 08:12:25 -0400 Received: from d01av03.pok.ibm.com (loopback [127.0.0.1]) by d01av03.pok.ibm.com (8.12.11/8.13.3) with ESMTP id j4BCCFTl010636 for ; Wed, 11 May 2005 08:12:15 -0400 To: Jonathan Corbet In-Reply-To: <20050510194422.4068.qmail@lwn.net> Sender: linux-fsdevel-owner@vger.kernel.org List-Id: linux-fsdevel.vger.kernel.org Jonathan Corbet wrote: > Janak Desai wrote: > > >>+asmlinkage long sys_unshare(unsigned long unshare_flags) >>+{ >>[...] >> >>+ if (!(unshare_flags & (CLONE_NEWNS | CLONE_VM | CLONE_SIGHAND))) >>+ goto bad_unshare_invalid_val; > > > If I read this function correctly, it will silently ignore any flags > other than the three above, as long as at least one of those three is > present. It might be a good idea to fail the call if any unrecognized > flags are present or you risk changing application behavior in the > future if any new flags are added. > Ok, thanks Jonathan. I will update the patch accordingly. -Janak