Skip to content

jump label v7

Jason Baron lkml 1 version In review

Get series with b4
b4 am [email protected]

Versions newest first

  1. v1 Latest11 patches 9 repliesIn review

Patches in v1 No applies recorded yet

#Subject and filesSizeRepliesApplied
1/11jump label: notifier atomic call chain notracekernel/notifier.c+3 -30 replies
2/11jump label: base patcharch/Kconfig include/asm-generic/vmlinux.lds.h include/linux/jump_label.h +2 more+251 -20 replies
3/11jump label: x86 supportarch/x86/Kconfig arch/x86/include/asm/jump_entry.h arch/x86/include/asm/jump_label.h +2 more+117 -10 replies
4/11jump label: tracepoint supportinclude/linux/tracepoint.h kernel/tracepoint.c+27 -150 replies
5/11jump label: add module supportarch/x86/kernel/ptrace.c include/linux/jump_label.h include/linux/module.h +2 more+150 -20 replies
6/11jump label: move ftrace_dyn_arch_init to common codearch/x86/include/asm/alternative.h arch/x86/include/asm/jump_label.h arch/x86/kernel/alternative.c +7 more+139 -1060 replies
7/11jump label: sort jump table at build-timeMakefile include/asm-generic/vmlinux.lds.h scripts/mod/Makefile +2 more+91 -70 replies
8/11jump label: initialize workqueue tracepoints *before* they are registeredkernel/trace/trace_workqueue.c+5 -50 replies
9/11jump label: jump_label_text_reserved() to reserve our jump pointsarch/x86/kernel/kprobes.c include/linux/jump_label.h kernel/jump_label.c +1 more+93 -20 replies
10/11sparc64: Add jump_label supportarch/sparc/Kconfig arch/sparc/include/asm/jump_entry.h arch/sparc/include/asm/jump_label.h +3 more+84 -00 replies
11/11jump label: add docsDocumentation/jump-label.txt+140 -00 replies

Reviews trailers per patch

2 of 11 patches have a Reviewed-by or Acked-by.

PatchMasami Hiramatsu
1/11R-b
2/11
3/11
4/11
5/11
6/11
7/11
8/11
9/11A-b
10/11
11/11

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 00/11] jump label v7

Hi,

Based on David Miller's suggestion this version re-works the architecture interfaces for jump labels. I have also added a documentation file, and re-freshed the patchset against the latest -tip tree.

The new architecture interface (quoting from the docs file), is as follows:

"
4) architecture interface

There are a few functions and macros which arches must implement in order to take advantage of this optimization. As previously mentioned, if there is no architecture support we simply fall back to a traditional, load, test, and jump sequence.

* add "HAVE_ARCH_JUMP_LABEL" to arch/<arch>/Kconfig to indicate support

* #define JUMP_LABEL_NOP_SIZE, arch/x86/include/asm/jump_label.h

* #define "JUMP_LABEL(tag, label, cond)", arch/x86/include/asm/jump_label.h

* add: void arch_jump_label_transform(struct jump_entry *entry, enum jump_label_type type) and
const u8 *arch_get_jump_label_nop(void)

see: arch/x86/kernel/jump_label.c

* finally add a definition for "struct jump_entry". This must be done in a separate .h file, b/c the modpost.c code uses this definition to sort the the jump label tabel in the vmlinux, so that it does not have to be sorted at runtime. see: arch/x86/include/asm/jump_entry.h
"

David, I re-worked the sparc64 to match the updated interfaces. The code should hopefully compile now, although I did not test the sparc bits.

thanks,

-Jason

David S. Miller (1):
sparc64: Add jump_label support

Jason Baron (9):
jump label: base patch
jump label: x86 support
jump label: tracepoint support
jump label: add module support
jump label: move ftrace_dyn_arch_init to common code jump label: sort jump table at build-time
jump label: initialize workqueue tracepoints *before* they are
registered
jump label: jump_label_text_reserved() to reserve our jump points jump label: add docs

Mathieu Desnoyers (1):
jump label: notifier atomic call chain notrace

 Documentation/jump-label.txt        |  140 +++++++++++
 Makefile                            |    6 +-
 arch/Kconfig                        |    3 +
 arch/sparc/Kconfig                  |    1 +
 arch/sparc/include/asm/jump_entry.h |   16 ++
 arch/sparc/include/asm/jump_label.h |   21 ++
 arch/sparc/kernel/Makefile          |    2 +
 arch/sparc/kernel/jump_label.c      |   38 +++
 arch/sparc/kernel/module.c          |    6 +
 arch/x86/Kconfig                    |    1 +
 arch/x86/include/asm/alternative.h  |   14 ++
 arch/x86/include/asm/jump_entry.h   |   28 +++
 arch/x86/include/asm/jump_label.h   |   23 ++
 arch/x86/kernel/Makefile            |    2 +-
 arch/x86/kernel/alternative.c       |   71 ++++++-
 arch/x86/kernel/ftrace.c            |   70 +------
 arch/x86/kernel/jump_label.c        |   47 ++++
 arch/x86/kernel/kprobes.c           |    3 +-
 arch/x86/kernel/module.c            |    3 +
 arch/x86/kernel/ptrace.c            |    1 +
 arch/x86/kernel/setup.c             |    3 +
 include/asm-generic/vmlinux.lds.h   |   22 ++-
 include/linux/jump_label.h          |   75 ++++++
 include/linux/module.h              |    5 +-
 include/linux/tracepoint.h          |   34 ++--
 kernel/Makefile                     |    2 +-
 kernel/jump_label.c                 |  431 +++++++++++++++++++++++++++++++++++
 kernel/kprobes.c                    |    3 +-
 kernel/module.c                     |    7 +
 kernel/notifier.c                   |    6 +-
 kernel/trace/ftrace.c               |   13 +-
 kernel/trace/trace_workqueue.c      |   10 +-
 kernel/tracepoint.c                 |    8 +
 scripts/mod/Makefile                |    1 +
 scripts/mod/modpost.c               |   71 ++++++-
 scripts/mod/modpost.h               |    2 +
 36 files changed, 1073 insertions(+), 116 deletions(-)
 create mode 100644 Documentation/jump-label.txt
 create mode 100644 arch/sparc/include/asm/jump_entry.h
 create mode 100644 arch/sparc/include/asm/jump_label.h
 create mode 100644 arch/sparc/kernel/jump_label.c
 create mode 100644 arch/x86/include/asm/jump_entry.h
 create mode 100644 arch/x86/include/asm/jump_label.h
 create mode 100644 arch/x86/kernel/jump_label.c
 create mode 100644 include/linux/jump_label.h
 create mode 100644 kernel/jump_label.c