Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > linux.kernel > #1391279

Re: [PATCH v2] devpts: Make ptmx be owned by the userns owner as a fallback

Path csiph.com!eternal-september.org!feeder.eternal-september.org!border1.nntp.ams1.giganews.com!nntp.giganews.com!news.panservice.it!bofh.it!news.nic.it!robomod
From Andy Lutomirski <luto@amacapital.net>
Newsgroups linux.kernel
Subject Re: [PATCH v2] devpts: Make ptmx be owned by the userns owner as a fallback
Date Fri, 29 Apr 2016 18:30:04 +0200
Message-ID <rtjsM-HD-53@gated-at.bofh.it> (permalink)
References <rd3rX-73e-15@gated-at.bofh.it>
X-Original-To Andy Lutomirski <luto@kernel.org>
Dkim-Signature v=1; a=rsa-sha256; c=relaxed/relaxed; d=amacapital-net.20150623.gappssmtp.com; s=20150623; h=mime-version:in-reply-to:references:from:date:message-id:subject:to :cc; bh=SYZDVsfTPE5RzTzwOoupwP1+3xcxtOAMrTQm1TlSebM=; b=I4g1nNdBomFxXh+RsahCon402Zp7F6wDixY4x7cC2M5Jw1BNrb5Yfc7GSLOkkUF6/p A/hv+kMlB+cD8Fs8lZQmlF4aiTgq/x2O5iZ3OMFv+a/kLS6jJDxEvjKM0wfMkZ+8pH8T ++Dcqoo5ze8IRiXo/HZolNWrZpv62dd+Krm7WJWQ90RLNeaLQ+L2Uk43QZiH4SW7AXxt p478B22eAKeAr4TdcxbKCXAiSJ9JJbEssRD7ezcrU0R34z46EDVMbKM8faeqxYwoo/aD 5DAxYGCA9R0yNSAZ72Uz6ikRi6uImj9gH64vUOLnXSwNJQXlgwcvRKWFQX8ZY7YVRPhX HKVA==
X-Google-Dkim-Signature v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20130820; h=x-gm-message-state:mime-version:in-reply-to:references:from:date :message-id:subject:to:cc; bh=SYZDVsfTPE5RzTzwOoupwP1+3xcxtOAMrTQm1TlSebM=; b=TXWfKQvMn6QwU4FCjWPnjhDxR0T8PsZy0G72IlvXeDnU0HsJZP1BkBolcfd/3jQRKU Sm/Ra3Fhh3LArmqlbL4CisUQGRkaoMfs7IoXKQAj67cQIHi82zQzPgDyMn/5lycqUF22 KXfkGhwBUDufsUU/HkUerqG4zeFOITKSCT9EjPxgInWIZE7IcM/jixX3X+1uxJeCxEGV o3495CizZ9tPZ8j4GDBUimC4A0uerJQ5PX/KvTL9tMqNv5cjGmnYq6Ql8N0SCqTifswH dK/Krmt1vhr4IHeGCobYTg9izczSiatkVDjqXT1mkPcKej3ZVfGkT6MBn2DeajLJrvIP h4Qw==
X-Gm-Message-State AOPr4FVm9NAt8n5VI/iQYBYuo5+G2jTdppVqvFxmNuM9M00PQnfs5ukLdDLZVPyTo4D0W9KkkfgTRUuSE4pD8D43
X-Received by 10.202.61.85 with SMTP id k82mr9784705oia.114.1461946964554; Fri, 29 Apr 2016 09:22:44 -0700 (PDT)
MIME-Version 1.0
Content-Type text/plain; charset=UTF-8
Sender robomod@news.nic.it
List-ID <linux-kernel.vger.kernel.org>
X-Mailing-List linux-kernel@vger.kernel.org
Approved robomod@news.nic.it
Lines 22
Organization linux.* mail to news gateway
X-Original-Cc Linux FS Devel <linux-fsdevel@vger.kernel.org>, "linux-kernel@vger.kernel.org" <linux-kernel@vger.kernel.org>, "Eric W. Biederman" <ebiederm@xmission.com>, gnome-os-list@gnome.org, James Bottomley <James.Bottomley@hansenpartnership.com>, Serge Hallyn <serge.hallyn@ubuntu.com>, Alexander Larsson <alexl@redhat.com>, mclasen@redhat.com, Linux Containers <containers@lists.linux-foundation.org>
X-Original-Date Fri, 29 Apr 2016 09:22:24 -0700
X-Original-Message-ID <CALCETrUJFgOHE5S2Drg1TiXjJFCNC2CKWerSEj_wk9Rrdv1JFg@mail.gmail.com>
X-Original-References <820e57306e342ca310414ed0f58e75ac99731871.1458072215.git.luto@kernel.org>
X-Original-Sender linux-kernel-owner@vger.kernel.org
Xref csiph.com linux.kernel:1391279

Show key headers only | View raw


On Tue, Mar 15, 2016 at 1:05 PM, Andy Lutomirski <luto@kernel.org> 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

Back to linux.kernel | Previous | Next | Find similar | Unroll thread


Thread

Re: [PATCH v2] devpts: Make ptmx be owned by the userns owner as a fallback Andy Lutomirski <luto@amacapital.net> - 2016-04-29 18:30 +0200

csiph-web