]> git.ipfire.org Git - thirdparty/kernel/linux.git/commit
perf disasm: Fix off-by-one bug in outside check
authorPeter Collingbourne <pcc@google.com>
Wed, 4 Mar 2026 19:06:12 +0000 (11:06 -0800)
committerArnaldo Carvalho de Melo <acme@redhat.com>
Thu, 5 Mar 2026 19:51:09 +0000 (16:51 -0300)
commitb3ce769203a99d6f3c6d6269ec09232a8c5da422
treed89f67b20acabc91c2659a83facfca206cb93a89
parent1e972ec76e10cf9cdacf1db2fbf69f7216903a86
perf disasm: Fix off-by-one bug in outside check

If a branch target points to one past the end of a function, the branch
should be treated as a branch to another function.

This can happen e.g. with a tail call to a function that is laid out
immediately after the caller.

Fixes: 751b1783da784299 ("perf annotate: Mark jumps to outher functions with the call arrow")
Reviewed-by: Ian Rogers <irogers@google.com>
Signed-off-by: Peter Collingbourne <pcc@google.com>
Cc: Adrian Hunter <adrian.hunter@intel.com>
Cc: Alexander Shishkin <alexander.shishkin@linux.intel.com>
Cc: Bill Wendling <morbo@google.com>
Cc: Ingo Molnar <mingo@redhat.com>
Cc: James Clark <james.clark@linaro.org>
Cc: Jiri Olsa <jolsa@kernel.org>
Cc: Justin Stitt <justinstitt@google.com>
Cc: Mark Rutland <mark.rutland@arm.com>
Cc: Namhyung Kim <namhyung@kernel.org>
Cc: Nathan Chancellor <nathan@kernel.org>
Cc: Nick Desaulniers <nick.desaulniers+lkml@gmail.com>
Cc: Peter Zijlstra <peterz@infradead.org>
Link: https://linux-review.googlesource.com/id/Ide471112e82d68177e0faf08ca411d9fcf0a7bdf
Signed-off-by: Arnaldo Carvalho de Melo <acme@redhat.com>
tools/perf/util/disasm.c