All of lore.kernel.org
 help / color / mirror / Atom feed
From: Sean Christopherson <seanjc@google.com>
To: Aaron Lewis <aaronlewis@google.com>
Cc: kvm@vger.kernel.org, pbonzini@redhat.com, jmattson@google.com
Subject: Re: [PATCH v4 1/5] KVM: x86: Disallow the use of KVM_MSR_FILTER_DEFAULT_ALLOW in the kernel
Date: Fri, 7 Oct 2022 21:57:59 +0000	[thread overview]
Message-ID: <Y0Cg5zPruZZPg9Ed@google.com> (raw)
In-Reply-To: <20220921151525.904162-2-aaronlewis@google.com>

On Wed, Sep 21, 2022, Aaron Lewis wrote:
> Protect the kernel from using the flag KVM_MSR_FILTER_DEFAULT_ALLOW.
> Its value is 0, and using it incorrectly could have unintended
> consequences. E.g. prevent someone in the kernel from writing something
> like this.
> 
> if (filter.flags & KVM_MSR_FILTER_DEFAULT_ALLOW)
>         <allow the MSR>
> 
> and getting confused when it doesn't work.
> 
> It would be more ideal to remove this flag altogether, but userspace
> may already be using it, so protecting the kernel is all that can
> reasonably be done at this point.
> 
> Suggested-by: Sean Christopherson <seanjc@google.com>
> Signed-off-by: Aaron Lewis <aaronlewis@google.com>
> ---

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

> Google's VMM is already using this flag, so we *know* that dropping the
> flag entirely will break userspace.  All we can do at this point is
> prevent the kernel from using it.

LOL, nice.

  reply	other threads:[~2022-10-07 21:58 UTC|newest]

Thread overview: 10+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2022-09-21 15:15 [PATCH v4 0/5] MSR filtering and MSR exiting flag clean up Aaron Lewis
2022-09-21 15:15 ` [PATCH v4 1/5] KVM: x86: Disallow the use of KVM_MSR_FILTER_DEFAULT_ALLOW in the kernel Aaron Lewis
2022-10-07 21:57   ` Sean Christopherson [this message]
2022-09-21 15:15 ` [PATCH v4 2/5] KVM: x86: Add a VALID_MASK for the MSR exit reason flags Aaron Lewis
2022-10-07 22:04   ` Sean Christopherson
2022-09-21 15:15 ` [PATCH v4 3/5] KVM: x86: Add a VALID_MASK for the flag in kvm_msr_filter Aaron Lewis
2022-09-21 15:15 ` [PATCH v4 4/5] KVM: x86: Add a VALID_MASK for the flags in kvm_msr_filter_range Aaron Lewis
2022-09-21 15:15 ` [PATCH v4 5/5] selftests: kvm/x86: Test the flags in MSR filtering and MSR exiting Aaron Lewis
2022-10-07 22:24   ` Sean Christopherson
2022-11-02 17:09 ` [PATCH v4 0/5] MSR filtering and MSR exiting flag clean up Paolo Bonzini

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=Y0Cg5zPruZZPg9Ed@google.com \
    --to=seanjc@google.com \
    --cc=aaronlewis@google.com \
    --cc=jmattson@google.com \
    --cc=kvm@vger.kernel.org \
    --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.