lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [thread-next>] [day] [month] [year] [list]
Message-ID: <20251117083551.517393-1-jolsa@kernel.org>
Date: Mon, 17 Nov 2025 09:35:47 +0100
From: Jiri Olsa <jolsa@...nel.org>
To: Andrii Nakryiko <andrii@...nel.org>
Cc: bpf@...r.kernel.org,
	linux-kernel@...r.kernel.org,
	Song Liu <songliubraving@...com>,
	Yonghong Song <yhs@...com>,
	John Fastabend <john.fastabend@...il.com>
Subject: [PATCH bpf-next 0/4] libbpf: Make optimized uprobes backward compatible

hi,
we can currently optimize uprobes on top of nop5 instructions,
so application can define USDT_NOP to nop5 and use USDT macro
to define optimized usdt probes.

This works fine on new kernels, but could have performance penalty
on older kernels, that do not have the support to optimize and to
emulate nop5 instruction.

This patchset adds support to workaround the performance penalty
on older kernels that do not support uprobe optimization, please
see detailed description in patch 1.

Note patch 1 will need to get pushed to libbpf/usdt [1] as well.

thanks,
jirka


[1] https://github.com/libbpf/usdt
---
Jiri Olsa (4):
      selftests/bpf: Emit nop,nop5 instructions for x86_64 usdt probe
      libbpf: Add uprobe syscall feature detection
      libbpf: Add support to parse extra info in usdt note record
      selftests/bpf: Add test for checking correct nop of optimized usdt

 tools/lib/bpf/features.c                      | 22 ++++++++++++++++++++++
 tools/lib/bpf/libbpf_internal.h               |  2 ++
 tools/lib/bpf/usdt.c                          | 27 ++++++++++++++++++++++++++-
 tools/testing/selftests/bpf/.gitignore        |  2 ++
 tools/testing/selftests/bpf/Makefile          |  7 ++++++-
 tools/testing/selftests/bpf/prog_tests/usdt.c | 82 ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
 tools/testing/selftests/bpf/progs/test_usdt.c |  9 +++++++++
 tools/testing/selftests/bpf/usdt.h            | 17 +++++++++++++++++
 tools/testing/selftests/bpf/usdt_1.c          | 14 ++++++++++++++
 tools/testing/selftests/bpf/usdt_2.c          | 13 +++++++++++++
 10 files changed, 193 insertions(+), 2 deletions(-)
 create mode 100644 tools/testing/selftests/bpf/usdt_1.c
 create mode 100644 tools/testing/selftests/bpf/usdt_2.c

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