* Re: [PATCH 1/5] i387: math_state_restore() isn't called from asm
@ 2012-02-23 13:57 George Spelvin
0 siblings, 0 replies; 2+ messages in thread
From: George Spelvin @ 2012-02-23 13:57 UTC (permalink / raw)
To: linux-kernel, torvalds; +Cc: linux
> + * Must be called with kernel preemption disabled (eg with local
> + * local interrupts as in the case of do_device_not_available).
"eg with local local interrupts"?
As long as I'm quibbling, "exempli gratia" deserves periods to make the
abbreviation, and a parenthetical comment at the end of a sentence is
usually better set off with a comma.
+ * Must be called with kernel preemption disabled, e.g. with local
+ * interrupts disabled as in the case of do_device_not_available.
^ permalink raw reply [flat|nested] 2+ messages in thread
* [PATCH 0/5] i387: stable kernel backport
@ 2012-02-22 20:54 Linus Torvalds
2012-02-22 20:56 ` [PATCH 1/5] i387: math_state_restore() isn't called from asm Linus Torvalds
0 siblings, 1 reply; 2+ messages in thread
From: Linus Torvalds @ 2012-02-22 20:54 UTC (permalink / raw)
To: Greg Kroah-Hartman, stable
Cc: Raphael Prevost, Suresh Siddha, Peter Anvin, Linux Kernel Mailing List
This is a reasonably minimal backport of the i387 state save/restore bug.
A few of the commits are just minimal "make it easier to backport" commits
that don't necessarily fix anything on their own. And a few of the others
are combinations of what is two commits in the development tree, because
it turned out to be easier and cleaner that way.
The last one is the one that fixes the x86-32 bug, but the preemption
fixes are real fixes too, although they are probably not something that
anybody has necessarily ever hit in reality because the race window is so
small. Even so, if the fix itself isn't that important, the "make it
easier to backport the main one" would still be a big argument for it.
I *really* hope that the people who could reproduce this bug will test the
back-port series too, since I never actually saw the bug personally to
begin with. And again, big thanks to Raphael who helped pinpoint and debug
this.
Linus
---
Linus Torvalds (5):
i387: math_state_restore() isn't called from asm
i387: make irq_fpu_usable() tests more robust
i387: fix x86-64 preemption-unsafe user stack save/restore
i387: move TS_USEDFPU clearing out of __save_init_fpu and into callers
i387: move TS_USEDFPU flag from thread_info to task_struct
arch/x86/include/asm/i387.h | 158 +++++++++++++++++++++++++++++++-----
arch/x86/include/asm/processor.h | 1 +
arch/x86/include/asm/thread_info.h | 2 -
arch/x86/kernel/traps.c | 14 ++--
arch/x86/kernel/xsave.c | 12 +--
arch/x86/kvm/vmx.c | 2 +-
6 files changed, 150 insertions(+), 39 deletions(-)
--
1.7.9.188.g12766.dirty
^ permalink raw reply [flat|nested] 2+ messages in thread* [PATCH 1/5] i387: math_state_restore() isn't called from asm
2012-02-22 20:54 [PATCH 0/5] i387: stable kernel backport Linus Torvalds
@ 2012-02-22 20:56 ` Linus Torvalds
0 siblings, 0 replies; 2+ messages in thread
From: Linus Torvalds @ 2012-02-22 20:56 UTC (permalink / raw)
To: Greg Kroah-Hartman, stable
Cc: Raphael Prevost, Suresh Siddha, Peter Anvin, Linux Kernel Mailing List
From: Linus Torvalds <torvalds@linux-foundation.org>
Date: Mon, 13 Feb 2012 13:47:25 -0800
[ Upstream commit be98c2cdb15ba26148cd2bd58a857d4f7759ed38 ]
It was marked asmlinkage for some really old and stale legacy reasons.
Fix that and the equally stale comment.
Noticed when debugging the irq_fpu_usable() bugs.
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
Cc: stable@kernel.org # Helps back-porting
---
Ok, this is trivial, but correct, and avoids the silly clashes with the
other patches.
arch/x86/include/asm/i387.h | 2 +-
arch/x86/kernel/traps.c | 6 +++---
2 files changed, 4 insertions(+), 4 deletions(-)
diff --git a/arch/x86/include/asm/i387.h b/arch/x86/include/asm/i387.h
index c9e09ea05644..cba143210780 100644
--- a/arch/x86/include/asm/i387.h
+++ b/arch/x86/include/asm/i387.h
@@ -29,7 +29,7 @@ extern unsigned int sig_xstate_size;
extern void fpu_init(void);
extern void mxcsr_feature_mask_init(void);
extern int init_fpu(struct task_struct *child);
-extern asmlinkage void math_state_restore(void);
+extern void math_state_restore(void);
extern void __math_state_restore(void);
extern int dump_fpu(struct pt_regs *, struct user_i387_struct *);
diff --git a/arch/x86/kernel/traps.c b/arch/x86/kernel/traps.c
index a8e3eb83466c..727e6c16f294 100644
--- a/arch/x86/kernel/traps.c
+++ b/arch/x86/kernel/traps.c
@@ -590,10 +590,10 @@ void __math_state_restore(void)
* Careful.. There are problems with IBM-designed IRQ13 behaviour.
* Don't touch unless you *really* know how it works.
*
- * Must be called with kernel preemption disabled (in this case,
- * local interrupts are disabled at the call-site in entry.S).
+ * Must be called with kernel preemption disabled (eg with local
+ * local interrupts as in the case of do_device_not_available).
*/
-asmlinkage void math_state_restore(void)
+void math_state_restore(void)
{
struct thread_info *thread = current_thread_info();
struct task_struct *tsk = thread->task;
--
1.7.9.188.g12766.dirty
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2012-02-23 14:04 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2012-02-23 13:57 [PATCH 1/5] i387: math_state_restore() isn't called from asm George Spelvin
-- strict thread matches above, loose matches on Subject: below --
2012-02-22 20:54 [PATCH 0/5] i387: stable kernel backport Linus Torvalds
2012-02-22 20:56 ` [PATCH 1/5] i387: math_state_restore() isn't called from asm Linus Torvalds
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®