From: Richard Weinberger <richard@sigma-star.at>
To: dwmw@amazon.co.uk
Cc: mingo@kernel.org, luto@kernel.org, arjan@linux.intel.com,
bp@alien8.de, dan.j.williams@intel.com,
dave.hansen@linux.intel.com, gregkh@linuxfoundation.org,
jpoimboe@redhat.com, torvalds@linux-foundation.org,
peterz@infradead.org, tglx@linutronix.de,
arjan.van.de.ven@intel.com, dave.hansen@intel.com,
jmattson@google.com, karahmed@amazon.de, kvm@vger.kernel.org,
pbonzini@redhat.com, rkrcmar@redhat.com, sironi@amazon.de,
linux-kernel@vger.kernel.org
Subject: Revert "x86/speculation: Simplify indirect_branch_prediction_barrier()" crashes KVM guest
Date: Fri, 16 Feb 2018 00:12:00 +0100 [thread overview]
Message-ID: <1753460.Vme2X1QhPT@blindfold> (raw)
Hi!
commit f208820a321f9b23d77d7eed89945d862d62a3ed
Author: David Woodhouse <dwmw@amazon.co.uk>
Date: Sat Feb 10 23:39:23 2018 +0000
Revert "x86/speculation: Simplify indirect_branch_prediction_barrier()"
This reverts commit 64e16720ea0879f8ab4547e3b9758936d483909b.
We cannot call C functions like that, without marking all the
call-clobbered registers as, well, clobbered. We might have got away
with it for now because the __ibp_barrier() function was *fairly*
unlikely to actually use any other registers. But no. Just no.
causes a crash here. When I revert this revert on top of Linus' tree, it works fine.
Host is v4.13 + qemu-2.9.1 (openSUSE).
[ 2.776181] general protection fault: 0000 [#1] SMP PTI
[ 2.777146] Modules linked in:
[ 2.777422] CPU: 1 PID: 1208 Comm: systemd-journal Not tainted 4.16.0-rc1+ #111
[ 2.778079] Hardware name: QEMU Standard PC (i440FX + PIIX, 1996), BIOS 1.0.0-prebuilt.qemu-project.org 04/01/2014
[ 2.778988] RIP: 0010:switch_mm_irqs_off+0x2f1/0x3c0
[ 2.779372] RSP: 0018:ffffac6f0053bd60 EFLAGS: 00010097
[ 2.779808] RAX: 0000000000000001 RBX: ffff99c9ba6c5dc0 RCX: 0000000000000049
[ 2.780490] RDX: 0000000000000000 RSI: ffff99c9ba6c5dc0 RDI: ffff99c9baac6e40
[ 2.781087] RBP: 0000000000000001 R08: 0000000000000202 R09: 0000000000000000
[ 2.781739] R10: 0000000000000001 R11: 0000000000000000 R12: ffff99c9baac6e40
[ 2.782400] R13: ffff99c9bc509c40 R14: ffff99c9ba6c5dc0 R15: ffff99c9baac6e40
[ 2.783000] FS: 00007f410fff3840(0000) GS:ffff99c9bfc80000(0000) knlGS:0000000000000000
[ 2.783630] CS: 0010 DS: 0000 ES: 0000 CR0: 0000000080050033
[ 2.784059] CR2: 00007f410df0d000 CR3: 000000007a8f4000 CR4: 00000000000006e0
[ 2.784606] Call Trace:
[ 2.784807] __schedule+0x20e/0x6d0
[ 2.785083] schedule+0x23/0x80
[ 2.785331] schedule_hrtimeout_range_clock+0x158/0x170
[ 2.785744] ? ep_scan_ready_list.constprop.16+0x1de/0x1e0
[ 2.786178] ? file_has_perm+0x57/0x90
[ 2.786472] ep_poll+0x26f/0x370
[ 2.786730] ? wake_up_q+0x70/0x70
[ 2.786998] SyS_epoll_wait+0xb8/0xd0
[ 2.787285] do_syscall_64+0x5c/0x110
[ 2.787575] entry_SYSCALL_64_after_hwframe+0x3d/0xa2
[ 2.787967] RIP: 0033:0x7f410f904be3
[ 2.788245] RSP: 002b:00007ffff3e65c58 EFLAGS: 00000246 ORIG_RAX: 00000000000000e8
[ 2.788828] RAX: ffffffffffffffda RBX: ffffffffffffffff RCX: 00007f410f904be3
[ 2.789376] RDX: 000000000000000f RSI: 00007ffff3e65c60 RDI: 0000000000000007
[ 2.789919] RBP: 00007ffff3e65e40 R08: 00000000000216c7 R09: 00000000ff9746cd
[ 2.790466] R10: 00000000ffffffff R11: 0000000000000246 R12: 000055b4dd2270d0
[ 2.791009] R13: 000055b4dd2270f0 R14: 000055b4dd2270b0 R15: 00007ffff3e65c60
[ 2.791518] Code: 8b 45 00 49 8b 7d 08 49 83 c5 18 31 d2 31 f6 ff d0 49 8b 45 00 48 85 c0 75 e9 eb b1 b9 49 00 00 00 b8 01 00 00 00 ba 00 00 00 00 <0f> 30 e9 68 fd ff ff 9c 58 0f 1f 44 00 00 48 89 c5 fa 66 0f 1f
[ 2.792931] RIP: switch_mm_irqs_off+0x2f1/0x3c0 RSP: ffffac6f0053bd60
[ 2.793518] ---[ end trace eb29cfddc2907c66 ]---
Thanks,
//richard
--
sigma star gmbh - Eduard-Bodem-Gasse 6 - 6020 Innsbruck - Austria
ATU66964118 - FN 374287y
next reply other threads:[~2018-02-15 23:12 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2018-02-15 23:12 Richard Weinberger [this message]
2018-02-15 23:28 ` Revert "x86/speculation: Simplify indirect_branch_prediction_barrier()" crashes KVM guest David Woodhouse
2018-02-15 23:45 ` Richard Weinberger
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=1753460.Vme2X1QhPT@blindfold \
--to=richard@sigma-star.at \
--cc=arjan.van.de.ven@intel.com \
--cc=arjan@linux.intel.com \
--cc=bp@alien8.de \
--cc=dan.j.williams@intel.com \
--cc=dave.hansen@intel.com \
--cc=dave.hansen@linux.intel.com \
--cc=dwmw@amazon.co.uk \
--cc=gregkh@linuxfoundation.org \
--cc=jmattson@google.com \
--cc=jpoimboe@redhat.com \
--cc=karahmed@amazon.de \
--cc=kvm@vger.kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=luto@kernel.org \
--cc=mingo@kernel.org \
--cc=pbonzini@redhat.com \
--cc=peterz@infradead.org \
--cc=rkrcmar@redhat.com \
--cc=sironi@amazon.de \
--cc=tglx@linutronix.de \
--cc=torvalds@linux-foundation.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