Received: by 2002:ac0:aed5:0:0:0:0:0 with SMTP id t21csp6930756imb; Sat, 9 Mar 2019 10:17:04 -0800 (PST) X-Google-Smtp-Source: APXvYqx2DniE+mOwLXCar8l3TIOmSEG2d9Bu2zb8DSjl8QtONu3De0sAmadq8Q7xvXVilfQi/Pc6 X-Received: by 2002:a17:902:8c95:: with SMTP id t21mr24755758plo.300.1552155424654; Sat, 09 Mar 2019 10:17:04 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1552155424; cv=none; d=google.com; s=arc-20160816; b=fFGss8VD2cleTSbANwHMRmfzgH87Er9/UxhyLovCnY1J8HIUFwXk8ofv2DvBVQuM9t 5QiIh45hyM7RRd5lRngvk97/hffiIPQhv06ZgUsgMa0dYYCJUJVrvn+kQwjveH4I+VtS YUbV7q2s5ifLVi/CQeJlyFNoNqtuwTx2yE/hzbYxs43wirE/FDLz5Gw+70taugFISsYE kvqDd/vopO3HYxFYRWg5ylW6mMfwrSrJpWxpkWW2mo1r40Txk6zXwgFLCp+gt5pT0WdU DoMhzRlLk7zJdESxitptyNJm92CU912aYmFlThXV8pbFm4PJtkMVAVQDZGPA98pQPAgu Fgfw== 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 :in-reply-to:references:mime-version:dkim-signature; bh=0/PlK7wNBa6EZ0JOE2V9Wm27AX+5iyxV4H0wnT9W3zo=; b=asrwRP2U+/guYD5whpw7wJgAXJYFIiswqXoaHoMxvfiiuWH6PNJijDSm3VHU/42K7Q VVGvSJZ5ex0FweWLuXydKvvnHgEObctz6QVjtf3O3hNn+mVaHYfz0vBUvF6mjx1+teOS sW4IBL11rsYEmqgrjQFWN+f6xLAklFmFczK4cBlriPEKi8b+S02QnS8tgd5t83QF/7Md QwPT6xhVC3PkzdIsAkq9SMTxGA2klVE4qsyH2DnCML1mrzJcCn7NsrlffJlb1+AbVGfm 2oubkmdxeKe0PcmftPQOHRlLpnLsRLOKtPVn84gqitKtEyyCWUD8w38XOc6TdKBK7MG/ IgZw== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linux-foundation.org header.s=google header.b=AjZmVZkO; 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 n16si1014170pgj.27.2019.03.09.10.16.49; Sat, 09 Mar 2019 10:17:04 -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=pass header.i=@linux-foundation.org header.s=google header.b=AjZmVZkO; 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 S1726444AbfCISQW (ORCPT + 99 others); Sat, 9 Mar 2019 13:16:22 -0500 Received: from mail-lf1-f66.google.com ([209.85.167.66]:36224 "EHLO mail-lf1-f66.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726348AbfCISQW (ORCPT ); Sat, 9 Mar 2019 13:16:22 -0500 Received: by mail-lf1-f66.google.com with SMTP id 197so612868lfz.3 for ; Sat, 09 Mar 2019 10:16:21 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linux-foundation.org; s=google; h=mime-version:references:in-reply-to:from:date:message-id:subject:to :cc; bh=0/PlK7wNBa6EZ0JOE2V9Wm27AX+5iyxV4H0wnT9W3zo=; b=AjZmVZkOQcBB9u8SHXCF0UiVkyA8JvvALO4xP76q3B/H0gwxpGHxBEXDnH0GJeuoRW 3JA/56849O1/kJLAqrJIugjnpi8GuqkM+yPkYSkLiv/LxXp2sr/hNkAzPRt0/UXujkMN YFjEahIgbrn+A13I5emBjzJXMzC51MtcVReo8= X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:references:in-reply-to:from:date :message-id:subject:to:cc; bh=0/PlK7wNBa6EZ0JOE2V9Wm27AX+5iyxV4H0wnT9W3zo=; b=PUGAXDhxdZsyWY5vA+URGOY+48/I0f4y/LKzQMojEGdLV+S2nTTPRXQ3XwBKOdaufv ahnFIKLMDuyI8fOFHFys8N1Hidn15ep7+YHkfz/oZyEzloFmVqmyDqTdiJTPi4exkRdp hrfKyH60qoKFI8rBuy+Oc4jq9kk+0hucgR3OMEiGg93vVl0PG7JuNV6QkKn5astwOR8n QrgIaWw+8PnJCYcm3uDcRUTV/1ii7DOGL8rxmi5v04Xiy1xY6swMczE/Swg/jF74qwza BJxvPhp7aj4IpWhrWOCBRJPjLCTg7mCc8/0bKXDvkRb4debWFFDrbN1TLWtVUsNkxHUf GGIg== X-Gm-Message-State: APjAAAX5kih3MSaCmKSPkxTIwaLk6AZquAClUndGILujemh8p2Q8hjWU Cz45adlnA+UiJgb7tXuJ+FKEiArvKpk= X-Received: by 2002:a19:5503:: with SMTP id n3mr14354051lfe.35.1552155380080; Sat, 09 Mar 2019 10:16:20 -0800 (PST) Received: from mail-lf1-f51.google.com (mail-lf1-f51.google.com. [209.85.167.51]) by smtp.gmail.com with ESMTPSA id 13sm202695lju.27.2019.03.09.10.16.19 for (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Sat, 09 Mar 2019 10:16:19 -0800 (PST) Received: by mail-lf1-f51.google.com with SMTP id h6so618183lfc.2 for ; Sat, 09 Mar 2019 10:16:19 -0800 (PST) X-Received: by 2002:ac2:424c:: with SMTP id m12mr14199023lfl.62.1552154904904; Sat, 09 Mar 2019 10:08:24 -0800 (PST) MIME-Version: 1.0 References: <20190306191244.8691-1-cyphar@cyphar.com> <20190306191244.8691-3-cyphar@cyphar.com> <20190309172631.ygfdhrn4rcwkgfmk@brauner.io> In-Reply-To: <20190309172631.ygfdhrn4rcwkgfmk@brauner.io> From: Linus Torvalds Date: Sat, 9 Mar 2019 10:08:08 -0800 X-Gmail-Original-Message-ID: Message-ID: Subject: Re: [PATCH RESEND v5 2/5] namei: O_BENEATH-style path resolution flags To: Christian Brauner Cc: Aleksa Sarai , Al Viro , Jeff Layton , "J. Bruce Fields" , Arnd Bergmann , David Howells , Eric Biederman , Kees Cook , David Drysdale , Andy Lutomirski , Andrew Morton , Alexei Starovoitov , Jann Horn , Chanho Min , Oleg Nesterov , Aleksa Sarai , containers@lists.linux-foundation.org, linux-fsdevel , Linux API , Linux List Kernel Mailing , linux-arch 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 Sat, Mar 9, 2019 at 9:26 AM Christian Brauner wrote: > > Aside from that I want to point out that it is non-trivial to do this in > user space. Oh, absolutely agreed. It's easy to do it in the kernel, and doing it anywhere else ends up having horrible races that the kernel has to deal with and has long solved anyway. I've only seen this (2/5) patch, so I won't comment on the other ones, but this still makes sense to me. Al, comments? Linus