Skip to content

RFC uprobes: kill xol vma

Oleg Nesterov linux-mm lkml 1 version In review

Get series with b4
b4 am [email protected]

Versions newest first

  1. v1 RFC Latest5 patches 14 repliesIn review

Patches in v1 No applies recorded yet

#Subject and filesSizeRepliesApplied
1/5uprobes: kill pre_ssout(), introduce set_xol_ip()arch/x86/kernel/uprobes.c include/linux/uprobes.h kernel/uprobes.c+14 -160 replies
2/5uprobes: introduce uprobe_switch_to()arch/x86/include/asm/thread_info.h arch/x86/kernel/process.c arch/x86/kernel/uprobes.c +2 more+27 -04 replies
3/5uprobes: introduce uprobe_xol_slots[NR_CPUS]arch/x86/include/asm/fixmap.h arch/x86/kernel/uprobes.c include/linux/uprobes.h +1 more+24 -03 replies
4/5uprobes: teach set_xol_ip() to use uprobe_xol_slots[]kernel/uprobes.c+10 -60 replies
5/5uprobes: remove the uprobes_xol_area codeinclude/linux/mm_types.h include/linux/uprobes.h kernel/fork.c +1 more+0 -2250 replies

Reviews trailers per patch

No Reviewed-by, Acked-by or Tested-by trailers for v1 yet.

Read the v1 thread

Cover letter [PATCH RFC 0/5] uprobes: kill xol vma

Hello.

On top of this series, not for inclusion yet, just to explain what I mean. May be someone can test it ;)

This series kills xol_vma. Instead we use the per_cpu-like xol slots.

This is much more simple and efficient. And this of course solves many problems we currently have with xol_vma.

For example, we simply can not trust it. We do not know what actually we are going to execute in UTASK_SSTEP mode. An application can unmap this area and then do mmap(PROT_EXEC|PROT_WRITE, MAP_FIXED) to fool uprobes.

The only disadvantage is that this adds a bit more arch-dependant code.

The main question, can this work? I know very little in this area. And I am not sure if this can be ported to other architectures.

Please comment.

Oleg.

 arch/x86/include/asm/fixmap.h      |    9 +
 arch/x86/include/asm/thread_info.h |    4 
 arch/x86/kernel/process.c          |    6 
 arch/x86/kernel/uprobes.c          |   26 +++-
 include/linux/mm_types.h           |    1 
 include/linux/uprobes.h            |   27 ----
 kernel/fork.c                      |    2 
 kernel/uprobes.c                   |  239 +++----------------------------------
 8 files changed, 71 insertions(+), 243 deletions(-)

--
To unsubscribe, send a message with 'unsubscribe linux-mm' in
the body to [email protected]. For more info on Linux MM,
see: http://www.linux-mm.org/ .
Fight unfair telecom internet charges in Canada: sign http://stopthemeter.ca/
Don't email: <a href=mailto:"[email protected]"> [email protected] </a>