diff options
author | Denys Vlasenko <dvlasenk@redhat.com> | 2014-04-24 19:08:24 +0200 |
---|---|---|
committer | Oleg Nesterov <oleg@redhat.com> | 2014-04-30 19:10:33 +0200 |
commit | 250bbd12c2fe1221ec96d8087d63e982d4f2180a (patch) | |
tree | 9df825a8df4a2e6096c21cb1547c661742b52e05 /.mailmap | |
parent | 201131998fbf074b03679afedcc29948e63331ef (diff) | |
download | op-kernel-dev-250bbd12c2fe1221ec96d8087d63e982d4f2180a.zip op-kernel-dev-250bbd12c2fe1221ec96d8087d63e982d4f2180a.tar.gz |
uprobes/x86: Refuse to attach uprobe to "word-sized" branch insns
All branch insns on x86 can be prefixed with the operand-size
override prefix, 0x66. It was only ever useful for performing
jumps to 32-bit offsets in 16-bit code segments.
In 32-bit code, such instructions are useless since
they cause IP truncation to 16 bits, and in case of call insns,
they save only 16 bits of return address and misalign
the stack pointer as a "bonus".
In 64-bit code, such instructions are treated differently by Intel
and AMD CPUs: Intel ignores the prefix altogether,
AMD treats them the same as in 32-bit mode.
Before this patch, the emulation code would execute
the instructions as if they have no 0x66 prefix.
With this patch, we refuse to attach uprobes to such insns.
Signed-off-by: Denys Vlasenko <dvlasenk@redhat.com>
Acked-by: Jim Keniston <jkenisto@us.ibm.com>
Acked-by: Masami Hiramatsu <masami.hiramatsu.pt@hitachi.com>
Signed-off-by: Oleg Nesterov <oleg@redhat.com>
Diffstat (limited to '.mailmap')
0 files changed, 0 insertions, 0 deletions