summaryrefslogtreecommitdiff
path: root/tools/perf/scripts/python/flamegraph.py
diff options
context:
space:
mode:
authorEric Biggers <ebiggers@kernel.org>2026-10-11 15:48:42 +0200
committerEric Biggers <ebiggers@kernel.org>2026-10-13 15:41:39 +0200
commitcc76c9b82bf5272ce9bcc17df8c2aa21b6dfef0f (patch)
treecf17d3f81ef02d7dd7051fc9a6ff44da95461bf8 /tools/perf/scripts/python/flamegraph.py
parent0b173877fbc07f4922f0c6a6fc43fd99088befd2 (diff)
downloadlinux-cc76c9b82bf5272ce9bcc17df8c2aa21b6dfef0f.tar.gz
linux-cc76c9b82bf5272ce9bcc17df8c2aa21b6dfef0f.zip
lib/crypto: x86/sha256: Follow the normal %rbp convention
Some of the SHA-256 assembly functions push callee-save GPRs to the stack *before* they set up the frame pointer (%rbp). (They are leaf functions, but they need to set up a frame pointer anyway because they allocate a 16- or 32-byte-aligned buffer on the stack.) As a result, during these functions, 8(%rbp) doesn't contain a return address like it is supposed to. This differs from the convention used by C code, and it interferes with the frame pointer unwinder (CONFIG_UNWINDER_FRAME_POINTER=y). Specifically, if a call trace is dumped in these functions, then all entries are populated purely from the fallback scan of the entire stack: RIP: 0010:sha256_transform_rorx+0xd78/0x1120 [...] Call Trace: <TASK> ? sha256_blocks_avx2+0x37/0x70 ? __sha256_update+0x77/0x220 ? sha256+0x9d/0x110 [...] ? do_syscall_64+0x6f/0x3e0 With this fix to follow the normal %rbp convention, the call trace is generated reliably: RIP: 0010:sha256_transform_rorx+0xdae/0x1120 [...] Call Trace: <TASK> sha256_blocks_avx2+0x37/0x70 __sha256_update+0x77/0x220 sha256+0x9d/0x110 [...] do_syscall_64+0x6f/0x3e0 Reviewed-by: Ard Biesheuvel <ardb@kernel.org> Link: https://patch.msgid.link/20261011134843.166585-3-ebiggers@kernel.org Signed-off-by: Eric Biggers <ebiggers@kernel.org>
Diffstat (limited to 'tools/perf/scripts/python/flamegraph.py')
0 files changed, 0 insertions, 0 deletions