Received: by 2002:ab2:7407:0:b0:1f4:b336:87c4 with SMTP id e7csp259142lqn; Thu, 11 Apr 2024 23:44:47 -0700 (PDT) X-Forwarded-Encrypted: i=3; AJvYcCXTm0EUCt76M3Wj97vIKY2AQmtPZmfuUjDYJOrsVVgM9FXt97REY/R47g9X/kwRI82SeuQAch/zFepuliSi4VbqhwtUxMX/sbybpkjd4Q== X-Google-Smtp-Source: AGHT+IGgSK2K9WE1oFucoBwL6n/pnAPPQD1W8kO2ZxX3WsPW3KF/izittqHLOy68E2vo/J5L5mJn X-Received: by 2002:a2e:a0c3:0:b0:2d6:a609:9a33 with SMTP id f3-20020a2ea0c3000000b002d6a6099a33mr1100609ljm.0.1712904287813; Thu, 11 Apr 2024 23:44:47 -0700 (PDT) ARC-Seal: i=2; a=rsa-sha256; t=1712904287; cv=pass; d=google.com; s=arc-20160816; b=GYN1WefXx6ywek06+x/5RaPHHlBbRoPzRBVg4HxH8GnlEu+sRSUjqhMhlmJNxTl2VV 5rLLw6XzzVwB9G+WWFt9ZCFwHQHLapwUimcv4mq93jja/QTVBvJjpTEs+bxhvM1noVqT acS9EoimieSIBq4AIiqAw4of5ZVqQ510/f10Q6kQToYInPGplp6qjT230jdhyBKCH0HQ cC4bEwEfVKJlL9j4DnsAe65r9m8wOohHISg9Gnq10W/up1adpZaJjwpIL53r3ZkD30uy SytA9zfPfp7jmL4/L7mG6UHLx8+YbNfieIdKgNSvYgPY8WT2uLniQ6Nxk1pn1ofd268F 3vvw== 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=0bSMv1Pgb22v1XRLvY1Mxr7HZN/FDo1Oga0BlQPigIc=; fh=gP5PS6Z/8aOww6Qq3tz15UFL3g+h0vkbMungNzijpmQ=; b=RecHpYe9f9JJ13SW/XYu3IgxZFm/IDoHA8UMaxNlIvXCQy7WGZT2nxAdvmHRBc9oIy alu1eZmq77XVIGkikz1v5iSCxCIZIgaVvs9CPPqzsKhHVJh9a3muIZbzWVzLfTdhua33 HpmHmD/8rfyk1ymH9YTd5otkdS9SB/Me2NSbikn0L+rsJrd1ycUqAS5E81Ymo17qJ8N6 tA0Z7EMYCsZW1ZNhReHuiWTspJJLibpYYn+errRjcC0UHQiU5XLOTfbcczHejxq3sNlT 2QvmwozwgAkbLxo8VWucy2AEck2UBYxbh5mZ5BCKps9VaJ5Y2Yh8blmyjBBsHWZQh/rY PdZA==; dara=google.com ARC-Authentication-Results: i=2; mx.google.com; dkim=pass header.i=@kernel.org header.s=k20201202 header.b=IX+9AUAk; arc=pass (i=1 dkim=pass dkdomain=kernel.org); spf=pass (google.com: domain of linux-kernel+bounces-142059-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:4601:e00::3 as permitted sender) smtp.mailfrom="linux-kernel+bounces-142059-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org Return-Path: Received: from am.mirrors.kernel.org (am.mirrors.kernel.org. [2604:1380:4601:e00::3]) by mx.google.com with ESMTPS id u23-20020a170906b11700b00a520e4f91c7si1480915ejy.404.2024.04.11.23.44.47 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 11 Apr 2024 23:44:47 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel+bounces-142059-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:4601:e00::3 as permitted sender) client-ip=2604:1380:4601:e00::3; Authentication-Results: mx.google.com; dkim=pass header.i=@kernel.org header.s=k20201202 header.b=IX+9AUAk; arc=pass (i=1 dkim=pass dkdomain=kernel.org); spf=pass (google.com: domain of linux-kernel+bounces-142059-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:4601:e00::3 as permitted sender) smtp.mailfrom="linux-kernel+bounces-142059-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=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 5C9921F217D0 for ; Fri, 12 Apr 2024 06:44:47 +0000 (UTC) Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id 735B1482DA; Fri, 12 Apr 2024 06:44:29 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=kernel.org header.i=@kernel.org header.b="IX+9AUAk" Received: from smtp.kernel.org (aws-us-west-2-korg-mail-1.web.codeaurora.org [10.30.226.201]) (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 9A1E547A5D; Fri, 12 Apr 2024 06:44:28 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=10.30.226.201 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1712904268; cv=none; b=bl09+sSqni1+EjGJq8Dx46pNHa10NxSkLWcXKjZk7XbdqgPjrGhT2MYgVYawUKm50KWD+E9vdIioAktZojFrxP3JjSmSedEK3598blWX5JCzgcX1vQLHS78q18Ld/AE0VGp2LEzU7A+2GLpqiZwMni7VQS6r2K3jdTQrkVAe+Wo= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1712904268; c=relaxed/simple; bh=p/wEHDi9WkTon8K9W0QGAWN2QZ/PbnxknsFcFz7yp9M=; h=Date:From:To:Cc:Subject:Message-ID:References:MIME-Version: Content-Type:Content-Disposition:In-Reply-To; b=c9v72qSIL71q4ivhPBk/Er0nxHd9btG9oE/sUJMDAT6wpY0TXfPsZLg2mfzchOGAEggYW74vrMvTtYyAchxmdQCrIrLI3yxRGu9KTNwEpTu19qm29/O5x8Vlx/AMUKajBqXUmjHt92Z0km/du8J5+8c2I8xcM2f2Cn613+TkGbw= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=kernel.org header.i=@kernel.org header.b=IX+9AUAk; arc=none smtp.client-ip=10.30.226.201 Received: by smtp.kernel.org (Postfix) with ESMTPSA id B65E1C2BBFC; Fri, 12 Apr 2024 06:44:24 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1712904268; bh=p/wEHDi9WkTon8K9W0QGAWN2QZ/PbnxknsFcFz7yp9M=; h=Date:From:To:Cc:Subject:References:In-Reply-To:From; b=IX+9AUAkW6h0r9HL+ctHFkv4loKhrTf5AD7L3futOE2ncVsLk687T62Vp+OMIugqk s4GO23iJsYZAyIP4YPY3+Tu53HBDyXXK1xg1iqpfglR/CZpRfJ5ezdcgU8yw0FMnh2 eMoq9twdsdmSxmJGVd8x3z0YpCELMTyi4P5aVEerXuaXzAgppM77V4vzt6JfKV2/bi rGywNo5jF6EWnaQvYVg3RjmF19Cc9TPlEYSZv2GQ712+lf8j3gHCUuDNxiwWfRTRlD qzg2GIkd92R1n9qnC+z5K2dNCKm+qaJoesYyzHv1vFL0BMfWRqWpGsd+Rr3xZ7I7zT gNAXAs8Rs3IQA== Date: Fri, 12 Apr 2024 08:44:21 +0200 From: Christian Brauner To: Linus Torvalds Cc: Charles Mirabile , Alexander Viro , Jan Kara , linux-fsdevel@vger.kernel.org, linux-kernel@vger.kernel.org, Andrew Lutomirski , Peter Anvin Subject: Re: [PATCH] vfs: relax linkat() AT_EMPTY_PATH - aka flink() - requirements Message-ID: <20240412-zander-graustufen-bf63bbaa88fd@brauner> References: <20240411001012.12513-1-torvalds@linux-foundation.org> <20240411-alben-kocht-219170e9dc99@brauner> Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Disposition: inline In-Reply-To: On Thu, Apr 11, 2024 at 11:13:53AM -0700, Linus Torvalds wrote: > On Thu, 11 Apr 2024 at 10:35, Charles Mirabile wrote: > > > > And a slightly dubious addition to bypass these checks for tmpfiles > > across the board. > > Does this make sense? > > I 100% agree that one of the primary reasons why people want flink() > is that "open tmpfile, finalize contents and permissions, then link > the final result into the filesystem". > > But I would expect that the "same credentials as open" check is the > one that really matters. Yes. There's no need to give O_TMPFILE special status there. We also end up with a collection of special-cases which is just unpleasant.