x86: initialize 64bit registers for a.out executables
authorAndi Kleen <ak@suse.de>
Wed, 17 Oct 2007 16:04:33 +0000 (18:04 +0200)
committerThomas Gleixner <tglx@inhelltoy.tec.linutronix.de>
Wed, 17 Oct 2007 18:15:30 +0000 (20:15 +0200)
Previously the data from before the exec was kept in there. Zero
them instead.

[ tglx: arch/x86 adaptation ]

Signed-off-by: Andi Kleen <ak@suse.de>
Signed-off-by: Ingo Molnar <mingo@elte.hu>
Signed-off-by: Thomas Gleixner <tglx@linutronix.de>
arch/x86/ia32/ia32_aout.c

index 7cf1c29bf90e36fc91df048e2bf18b3989e89bff..f82e1a94fcb7eb3e5060ce21dd34e0cbafc4be1a 100644 (file)
@@ -420,6 +420,8 @@ beyond_if:
        (regs)->eflags = 0x200;
        (regs)->cs = __USER32_CS;
        (regs)->ss = __USER32_DS;
+       regs->r8 = regs->r9 = regs->r10 = regs->r11 =
+       regs->r12 = regs->r13 = regs->r14 = regs->r15 = 0;
        set_fs(USER_DS);
        if (unlikely(current->ptrace & PT_PTRACED)) {
                if (current->ptrace & PT_TRACE_EXEC)