Skip to content

Task local data bug fixes and improvement

Amery Hung bpf 2 versions – Applied

Status from this message: This series was applied to bpf/bpf-next.git (master)

Get series with b4
b4 am [email protected]

Versions newest first · linked by author and title

  1. v2 Latest5 patches 5 repliesApplied 5/5
  2. v13 patches 8 repliesSuperseded

Changes in v2 from the cover letter

- Fix potential memory leak
- Drop TLD_READ_ONCE()

Patches in v2 All 5 applied

#Subject and filesSizeRepliesApplied
1/5selftests/bpf: Fix task_local_data data allocation sizetools/testing/selftests/bpf/prog_tests/task_local_data.h tools/testing/selftests/bpf/progs/task_local_data.bpf.h+8 -61 replyApplied
2/5selftests/bpf: Simplify task_local_data memory allocationtools/testing/selftests/bpf/prog_tests/task_local_data.h+22 -381 replyApplied
3/5selftests/bpf: Make sure TLD_DEFINE_KEY runs firsttools/testing/selftests/bpf/prog_tests/task_local_data.h+1 -11 replyApplied
4/5selftests/bpf: Remove TLD_READ_ONCE() in the user space headertools/testing/selftests/bpf/prog_tests/task_local_data.h tools/testing/selftests/bpf/prog_tests/test_task_local_data.c+4 -61 replyApplied
5/5selftests/bpf: Improve task local data documentation and fix potential memory leaktools/testing/selftests/bpf/prog_tests/task_local_data.h+18 -71 replyApplied

Reviews trailers per patch

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

PatchMykyta YatsenkoSun Jian
1/5A-b
2/5
3/5A-b A-b
4/5A-b
5/5

Trailers given in replies are filled; those carried in the patches from earlier versions are outlined with dashes.

Read the v2 thread

Cover letter [PATCH bpf-next v2 0/5] Task local data bug fixes and improvement

Hi,

This patchset fixed three task local data bugs, improved the memory allocation code, and dropped unnecessary TLD_READ_ONCE. Please find the detail in each patch's commit msg.

One thing worth mentioning is that Patch 3 allows us to renable task local data selftests as the library now always calls aligned_alloc() with size matching alignment under default configuration.

v1 -> v2
- Fix potential memory leak
- Drop TLD_READ_ONCE()

Amery Hung (5):
selftests/bpf: Fix task_local_data data allocation size selftests/bpf: Simplify task_local_data memory allocation selftests/bpf: Make sure TLD_DEFINE_KEY runs first selftests/bpf: Remove TLD_READ_ONCE() in the user space header selftests/bpf: Improve task local data documentation and fix potential
memory leak

 .../bpf/prog_tests/task_local_data.h          | 97 +++++++++----------
 .../bpf/prog_tests/test_task_local_data.c     |  2 +-
 .../selftests/bpf/progs/task_local_data.bpf.h |  2 +-
 3 files changed, 48 insertions(+), 53 deletions(-)
Signature · 1 line
2.52.0