diff options
author | Oleg Nesterov <oleg@redhat.com> | 2012-09-16 17:20:06 +0200 |
---|---|---|
committer | Oleg Nesterov <oleg@redhat.com> | 2012-09-29 21:21:53 +0200 |
commit | 75ed82ea53bd0d2d8083261123576250f7ba851e (patch) | |
tree | da2c69d053b7555c15e1adb5e6d901c2afab8ad8 /drivers | |
parent | db023ea595015058270be6a62fe60a7b6b5c50d7 (diff) | |
download | kernel_goldelico_gta04-75ed82ea53bd0d2d8083261123576250f7ba851e.zip kernel_goldelico_gta04-75ed82ea53bd0d2d8083261123576250f7ba851e.tar.gz kernel_goldelico_gta04-75ed82ea53bd0d2d8083261123576250f7ba851e.tar.bz2 |
uprobes: Change write_opcode() to use FOLL_FORCE
write_opcode()->get_user_pages() needs FOLL_FORCE to ensure we can
read the page even if the probed task did mprotect(PROT_NONE) after
uprobe_register(). Without FOLL_WRITE, FOLL_FORCE doesn't have any
side effect but allows to read the !VM_READ memory.
Otherwiese the subsequent uprobe_unregister()->set_orig_insn() fails
and we leak "int3". If that task does mprotect(PROT_READ | EXEC) and
execute the probed insn later it will be killed.
Note: in fact this is also needed for _register, see the next patch.
Signed-off-by: Oleg Nesterov <oleg@redhat.com>
Acked-by: Srikar Dronamraju <srikar@linux.vnet.ibm.com>
Diffstat (limited to 'drivers')
0 files changed, 0 insertions, 0 deletions