linux/tools
Linus Torvalds adf12a394c Perf fixes for perf_mmap() reference counting to prevent potential
reference count leaks which are caused by:
 
  - VMA splits, which change the offset or size of a mapping, which causes
    perf_mmap_close() to ignore the unmap or unmap the wrong buffer.
 
  - Several internal issues of perf_mmap(), which can cause reference count
    leaks in the perf mmap, corrupt accounting or cause leaks in perf
    drivers.
 
 The main fix is to prevent VMA splits by implementing the [may_]split()
 callback for vm operations. The other issues are addressed by rearranging
 code, early returns on failure and invocation of cleanups.
 
 Also provide a selftest to validate the fixes.
 
 The reference counting should be converted to refcount_t, but that requires
 larger refactoring of the code and will be done once these fixes are
 upstream.
 -----BEGIN PGP SIGNATURE-----
 
 iQJHBAABCgAxFiEEQp8+kY+LLUocC4bMphj1TA10mKEFAmiSd0gTHHRnbHhAbGlu
 dXRyb25peC5kZQAKCRCmGPVMDXSYoWCbD/9niCHArXIWfdIp1K2ZwM2+tsCU7Ntl
 XnkfnaPoCVpQQXcAN11WIEK6DlwaiY2sfOco1cpEqr5px0Hv5qzM+OGm0r3KQBpr
 9d1Ox8+tqUOIxw5zsKFXpw6/WX4zzdxGHjzU/T0H+fPP3jB+hj/Q3hOk4u10+f3v
 7f3Q4sOfkmOauQez2HEaDwUip6lLZFEaf8IK0tYEkOJxcStwsC2TnLvmlEmOA0Yx
 PnAXOicrpbe9d8KNq6VxU0OtV6XAT+YJtf9T5cTNR1NhIkqyaMwbdzkuh9RZgxAE
 oRblaAHubAUMmv2DgYOTUGoYivsXY13XOtjfXdLmxt19HmkSOyaCFO8nJgjAPOL7
 gxGXS7zKxhNac7bfVgBANPUHOOWtV30H5CqYOzxaPlQs8gzOsl8l+NDZuwVlP4P6
 CMdN3rz3eMpnMpuzy0mmUJhowytKDA8N81yamCP5L9hWWZVfp4boZfIXMMLtJdQa
 nv/T2HxLL8HweFrI6Wd7YDhXMKhsNDAqJvtSv0z+5U+PWWd9rcOFsgS9sUHIiJuB
 pLvNwLxPntzF6qw4qIp1W1AHfLz2VF/tR8WyINpEZe4oafP1TccI+aLQdIJ/vVqp
 gQ0bCTiZb16IGsHruu4L9C0fe40TdSuiwEK5X9Opk4aP11oagsqQ+GxzssvQZnZc
 Jx2XqouabWBBvQ==
 =B9L/
 -----END PGP SIGNATURE-----

Merge tag 'perf-fixes-27504' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip.git

Pull perf fixes from Thomas Gleixner:
 "Perf fixes for perf_mmap() reference counting to prevent potential
  reference count leaks which are caused by:

   - VMA splits, which change the offset or size of a mapping, which
     causes perf_mmap_close() to ignore the unmap or unmap the wrong
     buffer.

   - Several internal issues of perf_mmap(), which can cause reference
     count leaks in the perf mmap, corrupt accounting or cause leaks in
     perf drivers.

  The main fix is to prevent VMA splits by implementing the
  [may_]split() callback for vm operations.

  The other issues are addressed by rearranging code, early returns on
  failure and invocation of cleanups.

  Also provide a selftest to validate the fixes.

  The reference counting should be converted to refcount_t, but that
  requires larger refactoring of the code and will be done once these
  fixes are upstream"

* tag 'perf-fixes-27504' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip.git:
  selftests/perf_events: Add a mmap() correctness test
  perf/core: Prevent VMA split of buffer mappings
  perf/core: Handle buffer mapping fail correctly in perf_mmap()
  perf/core: Exit early on perf_mmap() fail
  perf/core: Don't leak AUX buffer refcount on allocation failure
  perf/core: Preserve AUX buffer allocation failure result
2025-08-06 04:41:21 +03:00
..
accounting tools/getdelays: add backward compatibility for taskstats version 2025-08-02 12:01:41 -07:00
arch x86/rdrand: Disable RDSEED on AMD Cyan Skillfish 2025-07-08 21:33:26 +02:00
bootconfig bootconfig: Fix unaligned access when building footer 2025-07-24 22:16:48 +09:00
bpf bpftool: Add support for dumping streams 2025-07-03 19:30:07 -07:00
build tools: Remove libcrypto dependency 2025-06-26 10:51:41 -07:00
certs
cgroup memcg_slabinfo: Fix use of PG_slab 2025-07-23 11:55:22 +02:00
counter
crypto
debugging
firewire
firmware
gpio
hv tools/hv: fcopy: Fix irregularities with size of ring buffer 2025-07-15 06:25:33 +00:00
iio
include ARM: 2025-07-30 17:14:01 -07:00
kvm/kvm_stat
laptop
leds
lib bpf-fixes 2025-08-01 17:13:26 -07:00
memory-model
mm tools/mm: add script to display page state for a given PID and VADDR 2025-07-09 22:41:53 -07:00
net tools: ynl-gen: print setters for multi-val attrs 2025-07-24 17:28:49 -07:00
objtool Runtime verification changes for 6.17 2025-07-30 16:23:12 -07:00
pcmcia
perf [GIT PULL] perf tools changes for v6.17 2025-08-01 16:55:47 -07:00
power cpupower: Improve Python binding's Makefile 2025-07-01 10:58:00 -06:00
rcu
sched tools/sched: Add dl_bw_dump.py for printing bandwidth accounting info 2025-07-14 10:59:33 +02:00
sched_ext sched_ext: Add support for cgroup bandwidth control interface 2025-06-20 17:03:51 -10:00
scripts tools/build: Fix s390(x) cross-compilation with clang 2025-07-08 09:19:23 +02:00
sound
spi
testing Perf fixes for perf_mmap() reference counting to prevent potential 2025-08-06 04:41:21 +03:00
thermal
time
tracing rtla/tests: Test timerlat -P option using actions 2025-07-28 10:22:39 -04:00
usb
verification rv: Add opid per-cpu monitor 2025-07-28 16:47:35 -04:00
virtio
wmi
workqueue
writeback
Makefile