Skip to content

Commit

Permalink
x86: initialize 64bit registers for a.out executables
Browse files Browse the repository at this point in the history
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>
  • Loading branch information
Andi Kleen authored and Thomas Gleixner committed Oct 17, 2007
1 parent 1c5b5cf commit f891dd1
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions arch/x86/ia32/ia32_aout.c
Original file line number Diff line number Diff line change
Expand Up @@ -420,6 +420,8 @@ static int load_aout_binary(struct linux_binprm * bprm, struct pt_regs * regs)
(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)
Expand Down

0 comments on commit f891dd1

Please sign in to comment.