From: Dave Hansen <dave.hansen@intel.com>
To: Andy Lutomirski <luto@amacapital.net>,
Borislav Petkov <bp@suse.de>, Ingo Molnar <mingo@kernel.org>,
Linus Torvalds <torvalds@linux-foundation.org>,
Oleg Nesterov <oleg@redhat.com>, Pekka Riikonen <priikone@iki.fi>,
Rik van Riel <riel@redhat.com>,
Suresh Siddha <sbsiddha@gmail.com>,
LKML <linux-kernel@vger.kernel.org>,
"Yu, Fenghua" <fenghua.yu@intel.com>
Subject: Oops with tip/x86/fpu
Date: Wed, 04 Mar 2015 10:30:49 -0800 [thread overview]
Message-ID: <54F74F59.5070107@intel.com> (raw)
I'm running a commit from the tip/x86/fpu branch: ae486033b98. It's on
a system which I normally boot with 'noxsaves'. When I boot without
'noxsaves' it is getting a GPF around the time that init is forked off.
The full oops is below, but addr2line points to the "alternative_input("
line in xrstor_state().
The one that oopses has this in bootup:
xsave: enabled xstate_bv 0x1f, cntxt size 0x3c0 using compacted form
The one that works says:
xsave: enabled xstate_bv 0x1f, cntxt size 0x440 using standard form
I bisected it down to:
> commit 110d7f7513bbb916b8654da9e2973ac5bed929a9
> Author: Oleg Nesterov <oleg@redhat.com>
> Date: Mon Jan 19 19:52:12 2015 +0100
>
> x86/fpu: Don't abuse FPU in kernel threads if use_eager_fpu()
>
> AFAICS, there is no reason why kernel threads should have FPU context
> even if use_eager_fpu() == T. Now that interrupted_kernel_fpu_idle()
> does not check __thread_has_fpu() in the use_eager_fpu() case, we
> can remove the init_fpu() code from eager_fpu_init() and change
> flush_thread() called by do_execve() to initialize FPU.
>
> Note: of course, the change in flush_thread() is horrible and must be
> cleanuped. We need the new helper, and flush_thread() should return the
> error if init_fpu() fails.
It disassembles to:
> All code
> ========
> 0: 00 00 add %al,(%rax)
> 2: 48 c7 c7 58 a4 12 82 mov $0xffffffff8212a458,%rdi
> 9: e8 03 13 14 00 callq 0x141311
> e: db e2 fnclex
> 10: 0f 77 emms
> 12: db 83 3c 05 00 00 fildl 0x53c(%rbx)
> 18: 0f 1f 44 00 00 nopl 0x0(%rax,%rax,1)
> 1d: b8 ff ff ff ff mov $0xffffffff,%eax
> 22: 48 8b bb 40 05 00 00 mov 0x540(%rbx),%rdi
> 29: 89 c2 mov %eax,%edx
> 2b:* 48 0f c7 1f xrstors64 (%rdi) <-- trapping instruction
> 2f: 31 c0 xor %eax,%eax
> 31: 45 31 e4 xor %r12d,%r12d
> 34: 85 c0 test %eax,%eax
> 36: 48 c7 c7 a8 a4 12 82 mov $0xffffffff8212a4a8,%rdi
> 3d: 41 rex.B
> 3e: 0f .byte 0xf
> 3f: 95 xchg %eax,%ebp
...
> [ 14.193801] Freeing unused kernel memory: 560K (ffff880001974000 - ffff880001a00000)
> [ 14.203661] Freeing unused kernel memory: 1916K (ffff880001e21000 - ffff880002000000)
> [ 14.213132] general protection fault: 0000 [#1] SMP
> [ 14.218786] Modules linked in:
> [ 14.222273] CPU: 1 PID: 1 Comm: swapper/0 Not tainted 3.19.0-00430-gae48603-dirty #1428
> [ 14.231375] Hardware name: Intel Corporation Skylake Client platform/Skylake Y LPDDR3 RVP3, BIOS SKLSE2P1.86C.X062.R00.1411270820 11/27/2014
> [ 14.245698] task: ffff8801485a8000 ti: ffff880148620000 task.ti: ffff880148620000
> [ 14.254189] RIP: 0010:[<ffffffff81004eda>] [<ffffffff81004eda>] math_state_restore+0x13a/0x380
> [ 14.264076] RSP: 0000:ffff880148623b98 EFLAGS: 00010296
> [ 14.270090] RAX: 00000000ffffffff RBX: ffff8801485a8000 RCX: 0000000000000000
> [ 14.278186] RDX: 00000000ffffffff RSI: 0000000000000000 RDI: ffff88007f5f0000
> [ 14.286277] RBP: ffff880148623bb8 R08: 0000000000000000 R09: ffff88007f5f0000
> [ 14.294371] R10: 0000000000000001 R11: 0000000000000000 R12: ffff8801485a8000
> [ 14.302468] R13: ffff88007f5e0000 R14: ffff8801485a8000 R15: ffffffff821ca800
> [ 14.310574] FS: 0000000000000000(0000) GS:ffff88014e440000(0000) knlGS:0000000000000000
> [ 14.319794] CS: 0010 DS: 0000 ES: 0000 CR0: 0000000080050033
> [ 14.326323] CR2: 0000000000000000 CR3: 000000007f820000 CR4: 00000000003407e0
> [ 14.334420] DR0: 0000000000000000 DR1: 0000000000000000 DR2: 0000000000000000
> [ 14.342516] DR3: 0000000000000000 DR6: 00000000fffe0ff0 DR7: 0000000000000400
> [ 14.350612] Stack:
> [ 14.352896] ffff8801485a8000 0000000000000000 ffff8801485a8000 ffff88007f5e0000
> [ 14.361366] ffff880148623be8 ffffffff8101210d 0000000000000000 ffff88007f590db0
> [ 14.369810] ffff8801485a8000 ffff88007f5e0000 ffff880148623c58 ffffffff811f5074
> [ 14.378267] Call Trace:
> [ 14.381056] [<ffffffff8101210d>] flush_thread+0x1ad/0x270
> [ 14.387281] [<ffffffff811f5074>] flush_old_exec+0x774/0xee0
> [ 14.393702] [<ffffffff81256703>] load_elf_binary+0x353/0x1870
> [ 14.400317] [<ffffffff811f3f47>] ? search_binary_handler+0x97/0x1f0
> [ 14.407532] [<ffffffff810c491c>] ? do_raw_read_unlock+0x2c/0x50
> [ 14.414361] [<ffffffff811f3f38>] search_binary_handler+0x88/0x1f0
> [ 14.421374] [<ffffffff81255fc4>] load_script+0x274/0x2b0
> [ 14.427503] [<ffffffff811f3ee8>] ? search_binary_handler+0x38/0x1f0
> [ 14.434722] [<ffffffff810c491c>] ? do_raw_read_unlock+0x2c/0x50
> [ 14.441563] [<ffffffff811f3f38>] search_binary_handler+0x88/0x1f0
> [ 14.448577] [<ffffffff811f6436>] do_execveat_common.isra.32+0x746/0xa30
> [ 14.456184] [<ffffffff811f6386>] ? do_execveat_common.isra.32+0x696/0xa30
> [ 14.463988] [<ffffffff8194ad50>] ? rest_init+0x150/0x150
> [ 14.470115] [<ffffffff811f674c>] do_execve+0x2c/0x30
> [ 14.475848] [<ffffffff8100023b>] run_init_process+0x2b/0x30
> [ 14.482264] [<ffffffff8194ad92>] kernel_init+0x42/0xf0
> [ 14.488222] [<ffffffff8196b67c>] ret_from_fork+0x7c/0xb0
> [ 14.494351] [<ffffffff8194ad50>] ? rest_init+0x150/0x150
> [ 14.500481] Code: 00 00 48 c7 c7 58 a4 12 82 e8 03 13 14 00 db e2 0f 77 db 83 3c 05 00 00 0f 1f 44 00 00 b8 ff ff ff ff 48 8b bb 40 05 00 00 89 c2 <48> 0f c7 1f 31 c0 45 31 e4 85 c0 48 c7 c7 a8 a4 12 82 41 0f 95
> [ 14.522792] RIP [<ffffffff81004eda>] math_state_restore+0x13a/0x380
> [ 14.530031] RSP <ffff880148623b98>
> [ 14.534061] ---[ end trace f99d58de7d83269b ]---
> [ 14.539711] usb 1-5: New USB device found, idVendor=14dd, idProduct=1007
> [ 14.549577] usb 1-5: New USB device strings: Mfr=1, Product=2, SerialNumber=7
> [ 14.560957] usb 1-5: Product: D2CIM-DVUSB
> [ 14.567717] usb 1-5: Manufacturer: Raritan
> [ 14.573636] usb 1-5: SerialNumber: HUX45017210000007
> [ 14.579421] Kernel panic - not syncing: Attempted to kill init! exitcode=0x0000000b
> [ 14.579421]
> [ 14.580548] usb 1-5: ep 0x81 - rounding interval to 64 microframes, ep desc says 80 microframes
> [ 14.580595] usb 1-5: ep 0x82 - rounding interval to 64 microframes, ep desc says 80 microframes
> [ 14.580634] usb 1-5: ep 0x83 - rounding interval to 64 microframes, ep desc says 80 microframes
> [ 14.592305] input: Raritan D2CIM-DVUSB as /devices/pci0000:00/0000:00:14.0/usb1/1-5/1-5:1.0/0003:14DD:1007.0001/input/input7
> [ 14.632243] Kernel Offset: 0x0 from 0xffffffff81000000 (relocation range: 0xffffffff80000000-0xffffffff9fffffff)
> [ 14.656356] ---[ end Kernel panic - not syncing: Attempted to kill init! exitcode=0x0000000b
> [ 14.656356]
>
Config is here:
https://www.sr71.net/~dave/intel/config-20150303
next reply other threads:[~2015-03-04 18:30 UTC|newest]
Thread overview: 126+ messages / expand[flat|nested] mbox.gz Atom feed top
2015-03-04 18:30 Dave Hansen [this message]
2015-03-04 19:06 ` Oops with tip/x86/fpu Oleg Nesterov
2015-03-04 19:12 ` Dave Hansen
2015-03-04 20:06 ` Borislav Petkov
2015-03-05 15:14 ` Oleg Nesterov
[not found] ` <20150305182203.GA4203@redhat.com>
2015-03-05 18:34 ` Dave Hansen
2015-03-05 18:46 ` Oleg Nesterov
2015-03-05 18:41 ` Dave Hansen
2015-03-26 22:37 ` Yu, Fenghua
2015-03-26 22:43 ` Dave Hansen
2015-03-26 22:48 ` Yu, Fenghua
2015-03-27 7:30 ` Quentin Casasnovas
2015-03-27 19:06 ` Oleg Nesterov
2015-03-05 8:38 ` Quentin Casasnovas
2015-03-05 15:13 ` Oleg Nesterov
2015-03-05 18:42 ` Borislav Petkov
2015-03-05 22:16 ` Dave Hansen
2015-03-05 19:51 ` [PATCH 0/1] x86/fpu: math_state_restore() should not blindly disable irqs Oleg Nesterov
2015-03-05 19:51 ` [PATCH 1/1] " Oleg Nesterov
2015-03-05 20:11 ` Ingo Molnar
2015-03-05 21:25 ` Oleg Nesterov
2015-03-06 7:58 ` Ingo Molnar
2015-03-06 13:26 ` Oleg Nesterov
2015-03-06 13:39 ` Oleg Nesterov
2015-03-06 13:46 ` Ingo Molnar
2015-03-06 14:01 ` Oleg Nesterov
2015-03-06 14:17 ` Oleg Nesterov
2015-03-06 15:00 ` David Vrabel
2015-03-06 15:36 ` Oleg Nesterov
2015-03-06 16:15 ` David Vrabel
2015-03-06 16:31 ` Oleg Nesterov
2015-03-06 17:33 ` Linus Torvalds
2015-03-06 18:15 ` Oleg Nesterov
2015-03-06 19:23 ` Andy Lutomirski
2015-03-06 22:00 ` Linus Torvalds
2015-03-06 22:28 ` Andy Lutomirski
2015-03-07 10:36 ` Ingo Molnar
2015-03-07 20:11 ` Linus Torvalds
2015-03-08 8:55 ` Ingo Molnar
2015-03-08 11:38 ` Ingo Molnar
2015-03-08 13:59 ` Andy Lutomirski
2015-03-08 14:38 ` Andy Lutomirski
2015-03-07 10:32 ` Ingo Molnar
2015-03-07 15:38 ` [PATCH 0/1] x86/fpu: x86/fpu: avoid math_state_restore() without used_math() in __restore_xstate_sig() Oleg Nesterov
2015-03-07 15:38 ` [PATCH 1/1] " Oleg Nesterov
2015-03-09 14:07 ` Borislav Petkov
2015-03-09 14:34 ` Oleg Nesterov
2015-03-09 15:18 ` Borislav Petkov
2015-03-09 16:24 ` Oleg Nesterov
2015-03-09 16:53 ` Borislav Petkov
2015-03-09 17:05 ` Oleg Nesterov
2015-03-09 17:23 ` Borislav Petkov
2015-03-16 12:07 ` [tip:x86/urgent] x86/fpu: Avoid " tip-bot for Oleg Nesterov
2015-03-05 20:35 ` [PATCH 0/1] x86/fpu: math_state_restore() should not blindly disable irqs Oleg Nesterov
2015-03-09 17:10 ` [PATCH] x86/fpu: drop_fpu() should not assume that tsk == current Oleg Nesterov
2015-03-09 17:36 ` Rik van Riel
2015-03-09 17:48 ` Borislav Petkov
2015-03-09 18:06 ` Oleg Nesterov
2015-03-09 18:10 ` Borislav Petkov
2015-03-16 12:07 ` [tip:x86/urgent] x86/fpu: Drop_fpu() should not assume that tsk equals current tip-bot for Oleg Nesterov
2015-03-11 17:33 ` [PATCH 0/4] x86/fpu: avoid math_state_restore() on kthread exec Oleg Nesterov
2015-03-11 17:34 ` [PATCH 1/4] x86/fpu: document user_fpu_begin() Oleg Nesterov
2015-03-13 9:47 ` Borislav Petkov
2015-03-13 14:34 ` Oleg Nesterov
2015-03-23 12:20 ` [tip:x86/fpu] x86/fpu: Document user_fpu_begin() tip-bot for Oleg Nesterov
2015-03-11 17:34 ` [PATCH 2/4] x86/fpu: introduce restore_init_xstate() Oleg Nesterov
2015-03-13 10:34 ` Borislav Petkov
2015-03-13 14:39 ` Oleg Nesterov
2015-03-13 15:20 ` Borislav Petkov
2015-03-16 19:05 ` Rik van Riel
2015-03-23 12:20 ` [tip:x86/fpu] x86/fpu: Introduce restore_init_xstate() tip-bot for Oleg Nesterov
2015-03-11 17:34 ` [PATCH 3/4] x86/fpu: use restore_init_xstate() instead of math_state_restore() on kthread exec Oleg Nesterov
2015-03-13 10:48 ` Borislav Petkov
2015-03-13 14:45 ` Oleg Nesterov
2015-03-13 15:51 ` Borislav Petkov
2015-03-23 12:21 ` [tip:x86/fpu] x86/fpu: Use " tip-bot for Oleg Nesterov
2015-03-11 17:35 ` [PATCH 4/4] x86/fpu: don't abuse drop_init_fpu() in flush_thread() Oleg Nesterov
2015-03-13 10:52 ` Borislav Petkov
2015-03-13 14:55 ` Oleg Nesterov
2015-03-13 16:19 ` Borislav Petkov
2015-03-13 16:26 ` Oleg Nesterov
2015-03-13 19:27 ` Borislav Petkov
2015-03-14 14:48 ` Oleg Nesterov
2015-03-15 17:36 ` Borislav Petkov
2015-03-15 18:16 ` Oleg Nesterov
2015-03-15 18:50 ` Borislav Petkov
2015-03-15 20:04 ` Oleg Nesterov
2015-03-15 20:38 ` Borislav Petkov
2015-03-16 9:35 ` Borislav Petkov
2015-03-16 10:28 ` Ingo Molnar
2015-03-16 14:39 ` Oleg Nesterov
2015-03-16 15:26 ` Borislav Petkov
2015-03-16 15:34 ` Andy Lutomirski
2015-03-16 15:35 ` Borislav Petkov
2015-03-13 17:30 ` [PATCH v2 " Oleg Nesterov
2015-03-14 10:55 ` Borislav Petkov
2015-03-14 10:57 ` [PATCH] x86/fpu: Fold __drop_fpu() into its sole user Borislav Petkov
2015-03-14 15:15 ` Oleg Nesterov
2015-03-16 10:27 ` Ingo Molnar
2015-03-23 12:21 ` [tip:x86/fpu] x86/fpu: Don't abuse drop_init_fpu() in flush_thread() tip-bot for Oleg Nesterov
2015-03-13 18:26 ` [PATCH 0/1] x86/cpu: don't allocate fpu->state for swapper/0 Oleg Nesterov
2015-03-13 18:27 ` [PATCH 1/1] " Oleg Nesterov
2015-03-16 10:18 ` Borislav Petkov
2015-03-23 12:22 ` [tip:x86/fpu] x86/fpu: Don't " tip-bot for Oleg Nesterov
2015-03-14 11:16 ` [PATCH 0/1] x86/cpu: don't " Borislav Petkov
2015-03-14 15:13 ` [PATCH 0/1] x86/cpu: kill eager_fpu_init_bp() Oleg Nesterov
2015-03-14 15:13 ` [PATCH 1/1] " Oleg Nesterov
2015-03-16 12:44 ` Borislav Petkov
2015-03-23 12:22 ` [tip:x86/fpu] x86/fpu: Kill eager_fpu_init_bp() tip-bot for Oleg Nesterov
2015-03-15 16:49 ` [PATCH RFC 0/2] x86/fpu: avoid "xstate_fault" in xsave_user/xrestore_user Oleg Nesterov
2015-03-15 16:50 ` [PATCH RFC 1/2] x86: introduce __user_insn() and __check_insn() Oleg Nesterov
2015-03-15 16:50 ` [PATCH RFC 2/2] x86/fpu: change xsave_user() and xrestore_user() to use __user_insn() Oleg Nesterov
2015-03-16 22:43 ` Quentin Casasnovas
2015-03-17 9:35 ` Borislav Petkov
2015-03-16 14:36 ` [PATCH RFC 0/2] x86/fpu: avoid "xstate_fault" in xsave_user/xrestore_user Borislav Petkov
2015-03-16 14:57 ` Oleg Nesterov
2015-03-16 17:58 ` Borislav Petkov
2015-03-16 22:37 ` Quentin Casasnovas
2015-03-17 9:47 ` Borislav Petkov
2015-03-17 10:00 ` Quentin Casasnovas
2015-03-17 11:20 ` Borislav Petkov
2015-03-17 11:36 ` Quentin Casasnovas
2015-03-17 12:07 ` Borislav Petkov
2015-03-18 9:06 ` Quentin Casasnovas
2015-03-18 9:53 ` Borislav Petkov
2015-03-17 10:07 ` Quentin Casasnovas
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=54F74F59.5070107@intel.com \
--to=dave.hansen@intel.com \
--cc=bp@suse.de \
--cc=fenghua.yu@intel.com \
--cc=linux-kernel@vger.kernel.org \
--cc=luto@amacapital.net \
--cc=mingo@kernel.org \
--cc=oleg@redhat.com \
--cc=priikone@iki.fi \
--cc=riel@redhat.com \
--cc=sbsiddha@gmail.com \
--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;
as well as URLs for NNTP newsgroup(s).