From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from bombadil.infradead.org (bombadil.infradead.org [198.137.202.133]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.lore.kernel.org (Postfix) with ESMTPS id 41D17C4167D for ; Thu, 2 Nov 2023 16:25:18 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=bombadil.20210309; h=Sender: Content-Transfer-Encoding:Content-Type:List-Subscribe:List-Help:List-Post: List-Archive:List-Unsubscribe:List-Id:In-Reply-To:MIME-Version:References: Message-ID:Subject:Cc:To:From:Date:Reply-To:Content-ID:Content-Description: Resent-Date:Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID: List-Owner; bh=v+M3VJdrvPlVxj2mEj11lJigA30HWavGi9GUxgDOy3w=; b=gqpVHSMEE4thP0 yEpVe6IlEFVUtU/P9YJhClbBaM2COc82+d3xx5wyi186Hs/jb/pDglykeAH00RTYhbAteshZineau j9sgTPiLx3oT3rsiYwHFFhka2iGif2M/QAR6aAgptinLQxKMVSChIfiVDAHlO7TEo9qSWcoJlzfET Ga/2hqnNFdOPMh1AHW4jfIHzcjZWTnyF86OVnJlBfAKHZ8kwfWi8xuyjXtoyxqdCqhBMCvJTdaEIk t/ReSBPAcuM/qqb7LJ6u6cUco5Q9NMetcQfpfd8XyEqR+t3sUeTsRwKTSnKfhnQlkyfmn5XZwt1+0 R/2yMYbUqhhr7WLc7p8A==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.96 #2 (Red Hat Linux)) id 1qyaUv-009r4j-1X; Thu, 02 Nov 2023 16:24:45 +0000 Received: from sin.source.kernel.org ([145.40.73.55]) by bombadil.infradead.org with esmtps (Exim 4.96 #2 (Red Hat Linux)) id 1qyaUs-009r3r-2G; Thu, 02 Nov 2023 16:24:44 +0000 Received: from smtp.kernel.org (transwarp.subspace.kernel.org [100.75.92.58]) by sin.source.kernel.org (Postfix) with ESMTP id 2668ACE2132; Thu, 2 Nov 2023 16:24:40 +0000 (UTC) Received: by smtp.kernel.org (Postfix) with ESMTPSA id EFBABC433C8; Thu, 2 Nov 2023 16:24:29 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1698942279; bh=1oyVMjQI7OXHCUtZSgK71uJyeSsja11PK2zu0Sgh3ck=; h=Date:From:To:Cc:Subject:References:In-Reply-To:From; b=ciKD3SqqJbMFjIcI6bCCYkwFV34fiO2ArRgF5fXcYKuOaGXb4Wyi9zozkY1GPacll Wb4+rsmrOAiUFpUvVmXoDHyclytLXtYqrhZkU0PpNpIyYDeZGFKHZDDWtqHWW99OuO qo3jhEw/diJ1a/cjqpth3wyK9LJTK2A2KbT6VwEC/UhcdzfCTDR5j8l+p9MS2DAQxb LzKQyThoycm/wTmhlnVYtsizofoKOqeGHL2Li2UrkzPUXr3zUUph4Dx0xK0JakNnV7 d57GUWFGv9wIfjooWNbwoPxilLaGhd+yLjY93dOc3Y/tHVaznNMcGB6moDDpowdxsF zbisHCIeWrzQg== Date: Thu, 2 Nov 2023 17:24:27 +0100 From: Christian Brauner To: Sean Christopherson Cc: Paolo Bonzini , Marc Zyngier , Oliver Upton , Huacai Chen , Michael Ellerman , Anup Patel , Paul Walmsley , Palmer Dabbelt , Albert Ou , Alexander Viro , "Matthew Wilcox (Oracle)" , Andrew Morton , kvm@vger.kernel.org, linux-arm-kernel@lists.infradead.org, kvmarm@lists.linux.dev, linux-mips@vger.kernel.org, linuxppc-dev@lists.ozlabs.org, kvm-riscv@lists.infradead.org, linux-riscv@lists.infradead.org, linux-fsdevel@vger.kernel.org, linux-mm@kvack.org, linux-kernel@vger.kernel.org, Xiaoyao Li , Xu Yilun , Chao Peng , Fuad Tabba , Jarkko Sakkinen , Anish Moorthy , David Matlack , Yu Zhang , Isaku Yamahata , =?utf-8?Q?Micka=C3=ABl_Sala=C3=BCn?= , Vlastimil Babka , Vishal Annapurve , Ackerley Tng , Maciej Szmigiero , David Hildenbrand , Quentin Perret , Michael Roth , Wang , Liam Merwick , Isaku Yamahata , "Kirill A . Shutemov" Subject: Re: [PATCH v13 15/35] fs: Export anon_inode_getfile_secure() for use by KVM Message-ID: <20231102-freihalten-vorsah-fdd68051b005@brauner> References: <20231027182217.3615211-1-seanjc@google.com> <20231027182217.3615211-16-seanjc@google.com> MIME-Version: 1.0 Content-Disposition: inline In-Reply-To: <20231027182217.3615211-16-seanjc@google.com> X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20231102_092443_113878_84CD64F1 X-CRM114-Status: GOOD ( 12.13 ) X-BeenThere: linux-arm-kernel@lists.infradead.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Sender: "linux-arm-kernel" Errors-To: linux-arm-kernel-bounces+linux-arm-kernel=archiver.kernel.org@lists.infradead.org On Fri, Oct 27, 2023 at 11:21:57AM -0700, Sean Christopherson wrote: > Export anon_inode_getfile_secure() so that it can be used by KVM to create > and manage file-based guest memory without need a fullblow filesystem. > The "standard" anon_inode_getfd() doesn't work for KVM's use case as KVM > needs a unique inode for each file, e.g. to be able to independently > manage the size and lifecycle of a given file. > > Note, KVM doesn't need a "secure" version, just unique inodes, i.e. ignore > the name. > > Signed-off-by: Sean Christopherson > --- Before we enshrine this misleading name let's rename this to: create_anon_inode_getfile() I don't claim it's a great name but it's better than *_secure() which is very confusing. So just: struct file *create_anon_inode_getfile(const char *name, const struct file_operations *fops, void *priv, int flags) May also just remove that context_inode argument from the exported function. The only other caller is io_uring. And neither it nor this patchset need the context_inode thing afaict. Merge conflict risk is extremely low so carrying that as part of this patchset is fine and shouldn't cause huge issues for you. _______________________________________________ linux-arm-kernel mailing list linux-arm-kernel@lists.infradead.org http://lists.infradead.org/mailman/listinfo/linux-arm-kernel