Skip to content

Various fixes around undefined behavior

Ian Rogers linux-perf-users lkml 2 versions – Applied

Status from this message: Thanks, applied to perf-tools-next,

Get series with b4
b4 am [email protected]

Versions newest first · linked by author and title

  1. v2 Latest5 patches 3 repliesApplied
  2. v18 patches 5 repliesSuperseded

Patches in v2 Applied

#Subject and filesSizeRepliesApplied
1/5perf disasm: Avoid undefined behavior in incrementing NULLtools/perf/util/disasm.c+5 -21 reply
2/5perf test trace_btf_enum: Skip if permissions are insufficienttools/perf/tests/shell/trace_btf_enum.sh+11 -00 replies
3/5perf evsel: Avoid container_of on a NULL leadertools/perf/util/evsel.c+2 -00 replies
4/5perf test shell lock_contention: Extra debug diagnosticstools/perf/tests/shell/lock_contention.sh+6 -10 replies
5/5libperf event: Ensure tracing data is multiple of 8 sizedtools/lib/perf/include/perf/event.h+1 -00 replies

Reviews trailers per patch

All 5 patches have a Reviewed-by or Acked-by of their own; the series has one for all of them.

PatchNamhyung KimCollin FunkJames Clark
SeriesR-b
1/5A-b R-b
2/5A-b
3/5A-b
4/5A-b
5/5A-b

Trailers given in replies are filled; those carried in the patches from earlier versions are outlined with dashes. Scroll the table sideways for all 3 reviewers.

Read the v2 thread

Cover letter [PATCH v2 0/5] Various fixes around undefined behavior

Fix various undefined behavior issues, improve tests to make them easier to diagnose and add assertions so that problems don't recur.

v2: Add Namhyung's acked-by. Drop container_of assert that ptr !=
NULL, to simplify the series. The bsearch UB fix was picked up as a patch by CT:
https://lore.kernel.org/r/[email protected]
It seems this patch series fell-through the cracks as v1 was sent/acked 9 months ago.

v1: https://lore.kernel.org/lkml/[email protected]/

Ian Rogers (5):
perf disasm: Avoid undefined behavior in incrementing NULL perf test trace_btf_enum: Skip if permissions are insufficient perf evsel: Avoid container_of on a NULL leader
perf test shell lock_contention: Extra debug diagnostics libperf event: Ensure tracing data is multiple of 8 sized

 tools/lib/perf/include/perf/event.h       |  1 +
 tools/perf/tests/shell/lock_contention.sh |  7 ++++++-
 tools/perf/tests/shell/trace_btf_enum.sh  | 11 +++++++++++
 tools/perf/util/disasm.c                  |  7 +++++--
 tools/perf/util/evsel.c                   |  2 ++
 5 files changed, 25 insertions(+), 3 deletions(-)
Signature · 1 line
2.51.0.rc1.193.gad69d77794-goog