Skip to content

RFC uprobes: kill uprobes_srcu/uprobe_srcu_id

Oleg Nesterov linux-mm lkml 1 version In review

Get series with b4
b4 am [email protected]

Versions newest first

  1. v1 RFC Latest6 patches 31 repliesIn review

Patches in v1 No applies recorded yet

#Subject and filesSizeRepliesApplied
1/6uprobes: introduce find_active_uprobe()kernel/events/uprobes.c+19 -120 replies
2/6uprobes: introduce is_swbp_at_addr_fast()kernel/events/uprobes.c+23 -07 replies
3/6uprobes: teach find_active_uprobe() to provide the "is_swbp" infokernel/events/uprobes.c+17 -100 replies
4/6uprobes: change register_for_each_vma() to take mm->mmap_sem for writingkernel/events/uprobes.c+4 -40 replies
5/6uprobes: teach handle_swbp() to rely on "is_swbp" rather than uprobes_srcukernel/events/uprobes.c+15 -30 replies
6/6uprobes: kill uprobes_srcu/uprobe_srcu_idinclude/linux/sched.h kernel/events/uprobes.c+3 -200 replies

Reviews trailers per patch

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

Read the v1 thread

Cover letter [RFC 0/6] uprobes: kill uprobes_srcu/uprobe_srcu_id

Hello.

Not for inclusion yet, only for the early review.

I didn't even try to test these changes, and I am not expert in this area. And even _if_ this code is correct, I need to re-split these changes anyway, update the changelogs, etc.

Questions:

- does it make sense?

- can it work or I missed something "in general" ?

Why:

- It would be nice to remove a member from task_struct.

- Afaics, the usage of uprobes_srcu does not look right, at least in theory, see 6/6.

The comment above delete_uprobe() says:

The current unregistering thread waits till all other threads have hit a breakpoint, to acquire the uprobes_treelock before the uprobe is removed from the rbtree.

but synchronize_srcu() can only help if a thread which have hit the breakpoint has already called srcu_read_lock(). It can't synchronize with read_lock "in future", and there is a small window.

We could probably add another synchronize_sched() before synchronize_srcu(), but this doesn't look very nice and

- I am not sure yet, but perhaps with these changes we can also kill mm->uprobes_state.count.

Any review is very much appreciated.

Oleg.

 include/linux/sched.h   |    1 -
 kernel/events/uprobes.c |  117 ++++++++++++++++++++++++++++++-----------------
 2 files changed, 75 insertions(+), 43 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>