Skip to content

Commit

Permalink
x86: kprobes: fix swapped segment registers in kretprobe
Browse files Browse the repository at this point in the history
In commit f007ea2, the order of the %es and %ds segment registers
got accidentally swapped, so synthesized 'struct pt_regs' frames
have the two values inverted.  It's almost sure that these values
never matter, and that they also never differ.  But wrong is wrong.

Signed-off-by: Roland McGrath <roland@redhat.com>
  • Loading branch information
Roland McGrath committed Jul 18, 2010
1 parent bea9a6d commit a197479
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion arch/x86/kernel/kprobes.c
Original file line number Diff line number Diff line change
@@ -640,8 +640,8 @@ static int __kprobes kprobe_handler(struct pt_regs *regs)
/* Skip cs, ip, orig_ax and gs. */ \
" subl $16, %esp\n" \
" pushl %fs\n" \
" pushl %ds\n" \
" pushl %es\n" \
" pushl %ds\n" \
" pushl %eax\n" \
" pushl %ebp\n" \
" pushl %edi\n" \

0 comments on commit a197479

Please sign in to comment.