Received: by 2002:a05:7412:e794:b0:fa:551:50a7 with SMTP id o20csp1052181rdd; Wed, 10 Jan 2024 07:19:48 -0800 (PST) X-Google-Smtp-Source: AGHT+IGngGVdXI5Naimg1odZGnjht2rJO6kmCeBh745nmEZIKq0DwKi/+3VqPIdHAVK8EwhPaHzL X-Received: by 2002:a17:902:ea12:b0:1d4:8512:5871 with SMTP id s18-20020a170902ea1200b001d485125871mr1118481plg.27.1704899988335; Wed, 10 Jan 2024 07:19:48 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1704899988; cv=none; d=google.com; s=arc-20160816; b=ciYGnKeYsj4qN+PoisMv70/XUZ7WuqnxeS2+zEMlSZOTHwhIQTFm7d8FzLb9xuiDpH iBXPsR+K3MhFCwyLZQDjZeBSfRkA5C5mVzlYbRSxi1UfTNaAFFrXcBMHGbpfN5B53MoN RCd/7HTf8SK5uiNwstEFHtMH9g4YOBiHPSiuj1QRaDxtVdzRRH3KWLhDgR9LvmfwzSe0 CDetktYvsB4lPcgPsZ2tyigenUYplQPoD5Ob6aVlUSAyisLzSQKkORZ6rShd3aKEF9xT OK9fWp3DeqmxuELzS9bS7eNAyjk3q4cpgWvGlTx2uX8pVcMGjTMhGDhbC4W9IDoBMBIJ Q58Q== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=user-agent: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=N3nJ0C540bT8WS6Z8HcIxixzWR9wSwd0zry2yrndudg=; fh=Zd/XkCZeyWzqqMhwJ18A9n/PERKz+8JcUbACL5lNt6k=; b=Wg6E8FH5wHSfrRgGvm3qf4Kw0MwE2jqfexq5lMMJUyShFxhlZ3sm4ZKH3NeOE+9x3w dJ68L+YJmTkbC9S8DN4kn8vHvZpSka0UDOBGPqFcUYRvS2fUGmozhJQzsNIIOvRluH/J 4Zs09B1bkw56Sj7H0SPpwQqwkHa3Ut3Uc2bosSLwO4uX9m/jTa9e00wk/aqEYrkY2p9o C1bIrZ9GB3aW2X5ClMiITow+5f8lj81GXNM4khg65KjcMDRg8N7EApkzFrO/gL0vLWR2 JK5raC2OkrH2vO5HzeRFaeagQPX4dnjMvQVSY4pVQDbNgSZFrCAqhSvil4RQzJy9uHGg d6dw== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@nabijaczleweli.xyz header.s=202305 header.b=WlBcJDH1; spf=pass (google.com: domain of linux-kernel+bounces-22414-linux.lists.archive=gmail.com@vger.kernel.org designates 139.178.88.99 as permitted sender) smtp.mailfrom="linux-kernel+bounces-22414-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=nabijaczleweli.xyz Return-Path: Received: from sv.mirrors.kernel.org (sv.mirrors.kernel.org. [139.178.88.99]) by mx.google.com with ESMTPS id b4-20020a170902d50400b001d4152a6177si4053435plg.112.2024.01.10.07.19.48 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 10 Jan 2024 07:19:48 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel+bounces-22414-linux.lists.archive=gmail.com@vger.kernel.org designates 139.178.88.99 as permitted sender) client-ip=139.178.88.99; Authentication-Results: mx.google.com; dkim=pass header.i=@nabijaczleweli.xyz header.s=202305 header.b=WlBcJDH1; spf=pass (google.com: domain of linux-kernel+bounces-22414-linux.lists.archive=gmail.com@vger.kernel.org designates 139.178.88.99 as permitted sender) smtp.mailfrom="linux-kernel+bounces-22414-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=nabijaczleweli.xyz 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 sv.mirrors.kernel.org (Postfix) with ESMTPS id DE6BC283734 for ; Wed, 10 Jan 2024 15:19:47 +0000 (UTC) Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id 5D84B4C3A8; Wed, 10 Jan 2024 15:19:38 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=nabijaczleweli.xyz header.i=@nabijaczleweli.xyz header.b="WlBcJDH1" Received: from tarta.nabijaczleweli.xyz (tarta.nabijaczleweli.xyz [139.28.40.42]) (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 B1A9B4BA9F; Wed, 10 Jan 2024 15:19:33 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=nabijaczleweli.xyz Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=nabijaczleweli.xyz DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=nabijaczleweli.xyz; s=202305; t=1704899965; bh=N3nJ0C540bT8WS6Z8HcIxixzWR9wSwd0zry2yrndudg=; h=Date:From:To:Cc:Subject:References:In-Reply-To:From; b=WlBcJDH1lCsMwgEDQmVenG7bwKkUoeVq9ziwcPEUO1dQ4Dk9PFxWKxbZ5DfMf8boQ IjPj7vYwHwrj5s54nji76vncIMvpcWqhK5M97QoNYCpjiERoQwBfAJipT981yRTzT/ bt6SnphWZxSiqcbhLD+snre1MX7yQ4v4VZ+d+tZeYGlFuadZyubtHDtgfI/5vBDaoN 4jPj3esZVFedLw8BSHLZ9Mim51LQZO0O8rY9l3WpZiP9g4+sEf17pmOugqORiTbdC/ Lvvb8f4Z3MvR507czyVNUsDwGVsSR1LqYOFmy7bJ8342LsPryS+Rihoy6bgLEdyx4+ 4bCYOY+WbDSLw== Received: from tarta.nabijaczleweli.xyz (unknown [192.168.1.250]) by tarta.nabijaczleweli.xyz (Postfix) with ESMTPSA id 111A614CD4; Wed, 10 Jan 2024 16:19:25 +0100 (CET) Date: Wed, 10 Jan 2024 16:19:24 +0100 From: Ahelenia =?utf-8?Q?Ziemia=C5=84ska?= To: Miklos Szeredi Cc: Jens Axboe , Christian Brauner , Alexander Viro , linux-fsdevel@vger.kernel.org, Vivek Goyal , Stefan Hajnoczi , linux-kernel@vger.kernel.org, virtualization@lists.linux.dev Subject: Re: [PATCH v2 09/11] fuse: file: limit splice_read to virtiofs Message-ID: <2wob4ovppjywxmpl5rvuzpktltdlyto5czpglb5il5cehkel6m@tarta.nabijaczleweli.xyz> References: <9b5cd13bc9e9c570978ec25b25ba5e4081b3d56b.1703126594.git.nabijaczleweli@nabijaczleweli.xyz> Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Type: multipart/signed; micalg=pgp-sha512; protocol="application/pgp-signature"; boundary="isq32hemhww3wwiu" Content-Disposition: inline In-Reply-To: User-Agent: NeoMutt/20231221-2-4202cf-dirty --isq32hemhww3wwiu Content-Type: text/plain; charset=utf-8 Content-Disposition: inline Content-Transfer-Encoding: quoted-printable On Wed, Jan 10, 2024 at 02:43:04PM +0100, Miklos Szeredi wrote: > On Thu, 21 Dec 2023 at 04:09, Ahelenia Ziemia=C5=84ska > wrote: > > Potentially-blocking splice_reads are allowed for normal filesystems > > like NFS because they're blessed by root. > > > > FUSE is commonly used suid-root, and allows anyone to trivially create > > a file that, when spliced from, will just sleep forever with the pipe > > lock held. > > > > The only way IPC to the fusing process could be avoided is if > > !(ff->open_flags & FOPEN_DIRECT_IO) and the range was already cached > > and we weren't past the end. Just refuse it. > How is this not going to cause regressions out there? In "[PATCH v2 14/11] fuse: allow splicing to trusted mounts only" splicing is re-enabled for mounts made by the real root. > We need to find an alternative to refusing splice, since this is not > going to fly, IMO. The alternative is to not hold the lock. See the references in the cover letter for why this wasn't done. IMO a potential slight perf hit flies more than a total exclusion on the pipe. --isq32hemhww3wwiu Content-Type: application/pgp-signature; name="signature.asc" -----BEGIN PGP SIGNATURE----- iQIzBAABCgAdFiEEfWlHToQCjFzAxEFjvP0LAY0mWPEFAmWetXwACgkQvP0LAY0m WPHIwQ//fiIyHHVfimlyIEoId+cH17Lz5J3ZKEGBCJPUG9SG6u8qdgPid/iNV3fm DP+x8A/oMbyeqLKh6GB3NwvrL8VOReuutMyNfxj9VmjaaV8rKq+g0CstpBTgOYuj lA1KQ6k99btF1+zGXynutHQXTjf1krcTqnZ9+HFn0ejWIMa49ECFFxwoQLZ8DUH6 8kOgxMwE0Ar3hcq+zLsAXrUe5OUEUAGXqmMwpdomnaAi132G3MzT3cTL0JbuRtO8 kWdCgHFYCjMxKc00COyq9fcEoOmCpOctN0Uae+lsO74Ukb8o4VPr5w6mYPKEDnH9 ZPiqKoIJ1ek36CBPLGt9Mtr8LZO3REnRqDIp1g62O5eqN6kqYgK4qE8tf0ifkOWg U/LoA/00MUOf4zyx5JoGHCVUCYrY9AnXYS5+nK1vDrR0F3m5iNkBy3OsKcvIEXqG KTLOa+Jvn+W4L7539uyEkqKOpZAJfd5IT0IRnsxH38zvx9Rv7sGykn8vsT/Md8uk wP6kJH448KE3TVePPc6QOAaK9qpcC4bu2Y5MvJX1CJM6Co27miyrId6WIbkz7umg nmE7h3E6IlfKBCCgFT5CNBEx6z7mvDmQf4q7SayFz/f9kLNbRuQb4D4caYWJ6QPK luPGvzp/UtbfHs7IXFKwtCDH5+4POrlVprj31R6YPJfOC+gnBmk= =lQIA -----END PGP SIGNATURE----- --isq32hemhww3wwiu--