diff options
| author | David Carlier <devnexen@gmail.com> | 2026-09-17 22:24:07 +0100 |
|---|---|---|
| committer | Masami Hiramatsu (Google) <mhiramat@kernel.org> | 2026-09-18 09:51:49 +0900 |
| commit | 1d653a183973f5283a3db5a38cd5e195eb152244 (patch) | |
| tree | 9fd9231ad1f508a20075275e80b8f00b971c0d41 /scripts/markup_oops.pl | |
| parent | d22c3e0088e85be8131f7a9283f759cdbb20726d (diff) | |
| download | linux-stable-1d653a183973f5283a3db5a38cd5e195eb152244.tar.gz linux-stable-1d653a183973f5283a3db5a38cd5e195eb152244.zip | |
fprobe: Terminate the fgraph_data list when the reservation is not filled
fprobe_fgraph_entry() reserves shadow stack space for every fprobe with
an exit handler, but only fills it for those whose entry handler returns
0. fgraph_reserve_data() does not clear the area, so fprobe_return()
parses the unused tail as headers left over from an earlier call, and an
exit handler can run twice or despite its entry handler asking to skip
it.
Write a zero word after the last entry to terminate the walk. A zeroed
slot does not decode to a NULL fprobe on the arches that encode the
header into one unsigned long, since arch_decode_fprobe_header_fp() ORs
in FPROBE_HEADER_MSB_PATTERN, so make read_fprobe_header() return NULL
for a zeroed slot.
Link: https://lore.kernel.org/all/20260917212407.384468-1-devnexen@gmail.com/
Fixes: e0a384434ae1 ("tracing: fprobe: do not zero out unused fgraph_data")
Cc: stable@vger.kernel.org
Suggested-by: Masami Hiramatsu (Google) <mhiramat@kernel.org>
Signed-off-by: David Carlier <devnexen@gmail.com>
Signed-off-by: Masami Hiramatsu (Google) <mhiramat@kernel.org>
Diffstat (limited to 'scripts/markup_oops.pl')
0 files changed, 0 insertions, 0 deletions
