diff options
Diffstat (limited to 'tags/2.6.18-7/30038_don-t-leak-nt-bit-into-next-task-xen.patch')
-rw-r--r-- | tags/2.6.18-7/30038_don-t-leak-nt-bit-into-next-task-xen.patch | 32 |
1 files changed, 32 insertions, 0 deletions
diff --git a/tags/2.6.18-7/30038_don-t-leak-nt-bit-into-next-task-xen.patch b/tags/2.6.18-7/30038_don-t-leak-nt-bit-into-next-task-xen.patch new file mode 100644 index 0000000..8ee7bc0 --- /dev/null +++ b/tags/2.6.18-7/30038_don-t-leak-nt-bit-into-next-task-xen.patch @@ -0,0 +1,32 @@ + +--- linux-2.6.18.6.orig/arch/x86_64/kernel/entry-xen.S ++++ linux-2.6.18.6/arch/x86_64/kernel/entry-xen.S +@@ -146,6 +146,10 @@ + /* rdi: prev */ + ENTRY(ret_from_fork) + CFI_DEFAULT_STACK ++ push kernel_eflags(%rip) ++ CFI_ADJUST_CFA_OFFSET 4 ++ popf # reset kernel eflags ++ CFI_ADJUST_CFA_OFFSET -4 + call schedule_tail + GET_THREAD_INFO(%rcx) + testl $(_TIF_SYSCALL_TRACE|_TIF_SYSCALL_AUDIT),threadinfo_flags(%rcx) +--- linux-2.6.18.6.orig/arch/x86_64/kernel/setup64-xen.c ++++ linux-2.6.18.6/arch/x86_64/kernel/setup64-xen.c +@@ -178,6 +178,8 @@ void __cpuinit check_efer(void) + } + } + ++unsigned long kernel_eflags; ++ + /* + * cpu_init() initializes state that is per-CPU. Some data is already + * initialized (naturally) in the bootstrap process, such as the GDT +@@ -290,4 +292,6 @@ void __cpuinit cpu_init (void) + set_debugreg(0UL, 7); + + fpu_init(); ++ ++ raw_local_save_flags(kernel_eflags); + } |