linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Sedat Dilek <sedat.dilek@gmail.com>
To: Sean Christopherson <seanjc@google.com>
Cc: Andy Lutomirski <luto@kernel.org>,
	x86@kernel.org, LKML <linux-kernel@vger.kernel.org>,
	Nick Desaulniers <ndesaulniers@google.com>,
	Brian Gerst <brgerst@gmail.com>, Joerg Roedel <jroedel@suse.de>
Subject: Re: [PATCH v2 1/2] x86/stackprotector/32: Make the canary into a regular percpu variable
Date: Tue, 16 Feb 2021 21:23:20 +0100	[thread overview]
Message-ID: <CA+icZUXmPXyVHdFwuunZfxtOid78Y_s2z=UuTfvzoNxu1F+DTw@mail.gmail.com> (raw)
In-Reply-To: <YCvw99dIJ9C90Q6R@google.com>

On Tue, Feb 16, 2021 at 5:21 PM Sean Christopherson <seanjc@google.com> wrote:
>
> On Sat, Feb 13, 2021, Andy Lutomirski wrote:
> > diff --git a/arch/x86/kvm/svm/svm.c b/arch/x86/kvm/svm/svm.c
> > index f923e14e87df..ec39073b4897 100644
> > --- a/arch/x86/kvm/svm/svm.c
> > +++ b/arch/x86/kvm/svm/svm.c
> > @@ -1467,12 +1467,8 @@ static void svm_vcpu_put(struct kvm_vcpu *vcpu)
> >  #ifdef CONFIG_X86_64
> >               loadsegment(fs, svm->host.fs);
> >               wrmsrl(MSR_KERNEL_GS_BASE, current->thread.gsbase);
> > -             load_gs_index(svm->host.gs);
> > -#else
> > -#ifdef CONFIG_X86_32_LAZY_GS
> > -             loadsegment(gs, svm->host.gs);
> > -#endif
>
> This manually GS crud is gone as of commit e79b91bb3c91 ("KVM: SVM: use
> vmsave/vmload for saving/restoring additional host state"), which is queued for
> 5.12.
>

Link to the above KVM patch see [1].

As said the base for this patchset should be changed - for example it
conflicts with [2].

Maybe wait for Linux v5.12-rc1?

- Sedat -

[1] https://git.kernel.org/pub/scm/virt/kvm/kvm.git/commit/?h=tags/kvm-5.12-1&id=e79b91bb3c916a52ce823ab60489c717c925c49f
[2] https://git.kernel.org/pub/scm/linux/kernel/git/tip/tip.git/tag/?h=x86-entry-2021-02-15

> >  #endif
> > +             load_gs_index(svm->host.gs);
> >
> >               for (i = 0; i < NR_HOST_SAVE_USER_MSRS; i++)
> >                       wrmsrl(host_save_user_msrs[i].index,
> > @@ -3705,13 +3701,11 @@ static noinstr void svm_vcpu_enter_exit(struct kvm_vcpu *vcpu,
> >       } else {
> >               __svm_vcpu_run(svm->vmcb_pa, (unsigned long *)&svm->vcpu.arch.regs);
> >
> > +             /* Restore the percpu segment immediately. */
> >  #ifdef CONFIG_X86_64
> >               native_wrmsrl(MSR_GS_BASE, svm->host.gs_base);
> >  #else
> >               loadsegment(fs, svm->host.fs);
> > -#ifndef CONFIG_X86_32_LAZY_GS
> > -             loadsegment(gs, svm->host.gs);
> > -#endif
> >  #endif
> >       }

  reply	other threads:[~2021-02-16 20:24 UTC|newest]

Thread overview: 24+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2021-02-13 19:19 [PATCH v2 0/2] Clean up x86_32 stackprotector Andy Lutomirski
2021-02-13 19:19 ` [PATCH v2 1/2] x86/stackprotector/32: Make the canary into a regular percpu variable Andy Lutomirski
2021-02-13 19:49   ` Sedat Dilek
2021-02-16 16:21   ` Sean Christopherson
2021-02-16 20:23     ` Sedat Dilek [this message]
2021-02-16 18:45   ` Nick Desaulniers
2021-02-16 20:29     ` Sedat Dilek
2021-03-08 13:14   ` [tip: x86/core] " tip-bot2 for Andy Lutomirski
2022-09-29 13:56   ` [PATCH v2 1/2] " Andy Shevchenko
2022-09-29 14:20     ` Andy Shevchenko
2022-09-30 20:30       ` Ferry Toth
2022-09-30 21:18         ` Ferry Toth
2022-11-09 14:50           ` Andy Shevchenko
2022-11-09 22:33             ` Brian Gerst
2022-11-10 14:02               ` Andy Shevchenko
2022-11-10 19:36               ` Ferry Toth
2022-11-14 21:43                 ` Brian Gerst
2022-11-14 22:16                   ` Ferry Toth
2022-11-17 19:28                     ` Ferry Toth
2021-02-13 19:19 ` [PATCH v2 2/2] x86/entry/32: Remove leftover macros after stackprotector cleanups Andy Lutomirski
2021-03-08 13:14   ` [tip: x86/core] " tip-bot2 for Andy Lutomirski
2021-02-13 19:33 ` [PATCH v2 0/2] Clean up x86_32 stackprotector Sedat Dilek
2021-02-14 14:42 ` Sedat Dilek
2021-02-16 18:13 ` Nick Desaulniers

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='CA+icZUXmPXyVHdFwuunZfxtOid78Y_s2z=UuTfvzoNxu1F+DTw@mail.gmail.com' \
    --to=sedat.dilek@gmail.com \
    --cc=brgerst@gmail.com \
    --cc=jroedel@suse.de \
    --cc=linux-kernel@vger.kernel.org \
    --cc=luto@kernel.org \
    --cc=ndesaulniers@google.com \
    --cc=seanjc@google.com \
    --cc=x86@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;
as well as URLs for NNTP newsgroup(s).