From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from mail-qk1-f181.google.com (mail-qk1-f181.google.com [209.85.222.181]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id C1D7437F8B3 for ; Wed, 15 Apr 2026 19:40:54 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=209.85.222.181 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1776282056; cv=none; b=opzeArcLTV7E1wliRWtiZg0Nqh17cAWTRYze6Rh6T2nJQ/H0LckujOrmUeMWf4I2ELyNnHGpqMfsuECnB4r93Zj/8aqEeegbKI24OX66/Fa0anMHJXdO31G7otccYz2lJZPSvaFhlwFvVrsodnj4IAPJqa810qzqebOxSZ/CzjE= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1776282056; c=relaxed/simple; bh=Fbt5z3RlQX7uE5fPza9+n11jMRJS86/huzP2wYqLwxc=; h=Date:From:To:Cc:Subject:Message-ID:References:MIME-Version: Content-Type:Content-Disposition:In-Reply-To; b=G14CKArjlUdTgvvDz0KIBwXdTVZ9bs/Pr4wopCASHHAjpvGLPnz6LoFyZd9JViJa/gR+533zBihCPDfmsz/rkfNBACfYIf6p/nFwIfgA/OD6WLDFXwe0DryssFPYVGP1BRerHbS45pinb8L/3LFDPmjiKkDUYTMxWa5vGG2Hcoc= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dmarc=none (p=none dis=none) header.from=gourry.net; spf=pass smtp.mailfrom=gourry.net; dkim=pass (2048-bit key) header.d=gourry.net header.i=@gourry.net header.b=HumXSn0p; arc=none smtp.client-ip=209.85.222.181 Authentication-Results: smtp.subspace.kernel.org; dmarc=none (p=none dis=none) header.from=gourry.net Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=gourry.net Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=gourry.net header.i=@gourry.net header.b="HumXSn0p" Received: by mail-qk1-f181.google.com with SMTP id af79cd13be357-8cb4136d865so820619785a.1 for ; Wed, 15 Apr 2026 12:40:54 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gourry.net; s=google; t=1776282054; x=1776886854; darn=vger.kernel.org; h=in-reply-to:content-transfer-encoding:content-disposition :mime-version:references:message-id:subject:cc:to:from:date:from:to :cc:subject:date:message-id:reply-to; bh=LDC8jcFDmTbSeuUhBTn6DAnyFWcoxjOsrPOPaR64HNI=; b=HumXSn0p5TKMA4dEtoS52dpG/QTr9RxyA+2JcFbjKCkIHbCeVyKF7BG2cRaA0gAv77 aniIVEI052IH94Ow/wneSQyaHOMNe5DPmt/AdY3afhui4UEjuPcVxMXh1ku8nP6ChRSC A5Zo/DSomNDx7cOn40hC0jeTXbNwrz3Us9w9uI+kCukbq4jIBt5D/V/yFqrYTPtyKPil T34YLj6z7Ddyn6O9QJt9dwztda68l6XmnJyrFoD55dQOkyqlEX/A9wyPDp28XP0LTZc0 YdrZq3q3P1NJMnuS/C8rTZG3QyQub5c7wELXAxSVv1BW2uoN0SKs6rvi3keakzn8uqI0 iiUw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20251104; t=1776282054; x=1776886854; h=in-reply-to:content-transfer-encoding:content-disposition :mime-version:references:message-id:subject:cc:to:from:date:x-gm-gg :x-gm-message-state:from:to:cc:subject:date:message-id:reply-to; bh=LDC8jcFDmTbSeuUhBTn6DAnyFWcoxjOsrPOPaR64HNI=; b=Z3zzAL7JXrDBFdl4YN0A1F/kL1w3VQPY0x3Coee9Kn8pyMC64qQMhi2pdbHqbc2KqW KXfSna/mVWSO0uMmpx06+JrJH2c15wrVB/9/54paDiKd3krIpbTjLg6CoYZ35gej0NYv 7lf9TVLghiD56kay9yGJP2Gwf/QEgZeMyChMzqYfBVLcAtIwDJCwT1WhJ2WKZoBqlkF+ dBDwSNA/Y4kfEocPw5M+j79T3RS4EDiGjiYgBBkqwF0sSGgw6hV9GSNUH7lKnfNaH9TJ HV7xZPJmVmTSL+2ddhtQkCw+cB+TnjWDbZ/Qd2ypNGsHkfq9dYl9L58qXPDwr7mw8v1T UlzQ== X-Forwarded-Encrypted: i=1; AFNElJ+kIx2cjFK7QV55GEdHrNK/zXYa4PrxiwEXHfHASvtTV6mkwFWqFnUYzNExM7m5na3e5Gh8/S4wJfoIQBw=@vger.kernel.org X-Gm-Message-State: AOJu0YyvEA/7Me8RwXYpfmzkSawJE7kqK4Qbg6j+28TY221t21846AfQ Q/s28zH0ZM1imQm4ZWFnCrRlv1d9iCLYvDLtQ8MvxdtM+7J8vi/4u8ywkm3GTJFYwAg= X-Gm-Gg: AeBDieuJYrVh1aobpAoYDuyfGxRMk7M8dR7zcfXKPO2IQHnrUnV/4Z7zlYjCXqw+23i EDtqeqTGxDxVE8o3nDhezczhYhwpvtiK47T/FVGrClPobxe/7ZQSkqAuEy0LFa9pSAB+/fL+Cuf pgNZscF9sGsFpjsSc7vWC24G+TgpPNRmWD/DY2D+F6KJOpAggtteu2IwRzKadIwYTOIke69roJs vZFolBhYgrqKK12QnM1TfPbPT07E6AHlTU/evplb8CU3VTtaYvOfnRGXQ/n3KlyFI4kul1JzJ0u Y70geQnOuxffMLPdRQQqg2BRzXKm6vJrA71RQIusDXscRLAnhdA2zGLVEPtq7YkOjmvqFm4b6iD NzqKtMLBeaORvTnEKvVzsWNFjr/jCEfTE/nOuH6sgXtKO2UzZT3z4Iyk0RSrVcIzVw4+tlpOO5v M17/oBKAEpp2NoardyV+iRy6fcNdOVYQ0fCQTvYevnvWZZU5XejO2BX6ra4TDCR0TcqnP6Kiedj rffbeVc4VX02CRGfQ5HnEM= X-Received: by 2002:a05:620a:2849:b0:8c9:fb69:e708 with SMTP id af79cd13be357-8ddcd504c7emr3103848285a.25.1776282053498; Wed, 15 Apr 2026 12:40:53 -0700 (PDT) Received: from gourry-fedora-PF4VCD3F (pool-108-28-184-130.washdc.fios.verizon.net. [108.28.184.130]) by smtp.gmail.com with ESMTPSA id af79cd13be357-8e4f2926001sm186837485a.34.2026.04.15.12.40.51 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 15 Apr 2026 12:40:52 -0700 (PDT) Date: Wed, 15 Apr 2026 15:40:49 -0400 From: Gregory Price To: Joanne Koong Cc: Matthew Wilcox , Miklos Szeredi , "David Hildenbrand (Arm)" , "Darrick J. Wong" , John Groves , Bernd Schubert , John Groves , Dan Williams , Bernd Schubert , Alison Schofield , John Groves , Jonathan Corbet , Shuah Khan , Vishal Verma , Dave Jiang , Jan Kara , Alexander Viro , Christian Brauner , Randy Dunlap , Jeff Layton , Amir Goldstein , Jonathan Cameron , Stefan Hajnoczi , Josef Bacik , Bagas Sanjaya , Chen Linxuan , James Morse , Fuad Tabba , Sean Christopherson , Shivank Garg , Ackerley Tng , Aravind Ramesh , Ajay Joshi , "venkataravis@micron.com" , "linux-doc@vger.kernel.org" , "linux-kernel@vger.kernel.org" , "nvdimm@lists.linux.dev" , "linux-cxl@vger.kernel.org" , "linux-fsdevel@vger.kernel.org" , djbw@kernel.org Subject: Re: [PATCH V10 00/10] famfs: port into fuse Message-ID: References: <20260414185740.GA604658@frogsfrogsfrogs> 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 Content-Transfer-Encoding: 8bit In-Reply-To: On Wed, Apr 15, 2026 at 10:12:54AM -0700, Joanne Koong wrote: > On Wed, Apr 15, 2026 at 8:32 AM Gregory Price wrote: > > > > My initial take is that it's a real concern a "bug" in a BPF program > > could let userland map arbitrary memory into userland page tables, and > > such an extension would not be a quick fix to the FAMFS problem. > > If you're concerned about arbitrary addresses in the bpf path, you > should be equally concerned about the FUSE_GET_FMAP path that's in > this series, because they're functionally identical. The kernel trusts > userspace-provided addresses in both cases. If that's acceptable for > this series then it's acceptable for bpf too. You can't reject bpf on > security grounds without also rejecting the current approach. > To be clear, i'm not rejecting it. I'm saying (!) that's something that needs a careful look. It's a novel interaction and a new ops structure. I don't think it's in any way unfair to point out there will (and should) be questions outside the scope of FAMFS. > Please take a look at the famfs bpf program [1] and compare that to > the logic in patch 6 in this series [2]. In both cases, iomap->addr > gets set to the address that was earlier specified by the userspace > famfs server. In the non-bpf path, the userspace server passes this > address through a FUSE_GET_FMAP request. In the bpf path, the > userspace server passes this address by updating the bpf hashmap from > userspace. There is no functional difference. Also btw, this is one of > the cases that I was referring to about the bpf path being more > helpful - in the bpf path, we avoid having to add a FUSE_FMAP opcode > to fuse (which will be used by no other server) and famfs gets to skip > 2 extra context-switches that the FUSE_FMAP path otherwise entails. > The question isn't about the functional differences between the FAMFS static code or a BPF blob doing the same thing - the question is what the new ops structure introduces for the general case that wasn't there before. We have to reason about the BPF extension separately from the context of FAMFS - as it's a general interface now (forever :P). ~Gregory