<feed xmlns='http://www.w3.org/2005/Atom'>
<title>linux-stable.git/arch/x86/kernel, branch v4.2</title>
<subtitle>Linux kernel stable tree</subtitle>
<link rel='alternate' type='text/html' href='https://git.tavy.me/linux-stable.git/'/>
<entry>
<title>x86/apic: Fix fallout from x2apic cleanup</title>
<updated>2015-08-22T15:01:48+00:00</updated>
<author>
<name>Thomas Gleixner</name>
<email>tglx@linutronix.de</email>
</author>
<published>2015-08-22T14:41:17+00:00</published>
<link rel='alternate' type='text/html' href='https://git.tavy.me/linux-stable.git/commit/?id=a57e456a7b28431b55e407e5ab78ebd5b378d19e'/>
<id>a57e456a7b28431b55e407e5ab78ebd5b378d19e</id>
<content type='text'>
In the recent x2apic cleanup I got two things really wrong:
1) The safety check in __disable_x2apic which allows the function to
   be called unconditionally is backwards. The check is there to
   prevent access to the apic MSR in case that the machine has no
   apic. Though right now it returns if the machine has an apic and
   therefor the disabling of x2apic is never invoked.

2) x2apic_disable() sets x2apic_mode to 0 after registering the local
   apic. That's wrong, because register_lapic_address() checks x2apic
   mode and therefor takes the wrong code path.

This results in boot failures on machines with x2apic preenabled by
BIOS and can also lead to an fatal MSR access on machines without
apic.

The solutions are simple:
1) Correct the sanity check for apic availability
2) Clear x2apic_mode _before_ calling register_lapic_address()

Fixes: 659006bf3ae3 'x86/x2apic: Split enable and setup function'
Reported-and-tested-by: Javier Monteagudo &lt;javiermon@gmail.com&gt;
Signed-off-by: Thomas Gleixner &lt;tglx@linutronix.de&gt;
Link: https://bugzilla.redhat.com/show_bug.cgi?id=1224764
Cc: stable@vger.kernel.org # 4.0+
Cc: Laura Abbott &lt;labbott@redhat.com&gt;
Cc: Jiang Liu &lt;jiang.liu@linux.intel.com&gt;
Cc: Joerg Roedel &lt;joro@8bytes.org&gt;
Cc: Tony Luck &lt;tony.luck@intel.com&gt;
Cc: Borislav Petkov &lt;bp@alien8.de&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
In the recent x2apic cleanup I got two things really wrong:
1) The safety check in __disable_x2apic which allows the function to
   be called unconditionally is backwards. The check is there to
   prevent access to the apic MSR in case that the machine has no
   apic. Though right now it returns if the machine has an apic and
   therefor the disabling of x2apic is never invoked.

2) x2apic_disable() sets x2apic_mode to 0 after registering the local
   apic. That's wrong, because register_lapic_address() checks x2apic
   mode and therefor takes the wrong code path.

This results in boot failures on machines with x2apic preenabled by
BIOS and can also lead to an fatal MSR access on machines without
apic.

The solutions are simple:
1) Correct the sanity check for apic availability
2) Clear x2apic_mode _before_ calling register_lapic_address()

Fixes: 659006bf3ae3 'x86/x2apic: Split enable and setup function'
Reported-and-tested-by: Javier Monteagudo &lt;javiermon@gmail.com&gt;
Signed-off-by: Thomas Gleixner &lt;tglx@linutronix.de&gt;
Link: https://bugzilla.redhat.com/show_bug.cgi?id=1224764
Cc: stable@vger.kernel.org # 4.0+
Cc: Laura Abbott &lt;labbott@redhat.com&gt;
Cc: Jiang Liu &lt;jiang.liu@linux.intel.com&gt;
Cc: Joerg Roedel &lt;joro@8bytes.org&gt;
Cc: Tony Luck &lt;tony.luck@intel.com&gt;
Cc: Borislav Petkov &lt;bp@alien8.de&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>x86/fpu/math-emu: Fix crash in fork()</title>
<updated>2015-08-22T08:23:03+00:00</updated>
<author>
<name>Ingo Molnar</name>
<email>mingo@kernel.org</email>
</author>
<published>2015-05-27T10:22:29+00:00</published>
<link rel='alternate' type='text/html' href='https://git.tavy.me/linux-stable.git/commit/?id=827409b2f5b58573ae3774fe6bd2d6daeb335878'/>
<id>827409b2f5b58573ae3774fe6bd2d6daeb335878</id>
<content type='text'>
During later stages of math-emu bootup the following crash triggers:

	 math_emulate: 0060:c100d0a8
	 Kernel panic - not syncing: Math emulation needed in kernel
	 CPU: 0 PID: 1511 Comm: login Not tainted 4.2.0-rc7+ #1012
	 [...]
	 Call Trace:
	  [&lt;c181d50d&gt;] dump_stack+0x41/0x52
	  [&lt;c181c918&gt;] panic+0x77/0x189
	  [&lt;c1003530&gt;] ? math_error+0x140/0x140
	  [&lt;c164c2d7&gt;] math_emulate+0xba7/0xbd0
	  [&lt;c100d0a8&gt;] ? fpu__copy+0x138/0x1c0
	  [&lt;c1109c3c&gt;] ? __alloc_pages_nodemask+0x12c/0x870
	  [&lt;c136ac20&gt;] ? proc_clear_tty+0x40/0x70
	  [&lt;c136ac6e&gt;] ? session_clear_tty+0x1e/0x30
	  [&lt;c1003530&gt;] ? math_error+0x140/0x140
	  [&lt;c1003575&gt;] do_device_not_available+0x45/0x70
	  [&lt;c100d0a8&gt;] ? fpu__copy+0x138/0x1c0
	  [&lt;c18258e6&gt;] error_code+0x5a/0x60
	  [&lt;c1003530&gt;] ? math_error+0x140/0x140
	  [&lt;c100d0a8&gt;] ? fpu__copy+0x138/0x1c0
	  [&lt;c100c205&gt;] arch_dup_task_struct+0x25/0x30
	  [&lt;c1048cea&gt;] copy_process.part.51+0xea/0x1480
	  [&lt;c115a8e5&gt;] ? dput+0x175/0x200
	  [&lt;c136af70&gt;] ? no_tty+0x30/0x30
	  [&lt;c1157242&gt;] ? do_vfs_ioctl+0x322/0x540
	  [&lt;c104a21a&gt;] _do_fork+0xca/0x340
	  [&lt;c1057b06&gt;] ? SyS_rt_sigaction+0x66/0x90
	  [&lt;c104a557&gt;] SyS_clone+0x27/0x30
	  [&lt;c1824a80&gt;] sysenter_do_call+0x12/0x12

