Received: by 2002:ab2:7041:0:b0:1f4:bcc8:f211 with SMTP id x1csp18646lql; Fri, 12 Apr 2024 02:08:49 -0700 (PDT) X-Forwarded-Encrypted: i=3; AJvYcCVXbSALO1YhF0j8NqFRz5sLOik2Ysx7Pu+FveABDN5gC2ZOBic/kh+McgA0GkKRpMvneg3CxrfXKdjniBQZHihDKf+6JCXbobYUaDdhfQ== X-Google-Smtp-Source: AGHT+IHp0rmgKt7hxqPgmVHJnPPzsiGb2DHfpouzdImkriJTU/a+jYKWrXpiQG+Qp/q2FTRMZKVk X-Received: by 2002:a05:620a:28c2:b0:78e:c36b:5997 with SMTP id l2-20020a05620a28c200b0078ec36b5997mr2428179qkp.10.1712912929129; Fri, 12 Apr 2024 02:08:49 -0700 (PDT) ARC-Seal: i=2; a=rsa-sha256; t=1712912929; cv=pass; d=google.com; s=arc-20160816; b=Dx7SinmUhGrucIEMwXMa8fQd+OxblKUfRHOuoHr6YOLSTJRlSy1mY1oImVBquY8tzk FikfnKUxqew/yUgziSsPzIkBSAV2Rn/nVPvgjJg7w0IIWF4l9yhEDSOEwnC3m6Pyhz7I lg54nTyuDegRVHsqEtsV2JlJlaITQAEL8078r3dtcPij5xrlLAiC87keWtDKe970vaDz r9ohX6dsnAawvEUkH3gBLiVGY0cnGfuB7k5f389N9lBivX5sKlnszW9dz4aNynSBe2iD VOyd3W7g3FIvUD6lqbXpbvh5e5n1u+YmJKmIIEo3wSY2VU13CkMbmKjgK+QHMAznJY7k /Mgg== ARC-Message-Signature: i=2; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=content-transfer-encoding:mime-version:list-unsubscribe :list-subscribe:list-id:precedence:references:in-reply-to:message-id :date:subject:cc:to:from:dkim-signature; bh=/JPO5J9BERhd61oLnC2I4oEAU+EE9d+semcP4JykpVE=; fh=1XHQWLwpU0CNbpF5Vh2otFxONlp+sDVhMI1KOD4Q2HQ=; b=UZQ2Hg1/x32IdbB61wFgzXFpV10zbhxMtIxMyigrhVM6s3voVQAYNH27N1RK/IBYEv 6c2kAzVjXDwOz/F6szH+DMZygIiMuRSFX9FTUuZjquSJpSDXbnYIqsLN1tZMmq470Na/ h9VsYSQ/bTCpAV3HqffwXGczo5fzdb8yqneq361GiEveI1RstkaY1qkuu2H5e9Cd3y1j XeK13aY/Be+UaXbbhpbMpI+pawTQiC2GVHgiEAwkVVuxPU61o0zl4eCP4xRtTnM5OriD yrkCm52DAXs51QsJpA4XI71Cp7eV7NgygdIyeFr9kFsBNsWVhqa8IKYxihkEFxPscYCr HyaA==; dara=google.com ARC-Authentication-Results: i=2; mx.google.com; dkim=pass header.i=@kernel.org header.s=k20201202 header.b=SFL2n0xd; arc=pass (i=1 dkim=pass dkdomain=kernel.org); spf=pass (google.com: domain of linux-kernel+bounces-142339-linux.lists.archive=gmail.com@vger.kernel.org designates 147.75.199.223 as permitted sender) smtp.mailfrom="linux-kernel+bounces-142339-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org Return-Path: Received: from ny.mirrors.kernel.org (ny.mirrors.kernel.org. [147.75.199.223]) by mx.google.com with ESMTPS id vy19-20020a05620a491300b0078d6b96115csi3220531qkn.553.2024.04.12.02.08.48 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 12 Apr 2024 02:08:49 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel+bounces-142339-linux.lists.archive=gmail.com@vger.kernel.org designates 147.75.199.223 as permitted sender) client-ip=147.75.199.223; Authentication-Results: mx.google.com; dkim=pass header.i=@kernel.org header.s=k20201202 header.b=SFL2n0xd; arc=pass (i=1 dkim=pass dkdomain=kernel.org); spf=pass (google.com: domain of linux-kernel+bounces-142339-linux.lists.archive=gmail.com@vger.kernel.org designates 147.75.199.223 as permitted sender) smtp.mailfrom="linux-kernel+bounces-142339-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 ny.mirrors.kernel.org (Postfix) with ESMTPS id D63F21C209D9 for ; Fri, 12 Apr 2024 09:08:48 +0000 (UTC) Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id 85FC94DA1B; Fri, 12 Apr 2024 09:08:40 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=kernel.org header.i=@kernel.org header.b="SFL2n0xd" 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 AAEAC205E3C; Fri, 12 Apr 2024 09:08:39 +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=1712912919; cv=none; b=CJ2pF5SWV1HMLq/KM37iYKhP7b827jVmdaym2hDgH7WzWKKMkWl/odswdAKwsC6O+DVRAc0ICUidj0I+Iy0lTRnrwOUWGuKRjivf/1Jk1qKxNnRC2hedXMvDpEU9MpIp4gAxzpU9rl+0Xi6bbhU6xNYDhhZH4pipkVMAVtr2PWw= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1712912919; c=relaxed/simple; bh=ii/Uc392uqc7ct/GqIg5jcnCdezu834MOoemDCDL4jM=; h=From:To:Cc:Subject:Date:Message-ID:In-Reply-To:References: MIME-Version:Content-Type; b=ovJcc5q2sSB5Aa7goa7CE/y2gP9Q4FRK7p8FW/ajTnaIbYTK+O7POz24r0Nf6T9ImGP6iegvgqyvp8bQojC72kJ8bi2IcoXcHf3+/sdRctmyPRiwirKxMNLm7ht5ZeWZv8+v+lEtfCvStsV9+dQ6R0ezvpRS6AFnnNP9b/NId2g= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=kernel.org header.i=@kernel.org header.b=SFL2n0xd; arc=none smtp.client-ip=10.30.226.201 Received: by smtp.kernel.org (Postfix) with ESMTPSA id B88C9C113CC; Fri, 12 Apr 2024 09:08:36 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1712912919; bh=ii/Uc392uqc7ct/GqIg5jcnCdezu834MOoemDCDL4jM=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=SFL2n0xdOY8vILWBr2XPdtHuPRvh9nxfe5aVeijcCB9ejqQkO4anyUZJ+G7pAjKaX 92+ZSLFPWMbSV1rtBV5KBEZMNEvPY81SCESoV4p3Cgci4Ufvnc5/AeMHRYsR88PLw1 sA+EHA3+A/gCOVBEGnMrVXtuXis4mYIOktq0KaqmzU9xVZhzf80ccnfMqhnA/h4RqW 7VSccRO9yYbJdjfMzCVzzJrTfo2aDYgM5hK3xkwCoacNOZONF+0xcisQskx1XquL2o GYhjo2E6SpsqpinK3snW4f8x+LWisFwH7qp7specjcbb1maIkP8OCqeAQgkQ5rx0qA WJyi2Rf7ABRPA== From: Christian Brauner To: Linus Torvalds Cc: Christian Brauner , linux-fsdevel@vger.kernel.org, linux-kernel@vger.kernel.org, Andrew Lutomirski , Peter Anvin , Alexander Viro , Jan Kara Subject: Re: [PATCH] vfs: relax linkat() AT_EMPTY_PATH - aka flink() - requirements Date: Fri, 12 Apr 2024 11:07:36 +0200 Message-ID: <20240412-vegetarisch-installieren-1152433bd1a7@brauner> X-Mailer: git-send-email 2.43.0 In-Reply-To: <20240411001012.12513-1-torvalds@linux-foundation.org> References: <20240411001012.12513-1-torvalds@linux-foundation.org> 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" X-Developer-Signature: v=1; a=openpgp-sha256; l=1500; i=brauner@kernel.org; h=from:subject:message-id; bh=ii/Uc392uqc7ct/GqIg5jcnCdezu834MOoemDCDL4jM=; b=owGbwMvMwCU28Zj0gdSKO4sYT6slMaRJ/LwZ0Jm5L/jxOlXntDyXCvO/Sp9nbd2tO1ns2t6fX 2WnTjs6taOUhUGMi0FWTJHFod0kXG45T8Vmo0wNmDmsTCBDGLg4BWAi7zYzMhzg/P30wu+TgU3p TnambTsbzPvTE3wtmlUUF+/U5Kjtm8nI8CLp6DyDyz9/xl1iNJLYffjO2hmmC3/xPxbN7Ts8NT3 GhBsA X-Developer-Key: i=brauner@kernel.org; a=openpgp; fpr=4880B8C9BD0E5106FC070F4F7B3C391EFEA93624 Content-Transfer-Encoding: 8bit On Wed, 10 Apr 2024 17:10:12 -0700, Linus Torvalds wrote: > "The definition of insanity is doing the same thing over and over > again and expecting different results” > > We've tried to do this before, most recently with commit bb2314b47996 > ("fs: Allow unprivileged linkat(..., AT_EMPTY_PATH) aka flink") about a > decade ago. > > [...] So it seems that this might be worth trying. I've picked up the patch with two modifications: (1) added the relaxed capability check. (2) renamed the flag to LOOKUP_LINKAT_EMPTY (3) slight adjustment to commit message Should show up in -next if I don't hear objections or you want to apply this directly. Fingers crossed we don't see regressions. --- Applied to the vfs.misc branch of the vfs/vfs.git tree. Patches in the vfs.misc branch should appear in linux-next soon. Please report any outstanding bugs that were missed during review in a new review to the original patch series allowing us to drop it. It's encouraged to provide Acked-bys and Reviewed-bys even though the patch has now been applied. If possible patch trailers will be updated. Note that commit hashes shown below are subject to change due to rebase, trailer updates or similar. If in doubt, please check the listed branch. tree: https://git.kernel.org/pub/scm/linux/kernel/git/vfs/vfs.git branch: vfs.misc [1/1] vfs: relax linkat() AT_EMPTY_PATH - aka flink() - requirements https://git.kernel.org/vfs/vfs/c/fa75d6e377fd