linux-stable/arch/x86
Oleg Nesterov 3a4664aa83 uprobes/x86: Xol should send SIGTRAP if X86_EFLAGS_TF was set
arch_uprobe_disable_step() correctly preserves X86_EFLAGS_TF and
returns to user-mode. But this means the application gets SIGTRAP
only after the next insn.

This means that UPROBE_CLEAR_TF logic is not really right. _enable
should only record the state of X86_EFLAGS_TF, and _disable should
check it separately from UPROBE_FIX_SETF.

Remove arch_uprobe_task->restore_flags, add ->saved_tf instead, and
change enable/disable accordingly. This assumes that the probed insn
was not trapped, see the next patch.

arch_uprobe_skip_sstep() logic has the same problem, change it to
check X86_EFLAGS_TF and send SIGTRAP as well. We will cleanup this
all after we fold enable/disable_step into pre/post_hol hooks.

Note: send_sig(SIGTRAP) is not actually right, we need send_sigtrap().
But this needs more changes, handle_swbp() does the same and this is
equally wrong.

Signed-off-by: Oleg Nesterov <oleg@redhat.com>
Acked-by: Srikar Dronamraju <srikar@linux.vnet.ibm.com>
2012-09-15 17:37:31 +02:00
..
boot x86, build: Globally set -fno-pic 2012-08-10 16:12:30 -07:00
configs
crypto
ia32
include/asm uprobes/x86: Xol should send SIGTRAP if X86_EFLAGS_TF was set 2012-09-15 17:37:31 +02:00
kernel uprobes/x86: Xol should send SIGTRAP if X86_EFLAGS_TF was set 2012-09-15 17:37:31 +02:00
kvm KVM: x86 emulator: use stack size attribute to mask rsp in stack ops 2012-08-22 18:54:26 -03:00
lguest
lib
math-emu
mm mm: hugetlbfs: correctly populate shared pmd 2012-08-21 16:45:02 -07:00
net
oprofile
pci
platform Revert "x86-64/efi: Use EFI to deal with platform wall clock" 2012-08-14 09:58:25 -07:00
power
realmode x86, build: Globally set -fno-pic 2012-08-10 16:12:30 -07:00
syscalls x32: Use compat shims for {g,s}etsockopt 2012-08-18 14:15:39 -07:00
tools
um um: switch UPT_SET_RETURN_VALUE and regs_return_value to pt_regs 2012-08-01 23:33:16 +02:00
vdso
video
xen Three bug-fixes: 2012-08-25 17:31:59 -07:00
.gitignore
Kbuild
Kconfig ftrace/x86: Add support for -mfentry to x86_64 2012-08-23 11:26:36 -04:00
Kconfig.cpu
Kconfig.debug
Makefile x86, build: Globally set -fno-pic 2012-08-10 16:12:30 -07:00
Makefile.um
Makefile_32.cpu