The reason is the incorrect assumption in fpu_copy(), that FNSAVE
can be executed from math-emu kernels as well.

Don't try to copy the registers, the soft state will be copied
by fork anyway, so the child task inherits the parent task's
soft math state.

With this fix applied math-emu kernels boot up fine on modern
hardware and the 'no387 nofxsr' boot options.

Cc: Andy Lutomirski &lt;luto@amacapital.net&gt;
Cc: Bobby Powers &lt;bobbypowers@gmail.com&gt;
Cc: Borislav Petkov &lt;bp@alien8.de&gt;
Cc: Brian Gerst &lt;brgerst@gmail.com&gt;
Cc: Dave Hansen &lt;dave.hansen@linux.intel.com&gt;
Cc: Denys Vlasenko &lt;dvlasenk@redhat.com&gt;
Cc: Fenghua Yu &lt;fenghua.yu@intel.com&gt;
Cc: H. Peter Anvin &lt;hpa@zytor.com&gt;
Cc: Linus Torvalds &lt;torvalds@linux-foundation.org&gt;
Cc: Oleg Nesterov &lt;oleg@redhat.com&gt;
Cc: Peter Zijlstra &lt;peterz@infradead.org&gt;
Cc: Quentin Casasnovas &lt;quentin.casasnovas@oracle.com&gt;
Cc: Thomas Gleixner &lt;tglx@linutronix.de&gt;
Signed-off-by: Ingo Molnar &lt;mingo@kernel.org&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
During later stages of math-emu bootup the following crash triggers:

	 math_emulate: 0060:c100d0a8
	 Kernel panic - not syncing: Math emulation needed in kernel
	 CPU: 0 PID: 1511 Comm: login Not tainted 4.2.0-rc7+ #1012
	 [...]
	 Call Trace:
	  [&lt;c181d50d&gt;] dump_stack+0x41/0x52
	  [&lt;c181c918&gt;] panic+0x77/0x189
	  [&lt;c1003530&gt;] ? math_error+0x140/0x140
	  [&lt;c164c2d7&gt;] math_emulate+0xba7/0xbd0
	  [&lt;c100d0a8&gt;] ? fpu__copy+0x138/0x1c0
	  [&lt;c1109c3c&gt;] ? __alloc_pages_nodemask+0x12c/0x870
	  [&lt;c136ac20&gt;] ? proc_clear_tty+0x40/0x70
	  [&lt;c136ac6e&gt;] ? session_clear_tty+0x1e/0x30
	  [&lt;c1003530&gt;] ? math_error+0x140/0x140
	  [&lt;c1003575&gt;] do_device_not_available+0x45/0x70
	  [&lt;c100d0a8&gt;] ? fpu__copy+0x138/0x1c0
	  [&lt;c18258e6&gt;] error_code+0x5a/0x60
	  [&lt;c1003530&gt;] ? math_error+0x140/0x140
	  [&lt;c100d0a8&gt;] ? fpu__copy+0x138/0x1c0
	  [&lt;c100c205&gt;] arch_dup_task_struct+0x25/0x30
	  [&lt;c1048cea&gt;] copy_process.part.51+0xea/0x1480
	  [&lt;c115a8e5&gt;] ? dput+0x175/0x200
	  [&lt;c136af70&gt;] ? no_tty+0x30/0x30
	  [&lt;c1157242&gt;] ? do_vfs_ioctl+0x322/0x540
	  [&lt;c104a21a&gt;] _do_fork+0xca/0x340
	  [&lt;c1057b06&gt;] ? SyS_rt_sigaction+0x66/0x90
	  [&lt;c104a557&gt;] SyS_clone+0x27/0x30
	  [&lt;c1824a80&gt;] sysenter_do_call+0x12/0x12

