Received: by 2002:a05:6358:701b:b0:131:369:b2a3 with SMTP id 27csp203504rwo; Fri, 21 Jul 2023 10:30:24 -0700 (PDT) X-Google-Smtp-Source: APBJJlEnKU/wMgciu2hC7mTJGBfyM3mghFKNQodfLRcfOrvXmVsqy8+y9c6JlGa8FviQrRvaJ0FK X-Received: by 2002:a05:6512:33d2:b0:4fb:8441:be06 with SMTP id d18-20020a05651233d200b004fb8441be06mr1931000lfg.18.1689960623733; Fri, 21 Jul 2023 10:30:23 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1689960623; cv=none; d=google.com; s=arc-20160816; b=dUwz7dwML43YMpEsX/wD1eQExRMgd4qiWNhAiW6muO97TTdLq8XWsfCxTHzWKcuwBp k92adokL/JKBgd1dHS0QYKO+0jkzhyNRz1wfzMw4HT5a4yvvw83tOpJGxFwV/sx7gLqC c3KlwIWI5wm6EwNH4y9LpLjUDSbP+lB93EzTLr6gWjSmkjISG97KUxZoNkbJ2Xf1AbUZ mVvcCNKCKb++cGnmqy0fSsH/Rvj9ezs+1GkC3EhuaVnn8nbeSbPNwyABuitK4FbwRVUt mI7B1DNHKsmkL9z81I5FoQyPsRq25NN/xPFygd05kGwSaEiq0UBn6XBd6iA/UXhaE1dz aVOA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:in-reply-to:subject :from:references:cc:to:content-language:user-agent:mime-version:date :message-id:dkim-signature; bh=kQftevPX0XUeLPrBO0NAWxPIrge3Hp6/1+H4UC+Ikhg=; fh=Ha0fK0q/QRDhu63ZqG+O6WFFibL7W0Vai9siCdqdoHU=; b=kjUFBLhdM5KSH07MO4liR7xLZlBByZE2Cb7P041JF2wbLXInRPvIZy18kR35hW1s4X obPxfGyIqmAHhlVXRYzpOTVjpXGyRdMSfDS27hGeLeHzFDJTMBKe+s+DFkMTQCT5fEih gzGbEjeHiq/8kV7iJnHtYP/IOhdwGXz3q7HvcS8eTrH2Bpk+cyT3/FxM4nlFZY8wNeS/ xa2j4cpI++lS+14/LkdYgHRDcMBOZ9Nkl/w72npD2jWXEMxx87HfKJkOZIgku3Rnmg5A PRbw0momU2BQmMx3KDN3MEFnPto+dER/StzNHVhM2l6uTz0xQqxXGCy8XbLad9I5Q/0o LmBA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@redhat.com header.s=mimecast20190719 header.b=jOullois; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=redhat.com Return-Path: Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id o23-20020aa7d3d7000000b0051dd54bdc58si2785569edr.315.2023.07.21.10.29.58; Fri, 21 Jul 2023 10:30:23 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) client-ip=2620:137:e000::1:20; Authentication-Results: mx.google.com; dkim=pass header.i=@redhat.com header.s=mimecast20190719 header.b=jOullois; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=redhat.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S230397AbjGURSh (ORCPT + 99 others); Fri, 21 Jul 2023 13:18:37 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:34460 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S230008AbjGURSc (ORCPT ); Fri, 21 Jul 2023 13:18:32 -0400 Received: from us-smtp-delivery-124.mimecast.com (us-smtp-delivery-124.mimecast.com [170.10.133.124]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 501F61731 for ; Fri, 21 Jul 2023 10:17:44 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1689959863; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=kQftevPX0XUeLPrBO0NAWxPIrge3Hp6/1+H4UC+Ikhg=; b=jOullois1qXlg5Og+Hk4Cxtese+TCHcC8rw2CeBbTUYPjQg7FTnFa6SP0p+5V8JrHXT/da mdFJ8HQdnvBlcY9viQASyeBegU5sASkpq5ANhGB4LihO0dE487hh3CGC6sPdmnpAAuSMU7 inuj12KMvP2UdGF5aE1s2CTQsTtq9hk= Received: from mail-ed1-f72.google.com (mail-ed1-f72.google.com [209.85.208.72]) by relay.mimecast.com with ESMTP with STARTTLS (version=TLSv1.3, cipher=TLS_AES_256_GCM_SHA384) id us-mta-126-fzQvIExyN-K0oYqg6jbvuA-1; Fri, 21 Jul 2023 13:17:42 -0400 X-MC-Unique: fzQvIExyN-K0oYqg6jbvuA-1 Received: by mail-ed1-f72.google.com with SMTP id 4fb4d7f45d1cf-51e10990adfso1349896a12.0 for ; Fri, 21 Jul 2023 10:17:41 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20221208; t=1689959861; x=1690564661; h=content-transfer-encoding:in-reply-to:subject:from:references:cc:to :content-language:user-agent:mime-version:date:message-id :x-gm-message-state:from:to:cc:subject:date:message-id:reply-to; bh=kQftevPX0XUeLPrBO0NAWxPIrge3Hp6/1+H4UC+Ikhg=; b=XOFXVVxZ/jpTKOTNjaGqGnOfp4R7VRoO3ABCjRnZuiuNXLBkRJSShRnKl0jc6HeDtv UZ1hRaMi292Vaviz0qKo49SLGfzxnD0XCq0ewwVL7eQzv0WZsK4YsuJLT8i3mMCSdh/S a6q2s+pOJ7iRtryK1VXMDzbdVIXoWq84HcWQczE9OwpaulTQviuYL+svgMVPh/6vOQSf pEo6MAL6hv559BTdec/eFGu2SWvErMAbZvMwzzxcUwfNo6Bjkm+QCXvUljvD3ndTCyan lluLRz5BTCeqiMqnkCaNihLLSsSoRLzZ4WKkRCIHWFoJX9pPQTeZnxu2xbS3/UKZNF7G ovfw== X-Gm-Message-State: ABy/qLYUN5JegaCcjxERbOsseQqlR4hZM6h2LqLn6dBlTMqC00Ff6ZcN aX+E5yKk9LHmQkJWdyEwonUVBsD1kFkG85UjHkxapd9xHPqONpiXFUsJV1oz5ZZXLwULBXlER1Q A8XdveKFHzGIa4yAp1TdRAIv6 X-Received: by 2002:aa7:c753:0:b0:51e:1a51:d414 with SMTP id c19-20020aa7c753000000b0051e1a51d414mr1878176eds.32.1689959861038; Fri, 21 Jul 2023 10:17:41 -0700 (PDT) X-Received: by 2002:aa7:c753:0:b0:51e:1a51:d414 with SMTP id c19-20020aa7c753000000b0051e1a51d414mr1878159eds.32.1689959860744; Fri, 21 Jul 2023 10:17:40 -0700 (PDT) Received: from ?IPV6:2001:b07:6468:f312:9af8:e5f5:7516:fa89? ([2001:b07:6468:f312:9af8:e5f5:7516:fa89]) by smtp.googlemail.com with ESMTPSA id l9-20020aa7c309000000b0051d87e72159sm2346640edq.13.2023.07.21.10.17.38 (version=TLS1_3 cipher=TLS_AES_128_GCM_SHA256 bits=128/128); Fri, 21 Jul 2023 10:17:40 -0700 (PDT) Message-ID: <8ad7a846-64e9-a3f1-4bf1-731a994d62cb@redhat.com> Date: Fri, 21 Jul 2023 19:17:37 +0200 MIME-Version: 1.0 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:102.0) Gecko/20100101 Thunderbird/102.13.0 Content-Language: en-US To: Sean Christopherson , Marc Zyngier , Oliver Upton , Huacai Chen , Michael Ellerman , Anup Patel , Paul Walmsley , Palmer Dabbelt , Albert Ou , "Matthew Wilcox (Oracle)" , Andrew Morton , Paul Moore , James Morris , "Serge E. Hallyn" Cc: 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-security-module@vger.kernel.org, linux-kernel@vger.kernel.org, Chao Peng , Fuad Tabba , Jarkko Sakkinen , Yu Zhang , Vishal Annapurve , Ackerley Tng , Maciej Szmigiero , Vlastimil Babka , David Hildenbrand , Quentin Perret , Michael Roth , Wang , Liam Merwick , Isaku Yamahata , "Kirill A . Shutemov" References: <20230718234512.1690985-1-seanjc@google.com> <20230718234512.1690985-13-seanjc@google.com> From: Paolo Bonzini Subject: Re: [RFC PATCH v11 12/29] KVM: Add KVM_CREATE_GUEST_MEMFD ioctl() for guest-specific backing memory In-Reply-To: <20230718234512.1690985-13-seanjc@google.com> Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 7bit X-Spam-Status: No, score=-2.2 required=5.0 tests=BAYES_00,DKIMWL_WL_HIGH, DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,NICE_REPLY_A, RCVD_IN_DNSWL_NONE,RCVD_IN_MSPIKE_H4,RCVD_IN_MSPIKE_WL,SPF_HELO_NONE, SPF_NONE,T_SCC_BODY_TEXT_LINE autolearn=unavailable autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on lindbergh.monkeyblade.net Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On 7/19/23 01:44, Sean Christopherson wrote: > + inode = alloc_anon_inode(mnt->mnt_sb); > + if (IS_ERR(inode)) > + return PTR_ERR(inode); > + > + err = security_inode_init_security_anon(inode, &qname, NULL); > + if (err) > + goto err_inode; > + I don't understand the need to have a separate filesystem. If it is to fully setup the inode before it's given a struct file, why not just export anon_inode_make_secure_inode instead of security_inode_init_security_anon? Paolo