Skip to content

Text edit lock and atomic text_poke()

Masami Hiramatsu lkml 1 version In review

Get series with b4
b4 am [email protected]

Versions newest first

  1. v1 Latest4 patches 20 repliesIn review

Patches in v1 No applies recorded yet

#Subject and filesSizeRepliesApplied
1/4Text Edit Lock - Architecture Independent Code (v2)include/linux/memory.h mm/memory.c+15 -01 reply
2/4Text Edit Lock - kprobes architecture independent support (v3)kernel/kprobes.c+13 -21 reply
3/4Text Edit Lock - Smp alternatives supportarch/x86/kernel/alternative.c+5 -03 replies
4/4Atomic text_poke() with fixmaparch/x86/include/asm/fixmap.h arch/x86/kernel/alternative.c+17 -93 replies
4/4Atomic text_poke() with fixmap take2arch/x86/include/asm/fixmap.h arch/x86/kernel/alternative.c+17 -910 replies

Reviews trailers per patch

3 of 5 patches have a Reviewed-by or Acked-by.

PatchAnanth N MavinakayanahalliMasami HiramatsuMathieu Desnoyers
1/4
2/4A-b A-b A-b A-b
3/4
4/4A-b A-b A-b A-b
4/4A-b A-b A-b A-b

Trailers given in replies are filled; those carried in the patches from earlier versions are outlined with dashes. Scroll the table sideways for all 3 reviewers.

Read the v1 thread

Cover letter [PATCH -tip 0/4] Text edit lock and atomic text_poke()

Hi,

Here is a series of patches which introduce text_mutex for protecting editing kernel text from each other subsystems, and make text_poke() atomic by using fixmap.

BTW,

Quoted 2 lines

Paravirt and alternatives are always done when SMP is inactive, so there is no need to use locks.

Mathieu, I'm not sure that means. alternatives will be called from module init code and other place where the system has already been running multi- -threads(and they use smp_alt mutex). So, is it possible that those functions will sleep or yield to another process?

Anyway, I added a new patch which locks text_mutex in alternative_smp_*.

Thank you,

 arch/x86/include/asm/fixmap.h |    2 ++
 arch/x86/kernel/alternative.c |   29 ++++++++++++++++++++---------
 include/linux/memory.h        |    6 ++++++
 kernel/kprobes.c              |   15 +++++++++++++--
 mm/memory.c                   |    9 +++++++++
 5 files changed, 50 insertions(+), 11 deletions(-)
Signature · 7 lines
Masami Hiramatsu

Software Engineer
Hitachi Computer Products (America) Inc.
Software Solutions Division

e-mail: [email protected]