All of lore.kernel.org
 help / color / mirror / Atom feed
From: Sean Christopherson <seanjc@google.com>
To: Oliver Upton <oliver.upton@linux.dev>
Cc: kvm@vger.kernel.org, Paolo Bonzini <pbonzini@redhat.com>,
	Oliver Upton <oupton@google.com>
Subject: Re: [PATCH v3 4/6] KVM: Pass the name of the VM fd to kvm_create_vm_debugfs()
Date: Fri, 5 Aug 2022 19:20:35 +0000	[thread overview]
Message-ID: <Yu1tg3z08hb7Vqon@google.com> (raw)
In-Reply-To: <20220720092259.3491733-5-oliver.upton@linux.dev>

On Wed, Jul 20, 2022, Oliver Upton wrote:
> From: Oliver Upton <oupton@google.com>
> 
> At the time the VM fd is used in kvm_create_vm_debugfs(), the fd has
> been allocated but not yet installed. It is only really useful as an
> identifier in strings for the VM (such as debugfs).
> 
> Treat it exactly as such by passing the string name of the fd to
> kvm_create_vm_debugfs(), futureproofing against possible misuse of the
> VM fd.

One last whine session,

  kvm_create_vm_debugfs() to guard against attempts to consume the fd
  before it is installed.

> Suggested-by: Sean Christopherson <seanjc@google.com>
> Signed-off-by: Oliver Upton <oupton@google.com>
> ---

Reviewed-by: Sean Christopherson <seanjc@google.com>

  reply	other threads:[~2022-08-05 19:20 UTC|newest]

Thread overview: 19+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2022-07-20  9:22 [PATCH v3 0/6] KVM: Clean up debugfs init/destroy Oliver Upton
2022-07-20  9:22 ` [PATCH v3 1/6] KVM: Shove vm stats_id init into kvm_create_vm() Oliver Upton
2022-08-05 19:09   ` Sean Christopherson
2022-07-20  9:22 ` [PATCH v3 2/6] KVM: Shove vcpu stats_id init into kvm_vcpu_init() Oliver Upton
2022-08-05 19:06   ` Sean Christopherson
2022-08-09 14:52     ` Paolo Bonzini
2022-07-20  9:22 ` [PATCH v3 3/6] KVM: Get an fd before creating the VM Oliver Upton
2022-08-05 19:03   ` Sean Christopherson
2022-07-20  9:22 ` [PATCH v3 4/6] KVM: Pass the name of the VM fd to kvm_create_vm_debugfs() Oliver Upton
2022-08-05 19:20   ` Sean Christopherson [this message]
2022-07-20  9:22 ` [PATCH v3 5/6] KVM: Actually create debugfs in kvm_create_vm() Oliver Upton
2022-08-05 19:16   ` Sean Christopherson
2022-07-20  9:22 ` [PATCH v3 6/6] KVM: Hoist debugfs_dentry init to kvm_create_vm_debugfs() (again) Oliver Upton
2022-08-05 19:02   ` Sean Christopherson
2022-08-09 14:56     ` Paolo Bonzini
2022-08-09 19:59       ` Oliver Upton
2022-07-20  9:22 ` [PATCH v3 0/6] KVM: Clean up debugfs init/destroy Oliver Upton
2022-07-20  9:22 ` [PATCH v3 1/6] KVM: Shove vm stats_id init into kvm_create_vm() Oliver Upton
2022-07-20  9:22 ` [PATCH v3 2/6] KVM: Shove vcpu stats_id init into kvm_vcpu_init() Oliver Upton

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=Yu1tg3z08hb7Vqon@google.com \
    --to=seanjc@google.com \
    --cc=kvm@vger.kernel.org \
    --cc=oliver.upton@linux.dev \
    --cc=oupton@google.com \
    --cc=pbonzini@redhat.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.