The reason is the incorrect assumption in fpu_copy(), that FNSAVE
can be executed from math-emu kernels as well.

Don't try to copy the registers, the soft state will be copied
by fork anyway, so the child task inherits the parent task's
soft math state.

With this fix applied math-emu kernels boot up fine on modern
hardware and the 'no387 nofxsr' boot options.

Cc: Andy Lutomirski &lt;luto@amacapital.net&gt;
Cc: Bobby Powers &lt;bobbypowers@gmail.com&gt;
Cc: Borislav Petkov &lt;bp@alien8.de&gt;
Cc: Brian Gerst &lt;brgerst@gmail.com&gt;
Cc: Dave Hansen &lt;dave.hansen@linux.intel.com&gt;
Cc: Denys Vlasenko &lt;dvlasenk@redhat.com&gt;
Cc: Fenghua Yu &lt;fenghua.yu@intel.com&gt;
Cc: H. Peter Anvin &lt;hpa@zytor.com&gt;
Cc: Linus Torvalds &lt;torvalds@linux-foundation.org&gt;
Cc: Oleg Nesterov &lt;oleg@redhat.com&gt;
Cc: Peter Zijlstra &lt;peterz@infradead.org&gt;
Cc: Quentin Casasnovas &lt;quentin.casasnovas@oracle.com&gt;
Cc: Thomas Gleixner &lt;tglx@linutronix.de&gt;
Signed-off-by: Ingo Molnar &lt;mingo@kernel.org&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>x86/fpu/math-emu: Fix math-emu boot crash</title>
<updated>2015-08-22T08:02:04+00:00</updated>
<author>
<name>Ingo Molnar</name>
<email>mingo@kernel.org</email>
</author>
<published>2015-08-22T07:52:06+00:00</published>
<link rel='alternate' type='text/html' href='https://git.tavy.me/linux-stable.git/commit/?id=5fc960380ea44ba529c78b558b6cd4250e5e1958'/>
<id>5fc960380ea44ba529c78b558b6cd4250e5e1958</id>
<content type='text'>
On a math-emu bootup the following crash occurs:

	Initializing CPU#0
	------------[ cut here ]------------
	kernel BUG at arch/x86/kernel/traps.c:779!
	invalid opcode: 0000 [#1] SMP
	[...]
	EIP is at do_device_not_available+0xe/0x70
	[...]
	Call Trace:
	 [&lt;c18238e6&gt;] error_code+0x5a/0x60
	 [&lt;c1002bd0&gt;] ? math_error+0x140/0x140
	 [&lt;c100bbd9&gt;] ? fpu__init_cpu+0x59/0xa0
	 [&lt;c1012322&gt;] cpu_init+0x202/0x330
	 [&lt;c104509f&gt;] ? __native_set_fixmap+0x1f/0x30
	 [&lt;c1b56ab0&gt;] trap_init+0x305/0x346
	 [&lt;c1b548af&gt;] start_kernel+0x1a5/0x35d
	 [&lt;c1b542b4&gt;] i386_start_kernel+0x82/0x86

The reason is that in the following commit:

  b1276c48e91b ("x86/fpu: Initialize fpregs in fpu__init_cpu_generic()")

I failed to consider math-emu's limitation that it cannot execute the
FNINIT instruction in kernel mode.

The long term fix might be to allow math-emu to execute (certain) kernel
mode FPU instructions, but for now apply the safe (albeit somewhat ugly)
fix: initialize the emulation state explicitly without trapping out to
the FPU emulator.

Cc: Andy Lutomirski &lt;luto@amacapital.net&gt;
Cc: Borislav Petkov &lt;bp@alien8.de&gt;
Cc: Brian Gerst &lt;brgerst@gmail.com&gt;
Cc: Dave Hansen &lt;dave.hansen@linux.intel.com&gt;
Cc: Denys Vlasenko &lt;dvlasenk@redhat.com&gt;
Cc: Fenghua Yu &lt;fenghua.yu@intel.com&gt;
Cc: H. Peter Anvin &lt;hpa@zytor.com&gt;
Cc: Linus Torvalds &lt;torvalds@linux-foundation.org&gt;
Cc: Oleg Nesterov &lt;oleg@redhat.com&gt;
Cc: Peter Zijlstra &lt;peterz@infradead.org&gt;
Cc: Quentin Casasnovas &lt;quentin.casasnovas@oracle.com&gt;
Cc: Thomas Gleixner &lt;tglx@linutronix.de&gt;
Cc: linux-kernel@vger.kernel.org
Signed-off-by: Ingo Molnar &lt;mingo@kernel.org&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
On a math-emu bootup the following crash occurs:

	Initializing CPU#0
	------------[ cut here ]------------
	kernel BUG at arch/x86/kernel/traps.c:779!
	invalid opcode: 0000 [#1] SMP
	[...]
	EIP is at do_device_not_available+0xe/0x70
	[...]
	Call Trace:
	 [&lt;c18238e6&gt;] error_code+0x5a/0x60
	 [&lt;c1002bd0&gt;] ? math_error+0x140/0x140
	 [&lt;c100bbd9&gt;] ? fpu__init_cpu+0x59/0xa0
	 [&lt;c1012322&gt;] cpu_init+0x202/0x330
	 [&lt;c104509f&gt;] ? __native_set_fixmap+0x1f/0x30
	 [&lt;c1b56ab0&gt;] trap_init+0x305/0x346
	 [&lt;c1b548af&gt;] start_kernel+0x1a5/0x35d
	 [&lt;c1b542b4&gt;] i386_start_kernel+0x82/0x86

The reason is that in the following commit:

  b1276c48e91b ("x86/fpu: Initialize fpregs in fpu__init_cpu_generic()")

I failed to consider math-emu's limitation that it cannot execute the
FNINIT instruction in kernel mode.

The long term fix might be to allow math-emu to execute (certain) kernel
mode FPU instructions, but for now apply the safe (albeit somewhat ugly)
fix: initialize the emulation state explicitly without trapping out to
the FPU emulator.

Cc: Andy Lutomirski &lt;luto@amacapital.net&gt;
Cc: Borislav Petkov &lt;bp@alien8.de&gt;
Cc: Brian Gerst &lt;brgerst@gmail.com&gt;
Cc: Dave Hansen &lt;dave.hansen@linux.intel.com&gt;
Cc: Denys Vlasenko &lt;dvlasenk@redhat.com&gt;
Cc: Fenghua Yu &lt;fenghua.yu@intel.com&gt;
Cc: H. Peter Anvin &lt;hpa@zytor.com&gt;
Cc: Linus Torvalds &lt;torvalds@linux-foundation.org&gt;
Cc: Oleg Nesterov &lt;oleg@redhat.com&gt;
Cc: Peter Zijlstra &lt;peterz@infradead.org&gt;
Cc: Quentin Casasnovas &lt;quentin.casasnovas@oracle.com&gt;
Cc: Thomas Gleixner &lt;tglx@linutronix.de&gt;
Cc: linux-kernel@vger.kernel.org
Signed-off-by: Ingo Molnar &lt;mingo@kernel.org&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>x86/idle: Restore trace_cpu_idle to mwait_idle() calls</title>
<updated>2015-08-20T19:37:45+00:00</updated>
<author>
<name>Jisheng Zhang</name>
<email>jszhang@marvell.com</email>
</author>
<published>2015-08-20T04:54:39+00:00</published>
<link rel='alternate' type='text/html' href='https://git.tavy.me/linux-stable.git/commit/?id=e43d0189ac02415fe4487f79fc35e8f147e9ea0d'/>
<id>e43d0189ac02415fe4487f79fc35e8f147e9ea0d</id>
<content type='text'>
Commit b253149b843f ("sched/idle/x86: Restore mwait_idle() to fix boot
hangs, to improve power savings and to improve performance") restores
mwait_idle(), but the trace_cpu_idle related calls are missing. This
causes powertop on my old desktop powered by Intel Core2 E6550 to
report zero wakeups and zero events.

Add them back to restore the proper behaviour.

Fixes: b253149b843f ("sched/idle/x86: Restore mwait_idle() to ...")
Signed-off-by: Jisheng Zhang &lt;jszhang@marvell.com&gt;
Cc: &lt;len.brown@intel.com&gt;
Cc: stable@vger.kernel.org # 4.1
Link: http://lkml.kernel.org/r/1440046479-4262-1-git-send-email-jszhang@marvell.com
Signed-off-by: Thomas Gleixner &lt;tglx@linutronix.de&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
Commit b253149b843f ("sched/idle/x86: Restore mwait_idle() to fix boot
hangs, to improve power savings and to improve performance") restores
mwait_idle(), but the trace_cpu_idle related calls are missing. This
causes powertop on my old desktop powered by Intel Core2 E6550 to
report zero wakeups and zero events.

Add them back to restore the proper behaviour.

Fixes: b253149b843f ("sched/idle/x86: Restore mwait_idle() to ...")
Signed-off-by: Jisheng Zhang &lt;jszhang@marvell.com&gt;
Cc: &lt;len.brown@intel.com&gt;
Cc: stable@vger.kernel.org # 4.1
Link: http://lkml.kernel.org/r/1440046479-4262-1-git-send-email-jszhang@marvell.com
Signed-off-by: Thomas Gleixner &lt;tglx@linutronix.de&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>x86/irq: Build correct vector mapping for multiple MSI interrupts</title>
<updated>2015-08-18T16:18:55+00:00</updated>
<author>
<name>Jiang Liu</name>
<email>jiang.liu@linux.intel.com</email>
</author>
<published>2015-08-18T15:20:20+00:00</published>
<link rel='alternate' type='text/html' href='https://git.tavy.me/linux-stable.git/commit/?id=527f0a91e91cd55ec79fce80451b0ad5d5e6a21a'/>
<id>527f0a91e91cd55ec79fce80451b0ad5d5e6a21a</id>
<content type='text'>
Alex Deucher, Mark Rustad and Alexander Holler reported a regression
with the latest v4.2-rc4 kernel, which breaks some SATA controllers.
With multi-MSI capable SATA controllers, only the first port works,
all other ports time out when executing SATA commands.

This happens because the first argument to assign_irq_vector_policy()
is always the base linux irq number of the multi MSI interrupt block,
so all subsequent vector assignments operate on the base linux irq
number, so all MSI irqs are handled as the first irq number. Therefor
the other MSI irqs of a device are never set up correctly and never
fire.

Add the loop iterator to the base irq number so all vectors are
assigned correctly.

Fixes: b5dc8e6c21e7 "x86/irq: Use hierarchical irqdomain to manage CPU interrupt vectors"
Reported-and-tested-by: Alex Deucher &lt;alexdeucher@gmail.com&gt;
Reported-and-tested-by: Mark Rustad &lt;mrustad@gmail.com&gt;
Reported-and-tested-by: Alexander Holler &lt;holler@ahsoftware.de&gt;
Signed-off-by: Jiang Liu &lt;jiang.liu@linux.intel.com&gt;
Cc: Tony Luck &lt;tony.luck@intel.com&gt;
Link: http://lkml.kernel.org/r/1439911228-9880-1-git-send-email-jiang.liu@linux.intel.com
Signed-off-by: Thomas Gleixner &lt;tglx@linutronix.de&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
Alex Deucher, Mark Rustad and Alexander Holler reported a regression
with the latest v4.2-rc4 kernel, which breaks some SATA controllers.
With multi-MSI capable SATA controllers, only the first port works,
all other ports time out when executing SATA commands.

This happens because the first argument to assign_irq_vector_policy()
is always the base linux irq number of the multi MSI interrupt block,
so all subsequent vector assignments operate on the base linux irq
number, so all MSI irqs are handled as the first irq number. Therefor
the other MSI irqs of a device are never set up correctly and never
fire.

Add the loop iterator to the base irq number so all vectors are
assigned correctly.

Fixes: b5dc8e6c21e7 "x86/irq: Use hierarchical irqdomain to manage CPU interrupt vectors"
Reported-and-tested-by: Alex Deucher &lt;alexdeucher@gmail.com&gt;
Reported-and-tested-by: Mark Rustad &lt;mrustad@gmail.com&gt;
Reported-and-tested-by: Alexander Holler &lt;holler@ahsoftware.de&gt;
Signed-off-by: Jiang Liu &lt;jiang.liu@linux.intel.com&gt;
Cc: Tony Luck &lt;tony.luck@intel.com&gt;
Link: http://lkml.kernel.org/r/1439911228-9880-1-git-send-email-jiang.liu@linux.intel.com
Signed-off-by: Thomas Gleixner &lt;tglx@linutronix.de&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>Merge branch 'x86-urgent-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip</title>
<updated>2015-08-16T22:11:25+00:00</updated>
<author>
<name>Linus Torvalds</name>
<email>torvalds@linux-foundation.org</email>
</author>
<published>2015-08-16T22:11:25+00:00</published>
<link rel='alternate' type='text/html' href='https://git.tavy.me/linux-stable.git/commit/?id=01565479e99882e873e4dd2f6f067b7cba3acf8f'/>
<id>01565479e99882e873e4dd2f6f067b7cba3acf8f</id>
<content type='text'>
Merge x86 fixes from Ingo Molnar:
 "Two followup fixes related to the previous LDT fix"

Also applied a further FPU emulation fix from Andy Lutomirski to the
branch before actually merging it.

* 'x86-urgent-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip
  x86/ldt: Further fix FPU emulation
  x86/ldt: Correct FPU emulation access to LDT
  x86/ldt: Correct LDT access in single stepping logic
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
Merge x86 fixes from Ingo Molnar:
 "Two followup fixes related to the previous LDT fix"

Also applied a further FPU emulation fix from Andy Lutomirski to the
branch before actually merging it.

* 'x86-urgent-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip
  x86/ldt: Further fix FPU emulation
  x86/ldt: Correct FPU emulation access to LDT
  x86/ldt: Correct LDT access in single stepping logic
</pre>
</div>
</content>
</entry>
<entry>
<title>Merge branch 'perf-urgent-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip</title>
<updated>2015-08-14T17:57:16+00:00</updated>
<author>
<name>Linus Torvalds</name>
<email>torvalds@linux-foundation.org</email>
</author>
<published>2015-08-14T17:57:16+00:00</published>
<link rel='alternate' type='text/html' href='https://git.tavy.me/linux-stable.git/commit/?id=b25c6cee55c720e5e8502aa37104409aacd16ad3'/>
<id>b25c6cee55c720e5e8502aa37104409aacd16ad3</id>
<content type='text'>
Pull perf fixes from Ingo Molnar:
 "Misc fixes: PMU driver corner cases, tooling fixes, and an 'AUX'
  (Intel PT) race related core fix"

* 'perf-urgent-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip:
  perf/x86/intel/cqm: Do not access cpu_data() from CPU_UP_PREPARE handler
  perf/x86/intel: Fix memory leak on hot-plug allocation fail
  perf: Fix PERF_EVENT_IOC_PERIOD migration race
  perf: Fix double-free of the AUX buffer
  perf: Fix fasync handling on inherited events
  perf tools: Fix test build error when bindir contains double slash
  perf stat: Fix transaction lenght metrics
  perf: Fix running time accounting
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
Pull perf fixes from Ingo Molnar:
 "Misc fixes: PMU driver corner cases, tooling fixes, and an 'AUX'
  (Intel PT) race related core fix"

* 'perf-urgent-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip:
  perf/x86/intel/cqm: Do not access cpu_data() from CPU_UP_PREPARE handler
  perf/x86/intel: Fix memory leak on hot-plug allocation fail
  perf: Fix PERF_EVENT_IOC_PERIOD migration race
  perf: Fix double-free of the AUX buffer
  perf: Fix fasync handling on inherited events
  perf tools: Fix test build error when bindir contains double slash
  perf stat: Fix transaction lenght metrics
  perf: Fix running time accounting
</pre>
</div>
</content>
</entry>
<entry>
<title>Revert x86 sigcontext cleanups</title>
<updated>2015-08-13T19:42:22+00:00</updated>
<author>
<name>Linus Torvalds</name>
<email>torvalds@linux-foundation.org</email>
</author>
<published>2015-08-13T15:25:20+00:00</published>
<link rel='alternate' type='text/html' href='https://git.tavy.me/linux-stable.git/commit/?id=ed596cde9425509ec6ce88e19f03e9b13b6f518b'/>
<id>ed596cde9425509ec6ce88e19f03e9b13b6f518b</id>
<content type='text'>
This reverts commits 9a036b93a344 ("x86/signal/64: Remove 'fs' and 'gs'
from sigcontext") and c6f2062935c8 ("x86/signal/64: Fix SS handling for
signals delivered to 64-bit programs").

They were cleanups, but they break dosemu by changing the signal return
behavior (and removing 'fs' and 'gs' from the sigcontext struct - while
not actually changing any behavior - causes build problems).

Reported-and-tested-by: Stas Sergeev &lt;stsp@list.ru&gt;
Acked-by: Andy Lutomirski &lt;luto@amacapital.net&gt;
Cc: Ingo Molnar &lt;mingo@kernel.org&gt;
Cc: stable@vger.kernel.org
Signed-off-by: Linus Torvalds &lt;torvalds@linux-foundation.org&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
This reverts commits 9a036b93a344 ("x86/signal/64: Remove 'fs' and 'gs'
from sigcontext") and c6f2062935c8 ("x86/signal/64: Fix SS handling for
signals delivered to 64-bit programs").

They were cleanups, but they break dosemu by changing the signal return
behavior (and removing 'fs' and 'gs' from the sigcontext struct - while
not actually changing any behavior - causes build problems).

Reported-and-tested-by: Stas Sergeev &lt;stsp@list.ru&gt;
Acked-by: Andy Lutomirski &lt;luto@amacapital.net&gt;
Cc: Ingo Molnar &lt;mingo@kernel.org&gt;
Cc: stable@vger.kernel.org
Signed-off-by: Linus Torvalds &lt;torvalds@linux-foundation.org&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>perf/x86/intel/cqm: Do not access cpu_data() from CPU_UP_PREPARE handler</title>
<updated>2015-08-12T09:37:23+00:00</updated>
<author>
<name>Matt Fleming</name>
<email>matt.fleming@intel.com</email>
</author>
<published>2015-08-06T12:12:43+00:00</published>
<link rel='alternate' type='text/html' href='https://git.tavy.me/linux-stable.git/commit/?id=d7a702f0b1033cf402fef65bd6395072738f0844'/>
<id>d7a702f0b1033cf402fef65bd6395072738f0844</id>
<content type='text'>
Tony reports that booting his 144-cpu machine with maxcpus=10 triggers
the following WARN_ON():

[   21.045727] WARNING: CPU: 8 PID: 647 at arch/x86/kernel/cpu/perf_event_intel_cqm.c:1267 intel_cqm_cpu_prepare+0x75/0x90()
[   21.045744] CPU: 8 PID: 647 Comm: systemd-udevd Not tainted 4.2.0-rc4 #1
[   21.045745] Hardware name: Intel Corporation BRICKLAND/BRICKLAND, BIOS BRHSXSD1.86B.0066.R00.1506021730 06/02/2015
[   21.045747]  0000000000000000 0000000082771b09 ffff880856333ba8 ffffffff81669b67
[   21.045748]  0000000000000000 0000000000000000 ffff880856333be8 ffffffff8107b02a
[   21.045750]  ffff88085b789800 ffff88085f68a020 ffffffff819e2470 000000000000000a
[   21.045750] Call Trace:
[   21.045757]  [&lt;ffffffff81669b67&gt;] dump_stack+0x45/0x57
[   21.045759]  [&lt;ffffffff8107b02a&gt;] warn_slowpath_common+0x8a/0xc0
[   21.045761]  [&lt;ffffffff8107b15a&gt;] warn_slowpath_null+0x1a/0x20
[   21.045762]  [&lt;ffffffff81036725&gt;] intel_cqm_cpu_prepare+0x75/0x90
[   21.045764]  [&lt;ffffffff81036872&gt;] intel_cqm_cpu_notifier+0x42/0x160
[   21.045767]  [&lt;ffffffff8109a33d&gt;] notifier_call_chain+0x4d/0x80
[   21.045769]  [&lt;ffffffff8109a44e&gt;] __raw_notifier_call_chain+0xe/0x10
[   21.045770]  [&lt;ffffffff8107b538&gt;] _cpu_up+0xe8/0x190
[   21.045771]  [&lt;ffffffff8107b65a&gt;] cpu_up+0x7a/0xa0
[   21.045774]  [&lt;ffffffff8165e920&gt;] cpu_subsys_online+0x40/0x90
[   21.045777]  [&lt;ffffffff81433b37&gt;] device_online+0x67/0x90
[   21.045778]  [&lt;ffffffff81433bea&gt;] online_store+0x8a/0xa0
[   21.045782]  [&lt;ffffffff81430e78&gt;] dev_attr_store+0x18/0x30
[   21.045785]  [&lt;ffffffff8126b6ba&gt;] sysfs_kf_write+0x3a/0x50
[   21.045786]  [&lt;ffffffff8126ad40&gt;] kernfs_fop_write+0x120/0x170
[   21.045789]  [&lt;ffffffff811f0b77&gt;] __vfs_write+0x37/0x100
[   21.045791]  [&lt;ffffffff811f38b8&gt;] ? __sb_start_write+0x58/0x110
[   21.045795]  [&lt;ffffffff81296d2d&gt;] ? security_file_permission+0x3d/0xc0
[   21.045796]  [&lt;ffffffff811f1279&gt;] vfs_write+0xa9/0x190
[   21.045797]  [&lt;ffffffff811f2075&gt;] SyS_write+0x55/0xc0
[   21.045800]  [&lt;ffffffff81067300&gt;] ? do_page_fault+0x30/0x80
[   21.045804]  [&lt;ffffffff816709ae&gt;] entry_SYSCALL_64_fastpath+0x12/0x71
[   21.045805] ---[ end trace fe228b836d8af405 ]---

The root cause is that CPU_UP_PREPARE is completely the wrong notifier
action from which to access cpu_data(), because smp_store_cpu_info()
won't have been executed by the target CPU at that point, which in turn
means that -&gt;x86_cache_max_rmid and -&gt;x86_cache_occ_scale haven't been
filled out.

Instead let's invoke our handler from CPU_STARTING and rename it
appropriately.

Reported-by: Tony Luck &lt;tony.luck@intel.com&gt;
Signed-off-by: Matt Fleming &lt;matt.fleming@intel.com&gt;
Signed-off-by: Peter Zijlstra (Intel) &lt;peterz@infradead.org&gt;
Cc: Ashok Raj &lt;ashok.raj@intel.com&gt;
Cc: Kanaka Juvva &lt;kanaka.d.juvva@intel.com&gt;
Cc: Linus Torvalds &lt;torvalds@linux-foundation.org&gt;
Cc: Peter Zijlstra &lt;peterz@infradead.org&gt;
Cc: Thomas Gleixner &lt;tglx@linutronix.de&gt;
Cc: Vikas Shivappa &lt;vikas.shivappa@intel.com&gt;
Link: http://lkml.kernel.org/r/1438863163-14083-1-git-send-email-matt@codeblueprint.co.uk
Signed-off-by: Ingo Molnar &lt;mingo@kernel.org&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
Tony reports that booting his 144-cpu machine with maxcpus=10 triggers
the following WARN_ON():

[   21.045727] WARNING: CPU: 8 PID: 647 at arch/x86/kernel/cpu/perf_event_intel_cqm.c:1267 intel_cqm_cpu_prepare+0x75/0x90()
[   21.045744] CPU: 8 PID: 647 Comm: systemd-udevd Not tainted 4.2.0-rc4 #1
[   21.045745] Hardware name: Intel Corporation BRICKLAND/BRICKLAND, BIOS BRHSXSD1.86B.0066.R00.1506021730 06/02/2015
[   21.045747]  0000000000000000 0000000082771b09 ffff880856333ba8 ffffffff81669b67
[   21.045748]  0000000000000000 0000000000000000 ffff880856333be8 ffffffff8107b02a
[   21.045750]  ffff88085b789800 ffff88085f68a020 ffffffff819e2470 000000000000000a
[   21.045750] Call Trace:
[   21.045757]  [&lt;ffffffff81669b67&gt;] dump_stack+0x45/0x57
[   21.045759]  [&lt;ffffffff8107b02a&gt;] warn_slowpath_common+0x8a/0xc0
[   21.045761]  [&lt;ffffffff8107b15a&gt;] warn_slowpath_null+0x1a/0x20
[   21.045762]  [&lt;ffffffff81036725&gt;] intel_cqm_cpu_prepare+0x75/0x90
[   21.045764]  [&lt;ffffffff81036872&gt;] intel_cqm_cpu_notifier+0x42/0x160
[   21.045767]  [&lt;ffffffff8109a33d&gt;] notifier_call_chain+0x4d/0x80
[   21.045769]  [&lt;ffffffff8109a44e&gt;] __raw_notifier_call_chain+0xe/0x10
[   21.045770]  [&lt;ffffffff8107b538&gt;] _cpu_up+0xe8/0x190
[   21.045771]  [&lt;ffffffff8107b65a&gt;] cpu_up+0x7a/0xa0
[   21.045774]  [&lt;ffffffff8165e920&gt;] cpu_subsys_online+0x40/0x90
[   21.045777]  [&lt;ffffffff81433b37&gt;] device_online+0x67/0x90
[   21.045778]  [&lt;ffffffff81433bea&gt;] online_store+0x8a/0xa0
[   21.045782]  [&lt;ffffffff81430e78&gt;] dev_attr_store+0x18/0x30
[   21.045785]  [&lt;ffffffff8126b6ba&gt;] sysfs_kf_write+0x3a/0x50
[   21.045786]  [&lt;ffffffff8126ad40&gt;] kernfs_fop_write+0x120/0x170
[   21.045789]  [&lt;ffffffff811f0b77&gt;] __vfs_write+0x37/0x100
[   21.045791]  [&lt;ffffffff811f38b8&gt;] ? __sb_start_write+0x58/0x110
[   21.045795]  [&lt;ffffffff81296d2d&gt;] ? security_file_permission+0x3d/0xc0
[   21.045796]  [&lt;ffffffff811f1279&gt;] vfs_write+0xa9/0x190
[   21.045797]  [&lt;ffffffff811f2075&gt;] SyS_write+0x55/0xc0
[   21.045800]  [&lt;ffffffff81067300&gt;] ? do_page_fault+0x30/0x80
[   21.045804]  [&lt;ffffffff816709ae&gt;] entry_SYSCALL_64_fastpath+0x12/0x71
[   21.045805] ---[ end trace fe228b836d8af405 ]---

The root cause is that CPU_UP_PREPARE is completely the wrong notifier
action from which to access cpu_data(), because smp_store_cpu_info()
won't have been executed by the target CPU at that point, which in turn
means that -&gt;x86_cache_max_rmid and -&gt;x86_cache_occ_scale haven't been
filled out.

Instead let's invoke our handler from CPU_STARTING and rename it
appropriately.

Reported-by: Tony Luck &lt;tony.luck@intel.com&gt;
Signed-off-by: Matt Fleming &lt;matt.fleming@intel.com&gt;
Signed-off-by: Peter Zijlstra (Intel) &lt;peterz@infradead.org&gt;
Cc: Ashok Raj &lt;ashok.raj@intel.com&gt;
Cc: Kanaka Juvva &lt;kanaka.d.juvva@intel.com&gt;
Cc: Linus Torvalds &lt;torvalds@linux-foundation.org&gt;
Cc: Peter Zijlstra &lt;peterz@infradead.org&gt;
Cc: Thomas Gleixner &lt;tglx@linutronix.de&gt;
Cc: Vikas Shivappa &lt;vikas.shivappa@intel.com&gt;
Link: http://lkml.kernel.org/r/1438863163-14083-1-git-send-email-matt@codeblueprint.co.uk
Signed-off-by: Ingo Molnar &lt;mingo@kernel.org&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>perf/x86/intel: Fix memory leak on hot-plug allocation fail</title>
<updated>2015-08-12T09:37:22+00:00</updated>
<author>
<name>Peter Zijlstra</name>
<email>peterz@infradead.org</email>
</author>
<published>2015-08-10T12:17:34+00:00</published>
<link rel='alternate' type='text/html' href='https://git.tavy.me/linux-stable.git/commit/?id=dbc72b7a0c673ff00fdeb21d3a26064e2185baf4'/>
<id>dbc72b7a0c673ff00fdeb21d3a26064e2185baf4</id>
<content type='text'>
We fail to free the shared_regs allocation if the constraint_list
allocation fails.

Cure this and be more consistent in NULL-ing the pointers after free.

Signed-off-by: Peter Zijlstra (Intel) &lt;peterz@infradead.org&gt;
Cc: Linus Torvalds &lt;torvalds@linux-foundation.org&gt;
Cc: Peter Zijlstra &lt;peterz@infradead.org&gt;
Cc: Stephane Eranian &lt;eranian@google.com&gt;
Cc: Thomas Gleixner &lt;tglx@linutronix.de&gt;
Signed-off-by: Ingo Molnar &lt;mingo@kernel.org&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
We fail to free the shared_regs allocation if the constraint_list
allocation fails.

Cure this and be more consistent in NULL-ing the pointers after free.

Signed-off-by: Peter Zijlstra (Intel) &lt;peterz@infradead.org&gt;
Cc: Linus Torvalds &lt;torvalds@linux-foundation.org&gt;
Cc: Peter Zijlstra &lt;peterz@infradead.org&gt;
Cc: Stephane Eranian &lt;eranian@google.com&gt;
Cc: Thomas Gleixner &lt;tglx@linutronix.de&gt;
Signed-off-by: Ingo Molnar &lt;mingo@kernel.org&gt;
</pre>
</div>
</content>
</entry>
</feed>
