Skip to content

kmap cleanups for uretprobes (Was: extract fill_page() and trampoline implementation)

Oleg Nesterov lkml 1 version In review

Get series with b4
b4 am [email protected]

Versions newest first

  1. v1 Latest5 patches 11 repliesIn review

Patches in v1 No applies recorded yet

#Subject and filesSizeRepliesApplied
1/5uprobes: Turn copy_opcode() into copy_from_page()kernel/events/uprobes.c+4 -42 replies
2/5uprobes: Change __copy_insn() to use copy_from_page()kernel/events/uprobes.c+2 -112 replies
3/5uprobes: Kill the unnecesary filp != NULL check in __copy_insn()kernel/events/uprobes.c+0 -32 replies
4/5uprobes: Introduce copy_to_page()kernel/events/uprobes.c+8 -62 replies
5/5uprobes: Change write_opcode() to use copy_*page()kernel/events/uprobes.c+2 -102 replies

Reviews trailers per patch

All 5 patches have a Reviewed-by or Acked-by.

PatchAnton ArapovSrikar Dronamraju
1/5A-b A-b
2/5A-b A-b
3/5A-b A-b
4/5A-b A-b
5/5A-b A-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] kmap cleanups for uretprobes (Was: extract fill_page() and trampoline implementation)
Quoted 6 lines · Oleg Nesterov
Quoted 2 lines · Anton Arapov

+static void fill_page(struct page *page, unsigned long offset, uprobe_opcode_t *insn)

                                                                  ^^^^^^^^^^^^^^^

Well, it should be "u8 *insn" or "char *".

Or void*.

And we have another reason for this helper.

And I really think that we need to cleanup the kmap mess in uprobe.c before we add the new abuser.

How about this simple series?

Quoted 2 lines

sizeof(insn) == UPROBE_SWBP_INSN_SIZE != MAX_UINSN_BYTES. See also the comments above.

I think that copy_to_page() added by 4/5 is what you need, and it solves the problems with typeof/sizeof. Plus it have another caller.

Oleg.