From mboxrd@z Thu Jan 1 00:00:00 1970 From: ebiederm@xmission.com (Eric W. Biederman) Subject: Re: [PATCH v4 0/2] Add further ioctl() operations for namespace discovery Date: Thu, 26 Jan 2017 17:23:46 +1300 Message-ID: <87a8aea1pp.fsf@xmission.com> References: <93e5c7f9-9dc1-6c93-ad20-0ba053d8bfef@gmail.com> <963f76f9-3ae5-b316-e688-00d3e59cad30@gmail.com> <87d1fblx2s.fsf@xmission.com> <877f5jlvs1.fsf@xmission.com> <87tw8nkh4k.fsf@xmission.com> Mime-Version: 1.0 Content-Type: text/plain Return-path: In-Reply-To: (Michael Kerrisk's message of "Wed, 25 Jan 2017 16:50:22 +1300") Sender: linux-kernel-owner@vger.kernel.org To: "Michael Kerrisk (man-pages)" Cc: "Serge E. Hallyn" , Linux API , lkml , "linux-fsdevel@vger.kernel.org" , Andrey Vagin , James Bottomley , "W. Trevor King" , Alexander Viro List-Id: linux-api@vger.kernel.org "Michael Kerrisk (man-pages)" writes: > On 25 January 2017 at 15:28, Eric W. Biederman wrote: >> My concern is that the difference between returning -EOVERFLOW and >> overflow_uid is primarily about usability. If you haven't played with >> the usability I don't trust that we have made the proper trade off. > > So, I had not initially included the no-UID-mapping case, and when you > proposed -EOVERFLOW for that case, it seemed better. > > On reflection, mapping to the overflow_uid seems simpler. Taking the > example shown in my other mail a short time ago, the unmapped UID 0 > from the outer namespace would map to the overflow_uid (which UID my > program would print), but my program would still correctly report that > the UID 0 process in the outer namespace might (subject to LSM checks) > have capabilities in the inner namespace. > > So, it seems that reverting the EOVERFLOW change is in order (and my > example program thus needs no changes). Does that sound reasonable to > you? It does. I just care that you have thought through the tradeoffs of that corner of the interface design. Eric From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from out03.mta.xmission.com ([166.70.13.233]:49008 "EHLO out03.mta.xmission.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1750780AbdAZE2N (ORCPT ); Wed, 25 Jan 2017 23:28:13 -0500 From: ebiederm@xmission.com (Eric W. Biederman) To: "Michael Kerrisk \(man-pages\)" Cc: "Serge E. Hallyn" , Linux API , lkml , "linux-fsdevel\@vger.kernel.org" , Andrey Vagin , James Bottomley , "W. Trevor King" , Alexander Viro References: <93e5c7f9-9dc1-6c93-ad20-0ba053d8bfef@gmail.com> <963f76f9-3ae5-b316-e688-00d3e59cad30@gmail.com> <87d1fblx2s.fsf@xmission.com> <877f5jlvs1.fsf@xmission.com> <87tw8nkh4k.fsf@xmission.com> Date: Thu, 26 Jan 2017 17:23:46 +1300 In-Reply-To: (Michael Kerrisk's message of "Wed, 25 Jan 2017 16:50:22 +1300") Message-ID: <87a8aea1pp.fsf@xmission.com> MIME-Version: 1.0 Content-Type: text/plain Subject: Re: [PATCH v4 0/2] Add further ioctl() operations for namespace discovery Sender: linux-fsdevel-owner@vger.kernel.org List-ID: "Michael Kerrisk (man-pages)" writes: > On 25 January 2017 at 15:28, Eric W. Biederman wrote: >> My concern is that the difference between returning -EOVERFLOW and >> overflow_uid is primarily about usability. If you haven't played with >> the usability I don't trust that we have made the proper trade off. > > So, I had not initially included the no-UID-mapping case, and when you > proposed -EOVERFLOW for that case, it seemed better. > > On reflection, mapping to the overflow_uid seems simpler. Taking the > example shown in my other mail a short time ago, the unmapped UID 0 > from the outer namespace would map to the overflow_uid (which UID my > program would print), but my program would still correctly report that > the UID 0 process in the outer namespace might (subject to LSM checks) > have capabilities in the inner namespace. > > So, it seems that reverting the EOVERFLOW change is in order (and my > example program thus needs no changes). Does that sound reasonable to > you? It does. I just care that you have thought through the tradeoffs of that corner of the interface design. Eric