From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from fout-b5-smtp.messagingengine.com (fout-b5-smtp.messagingengine.com [202.12.124.148]) (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 C6CB628682; Sat, 27 Sep 2025 22:53:38 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=202.12.124.148 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1759013620; cv=none; b=VrSoRTWshsBVANG/oIoX7ucNTANcArQE7FlcAPKUoei6lqgNXPMr3IVf1q9HkzYqeT8eYLSlDDF83zBA7H2/PbLC7zbzfSe0pZVMYfccV4jhaPhlgLQjLicYFemlvzTeF47/locnoRcx9lw2khMqGXosnTTF/WRKzV9qn3B5lH0= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1759013620; c=relaxed/simple; bh=waBb0hPPk6mLfv0mSvcbxDflqmx7x/HwJzr4j44b6IA=; h=Message-ID:Date:MIME-Version:Subject:To:Cc:References:From: In-Reply-To:Content-Type; b=rcN9gerGku7r76VfXLT8uUnuiC/wctu3R/gxa3+g6CnaOFgO13JxeWYs3WQ+WW4uH8CvsMOIjqAUjK2HvOWgo0jDUscAlJLHRNPyqbnA5ss7aMrm9XZl6v+SLOd9ycdKqzU1ajJ157WRS5c4bMr0UEtn9URHM13S026dxVIHx6c= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dmarc=pass (p=quarantine dis=none) header.from=maowtm.org; spf=pass smtp.mailfrom=maowtm.org; dkim=pass (2048-bit key) header.d=maowtm.org header.i=@maowtm.org header.b=eKyDbvq/; dkim=pass (2048-bit key) header.d=messagingengine.com header.i=@messagingengine.com header.b=Fj1sP+JD; arc=none smtp.client-ip=202.12.124.148 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=quarantine dis=none) header.from=maowtm.org Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=maowtm.org Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=maowtm.org header.i=@maowtm.org header.b="eKyDbvq/"; dkim=pass (2048-bit key) header.d=messagingengine.com header.i=@messagingengine.com header.b="Fj1sP+JD" Received: from phl-compute-11.internal (phl-compute-11.internal [10.202.2.51]) by mailfout.stl.internal (Postfix) with ESMTP id 953A81D00099; Sat, 27 Sep 2025 18:53:37 -0400 (EDT) Received: from phl-mailfrontend-02 ([10.202.2.163]) by phl-compute-11.internal (MEProxy); Sat, 27 Sep 2025 18:53:38 -0400 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=maowtm.org; h=cc :cc:content-transfer-encoding:content-type:content-type:date :date:from:from:in-reply-to:in-reply-to:message-id:mime-version :references:reply-to:subject:subject:to:to; s=fm1; t=1759013617; x=1759100017; bh=r8nlJBu4+DGKY/5R6PObJknBEO1eOAjKoGLmmZK/l90=; b= eKyDbvq/Eh8iaSy38AvYlWf4aOL1JcMHoMq5lQFzbZf/qVYYvwiJuSRXUw2wRkyi W84xxvDk7NHfE7DZlg+9RbWhBBAbvx9m+wRV2YfUavMdLu0A9IFeFXSLv+TF1krR QW7xfCZNiUiTZbltC0iQRuK1utU2zvflFuo7E1KSoGrSnZ57pKS5hP4tSDVieF4n i0vqcjPvxi/QhbwdZD9O5A7k7Mar+4XxER3w17Q9sHTBUdbwDMT/hwnZ/5eyITVA +QuHLcyNnrsiCOrW8BRrFOOPYSurbe9qzWPZvvGmQzjkIedVMiYZqhLQxtRydMow A3aFFVEY9aOfzVKVSCM+Fg== DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d= messagingengine.com; h=cc:cc:content-transfer-encoding :content-type:content-type:date:date:feedback-id:feedback-id :from:from:in-reply-to:in-reply-to:message-id:mime-version :references:reply-to:subject:subject:to:to:x-me-proxy :x-me-sender:x-me-sender:x-sasl-enc; s=fm2; t=1759013617; x= 1759100017; bh=r8nlJBu4+DGKY/5R6PObJknBEO1eOAjKoGLmmZK/l90=; b=F j1sP+JDD2LW7MH/hNDFObuIAHmvl4ktCJ9AAQMa3ZLeuGnsUe12x/HDf49NpLFFA htpaRVtzbHRuNFngwO8J6C2vX2NiZqvsCL+lTmcwy9jEErKo/PAaYqnxfp07fUCl vivDRwyOJspJ9inMbZbV/JswgJxiTuuLyuEwgJH2sRhfvANygX3Ix8zThfN2/zV3 eO+fOgoBl58o3v/nUh0kAmQiV2GY6T28DNqhbz8bTEXYqDtd3C/6bvC+wBFCgLFK yn8skA2xg5yv6/SFUn4mNvvjEdME0UAcEAfSQ0HtZdn3o40dnCtKCWAPKmGzg2v6 UMwMVXiVRDH2+Q+ARjfpg== X-ME-Sender: X-ME-Received: X-ME-Proxy-Cause: gggruggvucftvghtrhhoucdtuddrgeeffedrtdeggdejfeeglecutefuodetggdotefrod ftvfcurfhrohhfihhlvgemucfhrghsthforghilhdpuffrtefokffrpgfnqfghnecuuegr ihhlohhuthemuceftddtnecusecvtfgvtghiphhivghnthhsucdlqddutddtmdenucfjug hrpefkffggfgfuvfevfhfhjggtgfesthekredttddvjeenucfhrhhomhepvfhinhhgmhgr ohcuhggrnhhguceomhesmhgrohifthhmrdhorhhgqeenucggtffrrghtthgvrhhnpeduke evhfegvedvveeihedvvdeghfeglefgudegfeetvdekiefgledtheeggefhgfenucevlhhu shhtvghrufhiiigvpedtnecurfgrrhgrmhepmhgrihhlfhhrohhmpehmsehmrghofihtmh drohhrghdpnhgspghrtghpthhtohepudeipdhmohguvgepshhmthhpohhuthdprhgtphht thhopehmihgtseguihhgihhkohgurdhnvghtpdhrtghpthhtohepghhrohhugheskhgroh gurdhorhhgpdhrtghpthhtoheplhhinhhugigpohhsshestghruhguvggshihtvgdrtgho mhdprhgtphhtthhopegrshhmrgguvghushestghouggvfihrvggtkhdrohhrghdprhgtph htthhopegvrhhitghvhheskhgvrhhnvghlrdhorhhgpdhrtghpthhtoheplhhutghhohes ihhonhhkohhvrdhnvghtpdhrtghpthhtohepvhelfhhssehlihhsthhsrdhlihhnuhigrd guvghvpdhrtghpthhtohepghhnohgrtghksehgohhoghhlvgdrtghomhdprhgtphhtthho pehlihhnuhigqdhsvggtuhhrihhthidqmhhoughulhgvsehvghgvrhdrkhgvrhhnvghlrd horhhg X-ME-Proxy: Feedback-ID: i580e4893:Fastmail Received: by mail.messagingengine.com (Postfix) with ESMTPA; Sat, 27 Sep 2025 18:53:33 -0400 (EDT) Message-ID: Date: Sat, 27 Sep 2025 23:53:33 +0100 Precedence: bulk X-Mailing-List: linux-security-module@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 User-Agent: Mozilla Thunderbird Subject: Re: [PATCH v2 0/7] fs/9p: Reuse inode based on path (in addition to qid) To: =?UTF-8?Q?Micka=C3=ABl_Sala=C3=BCn?= , Greg Kurz Cc: Christian Schoenebeck , Dominique Martinet , Eric Van Hensbergen , Latchesar Ionkov , v9fs@lists.linux.dev, =?UTF-8?Q?G=C3=BCnther_Noack?= , linux-security-module@vger.kernel.org, Jan Kara , Amir Goldstein , Matthew Bobrowski , Al Viro , Christian Brauner , linux-fsdevel@vger.kernel.org, qemu-devel@nongnu.org References: <3070012.VW4agfvzBM@silver> <3774641.iishnSSGpB@silver> <20250917.Eip1ahj6neij@digikod.net> <20250927.ahGhiiy0koo0@digikod.net> Content-Language: en-US From: Tingmao Wang In-Reply-To: <20250927.ahGhiiy0koo0@digikod.net> Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit On 9/27/25 19:27, Mickaël Salaün wrote: > Adding Greg Kurz too. > > On Sun, Sep 21, 2025 at 05:24:49PM +0100, Tingmao Wang wrote: >> On 9/17/25 16:00, Mickaël Salaün wrote: >>> [...] >> >> Alternatively if we believe this to be a QEMU issue, maybe >> Landlock don't need to work around it and should just hold fids (and use >> QIDs to key the rules) anyway despite server quirks like these. This can >> perhaps then be fixed in QEMU? > > Yes, I think it would make sense for Landlock to open and keep open a > fid (and hopefully the related remote file). However, the v9fs umount > should be handled gracefully the same way Landlock tag inodes are > handled. This should come with a QEMU patch to fix the consistency > issue. > >> >> (I guess the fact that QEMU is doing path tracking in the first place does >> gives more precedent for justifying doing path tracking in v9fs as well, >> but maybe that's the wrong way to think about it) > > Anyway, if QEMU does it, wouldn't it be the same for Landlock to just > rely on fid? The fid can't be relied on because it's just a handle. The client can open multiple fids pointing to the same file (and in fact this is what v9fs does - new fid for each open()) > If QEMU uses FD+O_PATH, then Landlock would work even for > server-moved files. (With this new approach, Landlock would have to key the rules based on qid, but it also needs to hold an open fid to prevent that qid from being reused (due to ext4 inode number reuse, etc))