Re: [PATCH] x86: correct fpu emulation access to ldt
From: Juergen Gross
Date: Wed Aug 05 2015 - 05:11:40 EST
On 08/04/2015 08:01 PM, Andy Lutomirski wrote:
On Tue, Aug 4, 2015 at 8:02 AM, Juergen Gross <jgross@xxxxxxxx> wrote:
Commit 14805442532c ("x86/ldt: Make modify_ldt synchronous") introduced
a new struct ldt_struct anchored at mm->context.ldt.
Adapt the x86 fpu emulation to use that new structure.
Signed-off-by: Juergen Gross <jgross@xxxxxxxx>
Whoops!
Does this need to Cc: stable?
Probably.
Also, want to make it slightly fancier so we can drop the dependency
on CONFIG_MODIFY_LDT_SYSCALL?
Something like:
-#define LDT_DESCRIPTOR(s) (((struct desc_struct
*)current->mm->context.ldt)[(s) >> 3])
+#ifdef CONFIG_MODIFY_LDT_SYSCALL
+#define LDT_DESCRIPTOR(s) (current->mm->context.ldt->entries[(s) >> 3])
+#else
+#define LDT_DESCRIPTOR(s) ((struct desc_struct){{{ .a = 0, .b = 0, }}})
+#endif
I'd need to specify the corresponding patch as a prerequisite for stable
I guess? How to do this before it is picked by Linus?
Juergen
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/