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 lists.ozlabs.org (lists.ozlabs.org [112.213.38.117]) (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 D7A15C001DC for ; Fri, 21 Jul 2023 17:18:44 +0000 (UTC) Authentication-Results: lists.ozlabs.org; dkim=fail reason="signature verification failed" (1024-bit key; unprotected) header.d=redhat.com header.i=@redhat.com header.a=rsa-sha256 header.s=mimecast20190719 header.b=aGpEsayE; dkim=fail reason="signature verification failed" (1024-bit key) header.d=redhat.com header.i=@redhat.com header.a=rsa-sha256 header.s=mimecast20190719 header.b=aGpEsayE; dkim-atps=neutral Received: from boromir.ozlabs.org (localhost [IPv6:::1]) by lists.ozlabs.org (Postfix) with ESMTP id 4R6x9H1JrHz3cMQ for ; Sat, 22 Jul 2023 03:18:43 +1000 (AEST) Authentication-Results: lists.ozlabs.org; dkim=pass (1024-bit key; unprotected) header.d=redhat.com header.i=@redhat.com header.a=rsa-sha256 header.s=mimecast20190719 header.b=aGpEsayE; dkim=pass (1024-bit key) header.d=redhat.com header.i=@redhat.com header.a=rsa-sha256 header.s=mimecast20190719 header.b=aGpEsayE; dkim-atps=neutral Authentication-Results: lists.ozlabs.org; spf=pass (sender SPF authorized) smtp.mailfrom=redhat.com (client-ip=170.10.129.124; helo=us-smtp-delivery-124.mimecast.com; envelope-from=pbonzini@redhat.com; receiver=lists.ozlabs.org) Received: from us-smtp-delivery-124.mimecast.com (us-smtp-delivery-124.mimecast.com [170.10.129.124]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (2048 bits) server-digest SHA256) (No client certificate requested) by lists.ozlabs.org (Postfix) with ESMTPS id 4R6x8F5m6fz3brc for ; Sat, 22 Jul 2023 03:17:49 +1000 (AEST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1689959866; 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=aGpEsayEMem0cQqB5aOt2SUVg8DQE1B3mFYgL4PpxE87aXikhL5twTM45vbLLM/+R4Fs5R O9AjnxRAbM0f36qfWn6wfDodxw9KCCtapAuOJ7Sp+4pz5P2vXNSYXXS1UDWboMILWZ8jRS JAEPIkaVq3UOYP28oXggesOgB4YK97o= DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1689959866; 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=aGpEsayEMem0cQqB5aOt2SUVg8DQE1B3mFYgL4PpxE87aXikhL5twTM45vbLLM/+R4Fs5R O9AjnxRAbM0f36qfWn6wfDodxw9KCCtapAuOJ7Sp+4pz5P2vXNSYXXS1UDWboMILWZ8jRS JAEPIkaVq3UOYP28oXggesOgB4YK97o= Received: from mail-ed1-f69.google.com (mail-ed1-f69.google.com [209.85.208.69]) by relay.mimecast.com with ESMTP with STARTTLS (version=TLSv1.3, cipher=TLS_AES_256_GCM_SHA384) id us-mta-627-h9plkLUiOcqidxIAawkBAQ-1; Fri, 21 Jul 2023 13:17:42 -0400 X-MC-Unique: h9plkLUiOcqidxIAawkBAQ-1 Received: by mail-ed1-f69.google.com with SMTP id 4fb4d7f45d1cf-521a38098faso1345603a12.2 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=YO4T0m430/XrdXJb/kjv5KDtpQyXz3+T8w0lqJzwkgCnJUm1cm+POyT8B9jb17eMqm fG/FF2sEt4NKA8DANp8D4G3MvDRNi+LkyVa47oZjuAszQ29YANlaMwwmHqmU0ztfT/AD DtpJY3sy+dAmkLZXYI6wR8IVdh1QE+QL+TyJNAfK91e+c9DdsSlfA5wznApTFaLT7MfK 0Efi49iDlHH8oqoF1o+Fo39XXtxBn1BTRTTGbjvsUKSGTutLA+Gjdw2JpT3hvlYEra3U CjZcSyeUiV/AMJS+yhFoz2uEAFk4yBX7pfcynsEkA7zDRrgnWiVhIy0ysFMFy7sg+DlH jshA== X-Gm-Message-State: ABy/qLZb7Fd3BDuVz8hpwL7k+O2wo6RYKVHuB0HIeeCYaAIAXUu55V+o BOb2lDNlRlfhOk8uA5/WoX5xHdjWJ/CZBVzaz3dCy4udYaVe1Zbh8NzhVPxE8mW7ygiNwfQijYE 9MAWutyBNmDsOD76CbHTVxKTBag== X-Received: by 2002:aa7:c753:0:b0:51e:1a51:d414 with SMTP id c19-20020aa7c753000000b0051e1a51d414mr1878187eds.32.1689959861040; Fri, 21 Jul 2023 10:17:41 -0700 (PDT) X-Google-Smtp-Source: APBJJlFyyf9U2FFYwtGg7Nfx7TqscSvBa0fBBUyOLoWSpgQImoylEzXmYhbWs/84TcbA6dVob4NtSg== 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 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" 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> X-Mimecast-Spam-Score: 0 X-Mimecast-Originator: redhat.com Content-Language: en-US Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 7bit X-BeenThere: linuxppc-dev@lists.ozlabs.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: Linux on PowerPC Developers Mail List List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: kvm@vger.kernel.org, David Hildenbrand , linux-kernel@vger.kernel.org, linux-mm@kvack.org, Chao Peng , linux-riscv@lists.infradead.org, Isaku Yamahata , linux-security-module@vger.kernel.org, Wang , Fuad Tabba , Maciej Szmigiero , Michael Roth , Ackerley Tng , kvmarm@lists.linux.dev, Vlastimil Babka , linux-arm-kernel@lists.infradead.org, Quentin Perret , linux-mips@vger.kernel.org, Jarkko Sakkinen , Yu Zhang , kvm-riscv@lists.infradead.org, linux-fsdevel@vger.kernel.org, Liam Merwick , Vishal Annapurve , linuxppc-dev@lists.ozlabs.org, "Kirill A . Shutemov" Errors-To: linuxppc-dev-bounces+linuxppc-dev=archiver.kernel.org@lists.ozlabs.org Sender: "Linuxppc-dev" 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