Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1753114AbcD2QWr (ORCPT ); Fri, 29 Apr 2016 12:22:47 -0400 Received: from mail-oi0-f43.google.com ([209.85.218.43]:33056 "EHLO mail-oi0-f43.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1752670AbcD2QWp (ORCPT ); Fri, 29 Apr 2016 12:22:45 -0400 MIME-Version: 1.0 In-Reply-To: <820e57306e342ca310414ed0f58e75ac99731871.1458072215.git.luto@kernel.org> References: <820e57306e342ca310414ed0f58e75ac99731871.1458072215.git.luto@kernel.org> From: Andy Lutomirski Date: Fri, 29 Apr 2016 09:22:24 -0700 Message-ID: Subject: Re: [PATCH v2] devpts: Make ptmx be owned by the userns owner as a fallback To: Andy Lutomirski Cc: Linux FS Devel , "linux-kernel@vger.kernel.org" , "Eric W. Biederman" , gnome-os-list@gnome.org, James Bottomley , Serge Hallyn , Alexander Larsson , mclasen@redhat.com, Linux Containers Content-Type: text/plain; charset=UTF-8 Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Length: 792 Lines: 22 On Tue, Mar 15, 2016 at 1:05 PM, Andy Lutomirski wrote: > New devpts instances have ptmx owned by the inner uid and gid 0. > > For container-style namespaces (LXC, etc), this should have no > effect, this is fine. > > For sandbox-style namespaces (xdg-app and similar), this is > problematic -- there may not be an inner 0:0. If that happens, > devpts mounts will fail. > > Fix it by adding a fallback: if 0:0 is not mapped but the userns > owner and group are mapped, then ptmx will be owned by the namespace > owner. > > This won't change behavior except in cases where mount would > currently return -EINVAL. Eric, this patch is straightforward, fixes a real problem, and is mostly orthogonal to the devpts stuff you're working on. Could you apply it for 4.7? --Andy