uprobes/x86: Add uprobe_init_insn(), kill validate_insn_{32,64}bits()
authorOleg Nesterov <oleg@redhat.com>
Sat, 19 Apr 2014 10:34:02 +0000 (12:34 +0200)
committerOleg Nesterov <oleg@redhat.com>
Wed, 30 Apr 2014 17:10:33 +0000 (19:10 +0200)
commit73175d0d19657ec132cc24e8cf0e341e73c54868
treeeb9d7dfd347aa19a245650fe4e3634f59e651019
parent250bbd12c2fe1221ec96d8087d63e982d4f2180a
uprobes/x86: Add uprobe_init_insn(), kill validate_insn_{32,64}bits()

validate_insn_32bits() and validate_insn_64bits() are very similar,
turn them into the single uprobe_init_insn() which has the additional
"bool x86_64" argument which can be passed to insn_init() and used to
choose between good_insns_64/good_insns_32.

Also kill UPROBE_FIX_NONE, it has no users.

Note: the current code doesn't use ifdef's consistently, good_insns_64
depends on CONFIG_X86_64 but good_insns_32 is unconditional. This patch
removes ifdef around good_insns_64, we will add it back later along with
the similar one for good_insns_32.

Signed-off-by: Oleg Nesterov <oleg@redhat.com>
Reviewed-by: Jim Keniston <jkenisto@us.ibm.com>
Acked-by: Srikar Dronamraju <srikar@linux.vnet.ibm.com>
arch/x86/kernel/uprobes.c