mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: "Jürgen Groß" <jgross@suse.com>
To: Andy Lutomirski <luto@amacapital.net>
Cc: Andy Lutomirski <luto@kernel.org>,
	Andrew Cooper <andrew.cooper3@citrix.com>,
	Josh Poimboeuf <jpoimboe@redhat.com>,
	Peter Zijlstra <peterz@infradead.org>,
	Shinichiro Kawasaki <shinichiro.kawasaki@wdc.com>,
	linux-kernel@vger.kernel.org, Nicholas Piggin <npiggin@gmail.com>,
	Damien Le Moal <Damien.LeMoal@wdc.com>, X86 ML <x86@kernel.org>
Subject: Re: WARNING: can't access registers at asm_common_interrupt
Date: Sun, 15 Nov 2020 17:13:55 +0100	[thread overview]
Message-ID: <65373524-6c5f-cd55-9146-cf3e947bd423@suse.com> (raw)
In-Reply-To: <53DCD372-A847-4B74-A034-330E372B4EB5@amacapital.net>


[-- Attachment #1.1.1: Type: text/plain, Size: 1863 bytes --]

On 15.11.20 17:05, Andy Lutomirski wrote:
> 
>> On Nov 14, 2020, at 10:33 PM, Jürgen Groß <jgross@suse.com> wrote:
>>
>> On 14.11.20 19:10, Andy Lutomirski wrote:
>>>> On Sat, Nov 14, 2020 at 1:16 AM Jürgen Groß <jgross@suse.com> wrote:
>>>>
>>>> On 13.11.20 18:34, Andy Lutomirski wrote:
>>>>> On Wed, Nov 11, 2020 at 12:25 PM Andrew Cooper
>>>>> <andrew.cooper3@citrix.com> wrote:
>>>>>
>>>>> So I think there is at most one of these that wants anything more
>>>>> complicated than a plain ALTERNATIVE.  Any volunteers to make it so?
>>>>> Juergen, if you do all of them except USERGS_SYSRET64, I hereby
>>>>> volunteer to do that one.
>>>>
>>>> Why is a plain alternative (either swapgs; sysretq or a jmp xen_sysret64
>>>> depending on X86_FEATURE_XENPV) no option?
>>>>
>>>> Its not as if this code would run before alternative patching.
>>> ALTERNATIVE would "work" in the sense that it would function and be
>>> just about as nonsensical as the current code.  Fundamentally, Xen
>>> PV's sysret feature is not a drop-in replacement for SYSRET64, and
>>> pretending that it is seems unlikely to work well.  I suspect that the
>>> current code is some combination of exceedingly slow, non-functional,
>>> and incorrect in subtle ways.
>>> We should just have a separate Xen PV exit path the same way we have a
>>> separate entry path in recent kernels.  *This* is what I'm
>>> volunteering to do.
>>
>> I don't think there is much work needed. Xen PV does basically a return
>> to user mode via IRET. I think it might work just to use
>> swapgs_restore_regs_and_return_to_usermode() unconditionally for Xen PV.
>>
> 
> I’m quite confident that will work, but I was hoping to get it to work quickly too :)

The PV interface requires to use the iret hypercall, because there
is no sysret equivalent.


Juergen

[-- Attachment #1.1.2: OpenPGP_0xB0DE9DD628BF132F.asc --]
[-- Type: application/pgp-keys, Size: 3135 bytes --]

[-- Attachment #2: OpenPGP digital signature --]
[-- Type: application/pgp-signature, Size: 495 bytes --]

  reply	other threads:[~2020-11-15 16:14 UTC|newest]

Thread overview: 32+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2020-11-06  6:04 Shinichiro Kawasaki
2020-11-06 18:06 ` Josh Poimboeuf
2020-11-09  9:10   ` Shinichiro Kawasaki
2020-11-10  3:19     ` Josh Poimboeuf
2020-11-10  9:19       ` Shinichiro Kawasaki
2020-11-11 17:05 ` Josh Poimboeuf
2020-11-11 17:47   ` Peter Zijlstra
2020-11-11 18:13     ` Josh Poimboeuf
2020-11-11 18:46       ` Andrew Cooper
2020-11-11 19:42         ` Peter Zijlstra
2020-11-11 19:59           ` Josh Poimboeuf
2020-11-11 20:07             ` Peter Zijlstra
2020-11-11 20:15               ` Josh Poimboeuf
2020-11-11 20:25                 ` Andrew Cooper
2020-11-11 20:39                   ` Peter Zijlstra
2020-11-13 17:34                   ` Andy Lutomirski
2020-11-14  9:16                     ` Jürgen Groß
2020-11-14 18:10                       ` Andy Lutomirski
2020-11-15  6:33                         ` Jürgen Groß
2020-11-15 16:05                           ` Andy Lutomirski
2020-11-15 16:13                             ` Jürgen Groß [this message]
2020-11-16 11:56                     ` Jürgen Groß
2020-11-16 13:04                       ` Peter Zijlstra
2020-11-18  6:47                         ` Jürgen Groß
2020-11-18  8:22                           ` Peter Zijlstra
2020-11-19 11:51                             ` Shinichiro Kawasaki
2020-11-19 12:01                               ` Peter Zijlstra
2020-11-19 12:28                                 ` Jürgen Groß
2020-11-19 12:48                                 ` Shinichiro Kawasaki
2020-11-11 20:35                 ` Peter Zijlstra
2020-11-11 20:42       ` Peter Zijlstra
  -- strict thread matches above, loose matches on Subject: below --
2020-09-06 20:46 syzbot

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=65373524-6c5f-cd55-9146-cf3e947bd423@suse.com \
    --to=jgross@suse.com \
    --cc=Damien.LeMoal@wdc.com \
    --cc=andrew.cooper3@citrix.com \
    --cc=jpoimboe@redhat.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=luto@amacapital.net \
    --cc=luto@kernel.org \
    --cc=npiggin@gmail.com \
    --cc=peterz@infradead.org \
    --cc=shinichiro.kawasaki@wdc.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

all inboxes | Powered by JetHome®