Received: by 10.223.185.116 with SMTP id b49csp5469217wrg; Wed, 7 Mar 2018 12:17:45 -0800 (PST) X-Google-Smtp-Source: AG47ELvPiLjJguqWiVuKDSil0suF0baiNzW5i2nzMX6zOh4T+lSnUxO/XPY0+umxDKP9qzQQcppt X-Received: by 2002:a17:902:2845:: with SMTP id e63-v6mr21525896plb.389.1520453865255; Wed, 07 Mar 2018 12:17:45 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1520453865; cv=none; d=google.com; s=arc-20160816; b=keyUzS3g660Uwn+xgAZ59S5h8HSXNzJB5KAo7uYLFIyr2Yt6wLWb8KpIzfOGjX5H6L LGq5ZQPxZSbDnZUIex0f3S5bgibqA3lGcp/j6zkleaJEBq+JRH7/MCCSrghdx6vZPk0h P+Hmf4aIVGEULGIskvW5Fbo28zGty1jachc+1IXmN9EWMd/Tu2JhBvrUdzRE+OgaEqmd YiA9f4TyaC2xOh9hCVMDCSzkxLXHLF3xejqhNT/VCTf08YTaOT6ZigNqx2gC1/o0zon6 1oRb/J48HKSQRZBJIpd8Z9Iv15JxMpc3mvhTE5FpD5MVsP3T3V6m18W7NrqquEsnd8Xh q7eA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:cc:to:subject:message-id:date:from :references:in-reply-to:mime-version:dkim-signature:dkim-signature :arc-authentication-results; bh=a8HKwVvdwV3iMHuSHbW1VtfQGMBHKHElfHmJFQcpOsg=; b=zW05KP82Pkzs8s/4davmWm0SKfjEqV+O/NTPpqfvsXBnXOTI369pbxBSthhxsb0l9O pEmQ9WEI8Ub7dTs4cMikgTegrpUSguggEubA11ILULaGA0EWfCquZkOaTYkHOejuRYD0 Qt2XLjz9fAugdkzqDYPeeSrH854zzLwH7EBhCUDInOUZsjg1bEAibI42DlY7Xv+3efok UaOy+YzKzrNwUPKp47V3iSflEvcavNA1z2UIzCuppjVqsZucRm5vFNvICWj/0QLHhkXQ +Qz16VEHjblJh5T9XNzFGUW4JvrUDmYwWaOW7M47wQ4g4EluRuZla9PGib0iYZkPSoIx H5Kw== ARC-Authentication-Results: i=1; mx.google.com; dkim=fail header.i=@gmail.com header.s=20161025 header.b=oBvw7TS5; dkim=fail header.i=@linux-foundation.org header.s=google header.b=O9nunZtA; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id c4si11778018pgu.355.2018.03.07.12.17.30; Wed, 07 Mar 2018 12:17:45 -0800 (PST) Received-SPF: pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; dkim=fail header.i=@gmail.com header.s=20161025 header.b=oBvw7TS5; dkim=fail header.i=@linux-foundation.org header.s=google header.b=O9nunZtA; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S965135AbeCGTon (ORCPT + 99 others); Wed, 7 Mar 2018 14:44:43 -0500 Received: from mail-it0-f52.google.com ([209.85.214.52]:55644 "EHLO mail-it0-f52.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S965096AbeCGTog (ORCPT ); Wed, 7 Mar 2018 14:44:36 -0500 Received: by mail-it0-f52.google.com with SMTP id n136so2194060itg.5 for ; Wed, 07 Mar 2018 11:44:36 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=mime-version:sender:in-reply-to:references:from:date:message-id :subject:to:cc; bh=a8HKwVvdwV3iMHuSHbW1VtfQGMBHKHElfHmJFQcpOsg=; b=oBvw7TS5kIsqZkcSg++bH4GkOFFm1mn6mxxT97pze5FuenBOEPJYPEAiaZ4wFN6LkW zdwPcilI2KrawJRtyAdme/mC13pP/0kyXpQ89v79xjfpmUGAa36S7aWNZ5TQiPrO/d4b L8Zf0enr9oKl+OtTVTGEkY1UK80JBQIdp1IVM22ewkPkh0Kb9un1xefFIFmIrvBVby7C zJLLeTH8fPo5icw+ffLZ9JehPc6Gv5OCxAAo6B5RbyMhLx7LsTMzVCtc7gEC9+76Vizy pRp3H3VTIRgEn19Ohs6slVEe/pDaQG5q27AJBF0wguaOeELLGIHgRUbzl0FIUkx+FyHD 88nA== DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linux-foundation.org; s=google; h=mime-version:sender:in-reply-to:references:from:date:message-id :subject:to:cc; bh=a8HKwVvdwV3iMHuSHbW1VtfQGMBHKHElfHmJFQcpOsg=; b=O9nunZtAhOKrCJy2o5FGnLJtotaZpNCxkuS61bJQAeIbcfWZ1q/jrEWr/i4o/kQbaW R3mZ462+BKi/e3dKQxT8qHcosnK1bJ6vPNO9ZGxxaZXuc/yTWxrZ4gzc2wx2gcvfgskw rBgO7/ek5zUKVrzYS3veJ5v9SXWFslVoDkMIM= X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:sender:in-reply-to:references:from :date:message-id:subject:to:cc; bh=a8HKwVvdwV3iMHuSHbW1VtfQGMBHKHElfHmJFQcpOsg=; b=Xvp6J+cRuGN4JmbRb1oUPNNdr+8Vhe3BgjIBqIon4knaZNJGdeOhNuBjJEHBph4Bib 7ji3LyWXFt+OV+eJbtKdEE6K8uRi+qU9Zfrbw2XAo2aJOXUjFcBrbU1UAiTqU0HVlTwW S1WKtDF7Hq7oPJpUQO0jwKDqoGd1An+9V1pwimJlvxqBU7Xxa4B56Y993dGlV7AGOysR EyeA+gJD29mTCJWcVOiogixpVM5M4J6IIhFmcloeyj+kt2/1+7nKEQSRwI3edSdXbv3Q xFdIvNip1Xix4Nj71yDD4lnTPFjw6VK9nHQRIJdKbMlcNZ+2Bt3q5WgVPKL4giLTZ/zz IjTA== X-Gm-Message-State: AElRT7H1qcsnq88u2WSQroy0javG4Nl9ZoqlezIRnGbYM66IVDdRO09A mOxjqfj+GfwadGwWx1ni7JfuA3bXM9Io8Qh/JXk= X-Received: by 10.36.89.137 with SMTP id p131mr24494593itb.113.1520451875586; Wed, 07 Mar 2018 11:44:35 -0800 (PST) MIME-Version: 1.0 Received: by 10.107.135.221 with HTTP; Wed, 7 Mar 2018 11:44:35 -0800 (PST) In-Reply-To: <20180307161744.GA17562@gmail.com> References: <20180307161744.GA17562@gmail.com> From: Linus Torvalds Date: Wed, 7 Mar 2018 11:44:35 -0800 X-Google-Sender-Auth: Z_eUwLQGG-1IVVBUrM7EU2sQTqw Message-ID: Subject: Re: Invalid /proc//fd/{0,1,2} symlinks with TIOCGPTPEER To: Christian Brauner , Al Viro Cc: Linux Kernel Mailing List , "Eric W. Biederman" Content-Type: text/plain; charset="UTF-8" Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Wed, Mar 7, 2018 at 8:17 AM, Christian Brauner wrote: > > unshare --mount > mount --bind /dev/pts/ptmx /dev/ptmx > chmod 666 /dev/ptmx Oh. Why are you using a bind mount in the first place? Anyway, I guess we just have to add another special case for this. Which doesn't look horrible. Right now path_pts() just does ret = path_parent_directory(path); and that simply doesn't work for a bind mount file. I think we could just change path_parent_directory() to go through file bind mounts. The other user is follow_dotdot(), but that always takes a directory, so it wouldn't be affected. But it's probably safer to just teach path_pts to just walk up the bind mount first, and then do the existing path_parent_directory. Anybody want to just try that thing? Linus