public inbox for stable@vger.kernel.org
 help / color / mirror / Atom feed
From: Sean Christopherson <seanjc@google.com>
To: Peter Gonda <pgonda@google.com>
Cc: kvm list <kvm@vger.kernel.org>, Marc Orr <marcorr@google.com>,
	Paolo Bonzini <pbonzini@redhat.com>,
	Brijesh Singh <brijesh.singh@amd.com>,
	stable@vger.kernel.org, linux-kernel@vger.kernel.org
Subject: Re: [PATCH] KVM: SEV: Acquire vcpu mutex when updating VMSA
Date: Tue, 14 Sep 2021 23:43:25 +0000	[thread overview]
Message-ID: <YUEznQvx+bycn9Iq@google.com> (raw)
In-Reply-To: <CAMkAt6rSsKuzE__pAodiJR9wFU-B3942+kdkQG-3M+jxhVco2w@mail.gmail.com>

On Tue, Sep 14, 2021, Peter Gonda wrote:
> That looks reasonable to me. I didn't know if changes headed for LTS
> should be smaller so I avoided doing this refactor. From:
> https://www.kernel.org/doc/html/v4.11/process/stable-kernel-rules.html#stable-kernel-rules
> seems to say less than 100 lines is ideal.

Most the rules are more like guidelines ;-)  In seriousness, there's a balance to
be had between minimizing the diff and keeping everything maintainable.  E.g. if
the fix is kept small and then the upstream code is immediately refactored, any
future fixes to the refactored code will be harder to backport.  And the actual
fix would also be poorly tested in upstream since folks would be testing the
refactored version of the code.

> I guess this could also be a "theoretical race condition” anyways so maybe
> not for LTS anyways.

If there's doubt, write a test :-)  The "theoretical race condition" thing is to
discourage people from backporting fixes for ridiculously tiny windows that may
or may not be exploitable.  This is a giant gaping chasm that userspace can drive
a car through, e.g. literally "do KVM_RUN at the same time".

      reply	other threads:[~2021-09-14 23:43 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2021-09-14 20:06 [PATCH] KVM: SEV: Acquire vcpu mutex when updating VMSA Peter Gonda
2021-09-14 21:33 ` Sean Christopherson
2021-09-14 22:39   ` Peter Gonda
2021-09-14 23:43     ` Sean Christopherson [this message]

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=YUEznQvx+bycn9Iq@google.com \
    --to=seanjc@google.com \
    --cc=brijesh.singh@amd.com \
    --cc=kvm@vger.kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=marcorr@google.com \
    --cc=pbonzini@redhat.com \
    --cc=pgonda@google.com \
    --cc=stable@vger.kernel.org \
    /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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox