Received: by 2002:ab2:7903:0:b0:1fb:b500:807b with SMTP id a3csp1380180lqj; Mon, 3 Jun 2024 22:22:33 -0700 (PDT) X-Forwarded-Encrypted: i=3; AJvYcCVDhxChBesbEas+bZTVDqVtZe+pwp1mg+w20UM9T1UVRrrbjxZQeDh9Hi+CqJKOjDS4lqeNMBPuT2tgXqU4xc/YxBk98RzxsD36bUuv9g== X-Google-Smtp-Source: AGHT+IGPTCTEN2YEgIxZXaqonTwckTZbjhBIqHLYDB2JfBnLedlO9JFyx8eEh29qFYRBIZ1rE/uK X-Received: by 2002:a50:d4d6:0:b0:57a:2a56:8a37 with SMTP id 4fb4d7f45d1cf-57a36372cd3mr7197169a12.13.1717478553197; Mon, 03 Jun 2024 22:22:33 -0700 (PDT) ARC-Seal: i=2; a=rsa-sha256; t=1717478553; cv=pass; d=google.com; s=arc-20160816; b=ZyuBEYir5lTqjKahhk2SrUzpdFnsd+h2EjnKW2kuj/Es0ZmpxUCNqQPt4mWakSjO2X LpIm0tKw4cwxs+IyDFVepC1zmJMt5qDmq3ZGJyZqn/jXrg12dnuo6Bq3P+MX3b82a+2u ZH8/ojrQOeCX+dIlfSfEvQGlWvIpBdb4Ar5WppRUqVvG72kWOgf8vA4iVzUqO7uS96xv SJ+cwjVfeQ0lSMlzAgGNJn1srYbv3hp9hoWHqt0bVaAM/ouXqSDg4KpBO8OUDu4yf1g/ UfKaETzK/VX5y2827gbYmEgsfHNXdCnTmtMrSWhL+iRW/GC0mVR42pcPrg34ztsTykFU sWGg== ARC-Message-Signature: i=2; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=in-reply-to:content-disposition:mime-version:list-unsubscribe :list-subscribe:list-id:precedence:references:message-id:subject:cc :to:from:date:dkim-signature; bh=1mOyWxoB94x5TWgcP2yO2aQH6LrzarpsrO8qe7Bl0N4=; fh=SnnecqZRHwtX2vbamLiqMAyk6cJzT5n7ZG3lnsPwFeg=; b=Cmve7HF/GcNRTBVwKcYj0RGabNSxZlpGcTuyngPhibGgigQDEl2y/i5dplbqPcpZ/W AYdBLqlmfPaJqAWvVn79IzuP70NLIFDtINdCc3JG3cQuwWXbw6AXw23W9P6fxJP/rQ7w 8y3ooLa/ZH1od6dUZ9dGwVVTgsDBPpdprl16slS7JKly1Gf3y7C5ChoQpuA3+App5j9P ISQilQCWvrsbSqAxTrByi/PUjqFIdoKMBjJVoMeBMKVSOQ7fQ5h31uwd627OyUTf6Lkl u86QAUBdoO5d4U0jHX7TFOjVEgZ1gO2UtHISNkSr3+Ymd/xZTYipzJ6JWnaCczpn7O0u n53A==; dara=google.com ARC-Authentication-Results: i=2; mx.google.com; dkim=pass header.i=@infradead.org header.s=bombadil.20210309 header.b=EkwUzVRb; arc=pass (i=1 dkim=pass dkdomain=infradead.org); spf=pass (google.com: domain of linux-nfs+bounces-3539-linux.lists.archive=gmail.com@vger.kernel.org designates 147.75.80.249 as permitted sender) smtp.mailfrom="linux-nfs+bounces-3539-linux.lists.archive=gmail.com@vger.kernel.org" Return-Path: Received: from am.mirrors.kernel.org (am.mirrors.kernel.org. [147.75.80.249]) by mx.google.com with ESMTPS id 4fb4d7f45d1cf-57a31b815a7si4585447a12.109.2024.06.03.22.22.33 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 03 Jun 2024 22:22:33 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-nfs+bounces-3539-linux.lists.archive=gmail.com@vger.kernel.org designates 147.75.80.249 as permitted sender) client-ip=147.75.80.249; Authentication-Results: mx.google.com; dkim=pass header.i=@infradead.org header.s=bombadil.20210309 header.b=EkwUzVRb; arc=pass (i=1 dkim=pass dkdomain=infradead.org); spf=pass (google.com: domain of linux-nfs+bounces-3539-linux.lists.archive=gmail.com@vger.kernel.org designates 147.75.80.249 as permitted sender) smtp.mailfrom="linux-nfs+bounces-3539-linux.lists.archive=gmail.com@vger.kernel.org" Received: from smtp.subspace.kernel.org (wormhole.subspace.kernel.org [52.25.139.140]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by am.mirrors.kernel.org (Postfix) with ESMTPS id DBF8A1F21486 for ; Tue, 4 Jun 2024 05:22:32 +0000 (UTC) Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id 8123113D612; Tue, 4 Jun 2024 05:22:27 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=infradead.org header.i=@infradead.org header.b="EkwUzVRb" X-Original-To: linux-nfs@vger.kernel.org Received: from bombadil.infradead.org (bombadil.infradead.org [198.137.202.133]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id 3CF877C6D5; Tue, 4 Jun 2024 05:22:25 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=198.137.202.133 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1717478547; cv=none; b=U+cXNIyQrJ9GdkXIwMVcvuQuPB7OIhXz33vbqwYRb90UNs4UHbcacTCErpFdHvvDEmY7/das18PcmjA0qy5YXCo4uzNoX+e7hIhC4sX5fAYQ9oN83gjbcHtVoPDCZ7mjnT5TGtYmCavLHJ/k4ItptX6NMj3Ajw3GtLHVXz9To9g= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1717478547; c=relaxed/simple; bh=mr8J9SWdsAEvT+DfxSemt3ZV6Jo5MqmVNgY1EU4+3qo=; h=Date:From:To:Cc:Subject:Message-ID:References:MIME-Version: Content-Type:Content-Disposition:In-Reply-To; b=oIVNi5uvan8yZZ2WFblYXseVIrsap3E+Rkib993mOI7OG7zdhgYKcV/63ejctyel4+ELcjplZhD+tAhZ5O2dZ5dZvAfEb47ZFKK9vRkwT5cPCNxoH17OmNeUDiKXVe+Zb+7sFryV5nglu2F0w0hPFN51NVJ0tdwlEnzqSFx8PHI= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dmarc=none (p=none dis=none) header.from=infradead.org; spf=none smtp.mailfrom=bombadil.srs.infradead.org; dkim=pass (2048-bit key) header.d=infradead.org header.i=@infradead.org header.b=EkwUzVRb; arc=none smtp.client-ip=198.137.202.133 Authentication-Results: smtp.subspace.kernel.org; dmarc=none (p=none dis=none) header.from=infradead.org Authentication-Results: smtp.subspace.kernel.org; spf=none smtp.mailfrom=bombadil.srs.infradead.org DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=infradead.org; s=bombadil.20210309; h=In-Reply-To:Content-Type:MIME-Version :References:Message-ID:Subject:Cc:To:From:Date:Sender:Reply-To: Content-Transfer-Encoding:Content-ID:Content-Description; bh=1mOyWxoB94x5TWgcP2yO2aQH6LrzarpsrO8qe7Bl0N4=; b=EkwUzVRbUjCUAryPsum/6jNKfP TzkL+n4jlvpRo+Q4sJaGt3s8z75bqjCl/ri13WcRaHciG43y+4zdbvFeeaku4FC3bKtquzL8gW+92 EB1XPbfDarMHN2xuINhmSd4ljpIr0PCxOCRsIb0tOz10zwBHg58IYV9cQbsJvGZQP6QrMYwn9FXoU FPwMf6lifDua5cGX/WBqWXijWnzN+HMnGR5Y2nC/QD1EGA0YREYy2gp0q8Lb7yaxfpb/729GRToj9 j47jKSZsOWTEw1XEas+B5hk5Tus1v4/+TPBfLxBodrN6QZjWOXYXsb7vO0KSLFJg2D99kmacsc3m7 E/1jURLQ==; Received: from hch by bombadil.infradead.org with local (Exim 4.97.1 #2 (Red Hat Linux)) id 1sEMco-00000001GJE-30tG; Tue, 04 Jun 2024 05:22:22 +0000 Date: Mon, 3 Jun 2024 22:22:22 -0700 From: Christoph Hellwig To: Aleksa Sarai Cc: Miklos Szeredi , Christoph Hellwig , Christian Brauner , Jan Kara , Alexander Viro , Chuck Lever , Jeff Layton , Amir Goldstein , Alexander Aring , linux-fsdevel@vger.kernel.org, linux-nfs@vger.kernel.org, linux-kernel@vger.kernel.org, linux-api@vger.kernel.org Subject: Re: [PATCH RFC v2] fhandle: expose u64 mount id to name_to_handle_at(2) Message-ID: References: <20240527133430.ifjo2kksoehtuwrn@quack3> <20240528-wachdienst-weitreichend-42f8121bf764@brauner> <20240528-gesell-evakuieren-899c08cbfa06@brauner> <20240528-gipfel-dilemma-948a590a36fd@brauner> <20240529.013815-fishy.value.nervous.brutes-FzobWXrzoo2@cyphar.com> Precedence: bulk X-Mailing-List: linux-nfs@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20240529.013815-fishy.value.nervous.brutes-FzobWXrzoo2@cyphar.com> X-SRS-Rewrite: SMTP reverse-path rewritten from by bombadil.infradead.org. See http://www.infradead.org/rpr.html On Sat, Jun 01, 2024 at 01:12:31AM -0700, Aleksa Sarai wrote: > Not to mention that providing a mount fd is what allows for extensions > like Christian's proposed method of allowing restricted forms of > open_by_handle_at() to be used by unprivileged users. As mentioned there I find the concept of an unprivileged open_by_handle_at extremely questionable as it trivially gives access to any inode on the file systems. > If file handles really are going to end up being the "correct" mechanism > of referencing inodes by userspace, They aren't. > then future API designs really need > to stop assuming that the user is capable(CAP_DAC_READ_SEARCH). There is no way to support open by handle for unprivileged users. The concept of an inode number based file handle simply does not work for that at all.