i386: save/restore eflags in context switch (CVE-2006-5173)
commit09d9056ce65466da2a4634c62fcfecfa70fc9605
authorLinus Torvalds <torvalds@osdl.org>
Thu, 4 Jan 2007 22:23:27 +0000 (4 23:23 +0100)
committerAdrian Bunk <bunk@stusta.de>
Thu, 4 Jan 2007 22:23:27 +0000 (4 23:23 +0100)
treefe562e70b2fa660de32148a7a981843130025bee
parentbb3e712f45f05c380ee6efed0afd588ed3ce18fb
i386: save/restore eflags in context switch (CVE-2006-5173)

(And reset it on new thread creation)

It turns out that eflags is important to save and restore not just
because of iopl, but due to the magic bits like the NT bit, which we
don't want leaking between different threads.

Backported to 2.6.16 by Chuck Ebbert <76306.1226@compuserve.com>
[Backport consisted of removing the CFI annotations.]

Signed-off-by: Linus Torvalds <torvalds@osdl.org>
Signed-off-by: Adrian Bunk <bunk@stusta.de>
arch/i386/kernel/entry.S
include/asm-i386/system.h