public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
From: Masami Hiramatsu (Google) <mhiramat@kernel.org>
To: Linus Torvalds <torvalds@linux-foundation.org>
Cc: Andrii Nakryiko <andrii@kernel.org>,
	Jeff Johnson <quic_jjohnson@quicinc.com>,
	Jiri Olsa <jolsa@kernel.org>,
	Masami Hiramatsu (Google) <mhiramat@kernel.org>,
	Steven Rostedt <rostedt@goodmis.org>,
	Masami Hiramatsu <mhiramat@kernel.org>,
	linux-kernel@vger.kernel.org
Subject: [GIT PULL] probes: Updates for v6.11
Date: Tue, 16 Jul 2024 23:44:45 +0900	[thread overview]
Message-ID: <20240716234445.a17a40e8d3d7b4ba5cef949e@kernel.org> (raw)

Hi Linus,

Probes updates for v6.11:

Uprobes:
- x86/shstk: Make return uprobe work with shadow stack.
- Add uretprobe syscall which speeds up the uretprobe 10-30% faster. This
  syscall is automatically used from user-space trampolines which are
  generated by the uretprobe. If this syscall is used by normal
  user program, it will cause SIGILL. Note that this is currently only
  implemented on x86_64.
  (This also has 2 fixes for adjusting the syscall number to avoid conflict
   with new *attrat syscalls.)
- uprobes/perf: fix user stack traces in the presence of pending uretprobe.
  This corrects the uretprobe's trampoline address in the stacktrace with
  correct return address.
- selftests/x86: Add a return uprobe with shadow stack test.
- selftests/bpf: Add uretprobe syscall related tests.
  . test case for register integrity check.
  . test case with register changing case.
  . test case for uretprobe syscall without uprobes (expected to be failed).
  . test case for uretprobe with shadow stack.
- selftests/bpf: add test validating uprobe/uretprobe stack traces
- MAINTAINERS: Add uprobes entry. This does not specify the tree but to
  clarify who maintains and reviews the uprobes.

Kprobes:
- tracing/kprobes: Test case cleanups. Replace redundant WARN_ON_ONCE() +
  pr_warn() with WARN_ONCE() and remove unnecessary code from selftest.
- tracing/kprobes: Add symbol counting check when module loads. This
  checks the uniqueness of the probed symbol on modules. The same check
  has already done for kernel symbols.
  (This also has a fix for build error with CONFIG_MODULES=n)

Cleanup:
- Add MODULE_DESCRIPTION() macros for fprobe and kprobe examples.


Please pull the latest probes-v6.11 tree, which can be found at:


  git://git.kernel.org/pub/scm/linux/kernel/git/trace/linux-trace.git
probes-v6.11

Tag SHA1: aa4c31f7638918b4fe22ccea2bc9469721ee95cd
Head SHA1: c26b1b89b8a9fd8665e79cd798bd970e233772b6


Andrii Nakryiko (2):
      perf,uprobes: fix user stack traces in the presence of pending uretprobes
      selftests/bpf: add test validating uprobe/uretprobe stack traces

Jeff Johnson (2):
      fprobe: add missing MODULE_DESCRIPTION() macro
      samples: kprobes: add missing MODULE_DESCRIPTION() macros

Jiri Olsa (10):
      x86/shstk: Make return uprobe work with shadow stack
      uprobe: Wire up uretprobe system call
      uprobe: Add uretprobe syscall to speed up return probe
      selftests/x86: Add return uprobe shadow stack test
      selftests/bpf: Add uretprobe syscall test for regs integrity
      selftests/bpf: Add uretprobe syscall test for regs changes
      selftests/bpf: Add uretprobe syscall call from user space test
      selftests/bpf: Add uretprobe shadow stack test
      uprobe: Change uretprobe syscall scope and number
      selftests/bpf: Change uretprobe syscall number in uprobe_syscall test

Masami Hiramatsu (Google) (5):
      tracing/kprobe: Integrate test warnings into WARN_ONCE
      tracing/kprobe: Remove cleanup code unrelated to selftest
      tracing/kprobes: Add symbol counting check when module loads
      tracing/kprobes: Fix build error when find_module() is not available
      MAINTAINERS: Add uprobes entry

----
 MAINTAINERS                                        |  13 +
 arch/x86/entry/syscalls/syscall_64.tbl             |   1 +
 arch/x86/include/asm/shstk.h                       |   4 +
 arch/x86/kernel/shstk.c                            |  16 +
 arch/x86/kernel/uprobes.c                          | 124 ++++++-
 include/linux/syscalls.h                           |   2 +
 include/linux/uprobes.h                            |   3 +
 include/uapi/asm-generic/unistd.h                  |   5 +-
 kernel/events/callchain.c                          |  43 ++-
 kernel/events/uprobes.c                            |  33 +-
 kernel/sys_ni.c                                    |   2 +
 kernel/trace/trace_kprobe.c                        | 192 +++++-----
 samples/fprobe/fprobe_example.c                    |   1 +
 samples/kprobes/kprobe_example.c                   |   1 +
 samples/kprobes/kretprobe_example.c                |   1 +
 tools/include/linux/compiler.h                     |   4 +
 .../selftests/bpf/bpf_testmod/bpf_testmod.c        | 123 ++++++-
 .../selftests/bpf/prog_tests/uprobe_syscall.c      | 385 +++++++++++++++++++++
 .../selftests/bpf/prog_tests/uretprobe_stack.c     | 186 ++++++++++
 tools/testing/selftests/bpf/progs/uprobe_syscall.c |  15 +
 .../selftests/bpf/progs/uprobe_syscall_executed.c  |  17 +
 .../testing/selftests/bpf/progs/uretprobe_stack.c  |  96 +++++
 tools/testing/selftests/x86/test_shadow_stack.c    | 145 ++++++++
 23 files changed, 1320 insertions(+), 92 deletions(-)
 create mode 100644 tools/testing/selftests/bpf/prog_tests/uprobe_syscall.c
 create mode 100644 tools/testing/selftests/bpf/prog_tests/uretprobe_stack.c
 create mode 100644 tools/testing/selftests/bpf/progs/uprobe_syscall.c
 create mode 100644 tools/testing/selftests/bpf/progs/uprobe_syscall_executed.c
 create mode 100644 tools/testing/selftests/bpf/progs/uretprobe_stack.c

-- 
Masami Hiramatsu (Google) <mhiramat@kernel.org>

             reply	other threads:[~2024-07-16 14:44 UTC|newest]

Thread overview: 10+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2024-07-16 14:44 Masami Hiramatsu [this message]
2024-07-18 21:26 ` [GIT PULL] probes: Updates for v6.11 pr-tracker-bot
2024-07-19  0:28 ` Stephen Rothwell
2024-07-19  0:49   ` Linus Torvalds
2024-07-19  0:56     ` Linus Torvalds
2024-07-19 14:24     ` Arnd Bergmann
2024-07-19  1:21   ` Masami Hiramatsu
2024-07-19  1:52   ` Masami Hiramatsu
2024-07-19  4:44     ` Stephen Rothwell
2024-07-19  6:51       ` Masami Hiramatsu

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20240716234445.a17a40e8d3d7b4ba5cef949e@kernel.org \
    --to=mhiramat@kernel.org \
    --cc=andrii@kernel.org \
    --cc=jolsa@kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=quic_jjohnson@quicinc.com \
    --cc=rostedt@goodmis.org \
    --cc=torvalds@linux-foundation.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox