Thread (42 messages) 42 messages, 7 authors, 2024-07-02

Re: [PATCH 02/12] uprobes: grab write mmap lock in unapply_uprobe()

From: Andrii Nakryiko <hidden>
Date: 2024-06-26 16:39:11
Also in: bpf

On Tue, Jun 25, 2024 at 12:09 PM Oleg Nesterov [off-list ref] wrote:
On 06/25, Andrii Nakryiko wrote:
quoted
On Tue, Jun 25, 2024 at 7:51 AM Oleg Nesterov [off-list ref] wrote:
quoted
Why?

So far I don't understand this change. Quite possibly I missed something,
but in this case the changelog should explain the problem more clearly.
I just went off of "Called with mm->mmap_lock held for write." comment
in uprobe_write_opcode(), tbh.
Ah, indeed... and git blame makes me sad ;)

I _think_ that 29dedee0e693a updated this comment without any thinking,
but today I can't recall. In any case, today this nothing to do with
mem_cgroup_charge(). Not sure __replace_page() is correct (in this respect)
when it returns -EAGAIN but this is another story.
quoted
If we don't actually need writer
mmap_lock, we should probably update at least that comment.
Agreed.
Ok, I'll drop this change and will just update the comment.
quoted
There is a
lot going on in uprobe_write_opcode(), and I don't understand all the
requirements there.
Heh. Neither me today ;)

Oleg.
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help