Skip to content

uprobes/x86: cleanup validate_insn_* paths, fix X86_X32 case

Oleg Nesterov lkml 1 version In review

Get series with b4
b4 am [email protected]

Versions newest first

  1. v1 Latest5 patches 6 repliesIn review

Patches in v1 No applies recorded yet

#Subject and filesSizeRepliesApplied
1/5uprobes/x86: Add uprobe_init_insn(), kill validate_insn_{32,64}bits()arch/x86/kernel/uprobes.c+13 -321 reply
2/5uprobes/x86: Add is_64bit_mm(), kill validate_insn_bits()arch/x86/kernel/uprobes.c+9 -111 reply
3/5uprobes/x86: Shift "insn_complete" from branch_setup_xol_ops() to uprobe_init_insn()arch/x86/kernel/uprobes.c+4 -91 reply
4/5uprobes/x86: Make good_insns_* depend on CONFIG_X86_*arch/x86/kernel/uprobes.c+32 -241 reply
5/5uprobes/x86: Fix is_64bit_mm() with CONFIG_X86_X32arch/x86/kernel/process_64.c arch/x86/kernel/uprobes.c+5 -41 reply

Reviews trailers per patch

All 5 patches have a Reviewed-by or Acked-by of their own; the series has one for all of them.

PatchJim KenistonSrikar Dronamraju
SeriesR-b
1/5A-b
2/5A-b
3/5A-b
4/5A-b
5/5A-b

Trailers given in replies are filled; those carried in the patches from earlier versions are outlined with dashes.

Read the v1 thread

Cover letter [PATCH 0/5] uprobes/x86: cleanup validate_insn_* paths, fix X86_X32 case

Peter, feel free to ignore 1-4, but could you look at 5/5? It lacks the test-case because I do not have a x32-ready testing machine.

Quoted 4 lines · Oleg Nesterov

This series only fixes the problem. I'll send more changes to address some of TODO's mentioned in the changelogs later. In particular, we need to do something with "callw", see "Note: in 13/15.

So, what do you all think we should do with "callw"? Jim votes for declining to probe callw, and I fully agree.

Any objection?

Until then, lets cleanup the validate_insn_* paths and fix another bug. This cleanup can also simplify the next "reject callw" change.

Oleg.

 arch/x86/kernel/process_64.c |    7 +-
 arch/x86/kernel/uprobes.c    |  126 ++++++++++++++++++------------------------
 2 files changed, 58 insertions(+), 75 deletions(-)