From mboxrd@z Thu Jan 1 00:00:00 1970 Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.remote-ip=100.103.45.18 ARC-Seal: i=1; d=subspace.kernel.org; s=arc20261015; a=rsa-sha256; cv=none; t=1796047797; b=pcG+C/iQ3p1wzg49QePzwiZVIqeKPa1cgxj7vPadIhwLd1B8kL32Y4OHih0pBLCXfVIA TXNCI5SfKQlwIxYclL5f8df+BmE/+Rmy1xRV+UAbonJ/aDCx7UW5mYAGOFbdTUk64h6On YvR2n2hQLo6o51gtBLkJ57TMpDVqWP47jFrAgHiqantndzNawjKNoA/SP3BuAqZmnEh/2 rokTGg1GU1o/gKYbnn/eA9a8IN9QibtoCipKnXNRbHalR4kWpq94v7/HfeLrjRrH5Fgxv fDOad+iaH1RJLEJ8tQZRGo6XcXD60hPeI82k6AyzJsBCfdwRMsH6K6TsYKCsCVh/rjA== ARC-Message-Signature: i=1; d=subspace.kernel.org; s=arc20261015; a=rsa-sha256; c=relaxed/relaxed; t=1796047797; h=Received:DKIM-Signature:Date:From:To:Subject:Message-ID:References: MIME-Version:Content-Type:Content-Disposition:In-Reply-To; bh=RLFSJBOduv3ilwZvmdbEJZCX88+K2nag+XMkIoaoSyQ=; b=NlCdm+u38s2EXMY/5vrdR04pIih3wgsJEKlcY524lmAsMjQQxQn1YAtnOjtftsItP5IC VGayXTOpgKgniY9hosZ9lsqzKSCKX9k491E7B40kT9JhdeQPS6v5q+WKl1TkzsurYB3UW 9FRqykECTI522UxE2OWCy74OxlWKVCdUukvjIErkWbUaON7vZopMPv0cFOIbj8TdLvyMr sMD6aM9PnAWAr8JMEB/a6AN9kAgVVWkxBu7Crxf618y6h8HufCwl2ryvFPiV2epX7Qbz6 G2nIGZYdbhbOnZGhOIwDunj1g3k4jR/BwU1b9858rwQyiluOt7BCscOednMebV9aOEw== ARC-Authentication-Results: i=1; smtp.subspace.kernel.org; dkim=pass header.d=kernel.org header.i=@kernel.org header.a=rsa-sha256 header.s=k20260515 header.b=UzuoDG4G; arc=none smtp.remote-ip=100.103.45.18 Received: from smtp.kernel.org (quasi.space.kernel.org [100.103.45.18]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature ECDSA (prime256v1)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id 5B172606A31C; Mon, 30 Nov 2026 14:09:57 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=kernel.org header.i=@kernel.org header.a=rsa-sha256 header.s=k20260515 header.b=UzuoDG4G Received: by smtp.kernel.org (Postfix) with ESMTPSA id 3B9321F00897; Mon, 30 Nov 2026 14:09:50 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=kernel.org; s=k20260515; t=1796047797; bh=RLFSJBOduv3ilwZvmdbEJZCX88+K2nag+XMkIoaoSyQ=; h=Date:From:To:Subject:References:In-Reply-To; b=UzuoDG4GXjuRe7A2tKFtsc5g1KVFf1qWos9hpwxaCDeBz3HbKyW+ulmr5dsU3P3GL yqh77dlKTKIT2j4ZFusrIBUuTM3dRZByf9iAcYl26+JotaVCCZvninjSbF1LYMhsiZ RD1sTNu+ePe1n0XlxONwkXu6AQcG+BBMS5qBE2pKKgsE+zVNryVexL17ba+PAT6zLq t/P9cdgp1jV7hgzui4L6efo91Q0mALpBi5TEoGoUXaZNiJ9U7NgYPU9b2/xptz+SAS NYe8PnnWHbF37dKrmdBCyy5iITH9ILM40IdBciLSll2iY7lsDAzccqDXuhyECTlBr6 nNrESJPeGN/Xw== Date: Mon, 30 Nov 2026 14:09:47 +0000 From: "Lorenzo Stoakes (ARM)" To: Andrew Morton , David Rheinsberg , Hugh Dickins , Vlastimil Babka , "Liam R. Howlett" , David Hildenbrand , Jann Horn , Alex Shi , Johannes Weiner , Pedro Falcato , David Rientjes , Rik van Riel , Mike Rapoport , Suren Baghdasaryan , Michal Hocko , Jonathan Corbet , Shuah Khan , Randy Dunlap , =?utf-8?B?TWljaGHFgiBNaXJvc8WCYXc=?= , Arnd Bergmann , Stephen Rothwell , Muhammad Usama Anjum , linux-mm@kvack.org, Andrei Vagin , linux-doc@vger.kernel.org, linux-kernel@vger.kernel.org, linux-fsdevel@vger.kernel.org, Chris Mason , stable@vger.kernel.org Subject: Re: [PATCH 1/4] coda: never point a file's f_mapping at a container's mapping Message-ID: References: <20261127-mlock-madvise-mprotect-ai-fixes-v1-0-e46b2b1eb435@kernel.org> <20261127-mlock-madvise-mprotect-ai-fixes-v1-1-e46b2b1eb435@kernel.org> <20261127124428.f1f66c6244d3e5c2811f56de@linux-foundation.org> <20261128010821.irhzl7qcqahz6onx@cs.cmu.edu> <20261127222308.a372076fef9e470ea264cbb5@linux-foundation.org> <20261128194020.lc5sblsbe6pvv5mm@cs.cmu.edu> X-Mailing-List: linux-doc@vger.kernel.org List-Id: List-Post: List-Help: List-Subscribe: List-Unsubscribe: List-Owner: Precedence: list MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20261128194020.lc5sblsbe6pvv5mm@cs.cmu.edu> On Sat, Nov 28, 2026 at 02:40:20PM -0500, Jan Harkes wrote: > Now I am really confused as to what the use of file->f_mapping actually > is. I thought I understood how this mmap stuff worked, but clearly I do not. In general, you shouldn't touch this at all :)) This class of bug is really 'mmap() is getting pointers to stuff it shouldn't get, and mmap hook changing internal state that should not be changed'. The other stacked file systems use a fundamentally different approach, but it's all very forgivable because coda did it first, and before any of that machinery was in place. I am gradually modernising mmap() into mmap_prepare(), and as part of that I'll have to fix up all the machinery. I guess I'll make suggestions then as to how to bring coda into the fold, though it may need a carve-out for backwards compatibility. One for the future though! :) -- Cheers, Lorenzo