uprobes/x86: Add is_64bit_mm(), kill validate_insn_bits()
uprobes/x86: Add is_64bit_mm(), kill validate_insn_bits()

1. Extract the ->ia32_compat check from 64bit validate_insn_bits()
   into the new helper, is_64bit_mm(), it will have more users.

   TODO: this checks is actually wrong if mm owner is X32 task,
   we need another fix which changes set_personality_ia32().

   TODO: even worse, the whole 64-or-32-bit logic is very broken
   and the fix is not simple, we need the nontrivial changes in
   the core uprobes code.

2. Kill validate_insn_bits() and change its single caller to use
   uprobe_init_insn(is_64bit_mm(mm).

Signed-off-by: Oleg Nesterov <20b70f0af00562e63758b9ee42012ecc96c58590@redhat.com>
Reviewed-by: Jim Keniston <40777a9d59bdf69ed7abf1ca5dad3b4d30e1b574@us.ibm.com>
Acked-by: Srikar Dronamraju <1f69195f6d934d4caf5816234bde319316df237e@linux.vnet.ibm.com>

KristFoundation/Programs,KristFoundation/Programs,KristFoundation/Programs,KristFoundation/Programs,KristFoundation/Programs,KristFoundation/Programs