diff options
author | Mark Rutland <mark.rutland@arm.com> | 2019-07-02 14:07:29 +0100 |
---|---|---|
committer | Will Deacon <will@kernel.org> | 2019-07-22 11:44:15 +0100 |
commit | 592700f094be229b5c9cc1192d5cea46eb4c7afc (patch) | |
tree | 94b98dd3d350970646a4d5d40227daa00d645945 /arch/powerpc/tools/gcc-check-mprofile-kernel.sh | |
parent | f3dcbe67ed424f1cf92065f9ad0cc647f2b44eac (diff) | |
download | linux-592700f094be229b5c9cc1192d5cea46eb4c7afc.tar.bz2 |
arm64: stacktrace: Better handle corrupted stacks
The arm64 stacktrace code is careful to only dereference frame records
in valid stack ranges, ensuring that a corrupted frame record won't
result in a faulting access.
However, it's still possible for corrupt frame records to result in
infinite loops in the stacktrace code, which is also undesirable.
This patch ensures that we complete a stacktrace in finite time, by
keeping track of which stacks we have already completed unwinding, and
verifying that if the next frame record is on the same stack, it is at a
higher address.
As this has turned out to be particularly subtle, comments are added to
explain the procedure.
Signed-off-by: Mark Rutland <mark.rutland@arm.com>
Reviewed-by: James Morse <james.morse@arm.com>
Tested-by: James Morse <james.morse@arm.com>
Acked-by: Dave Martin <Dave.Martin@arm.com>
Acked-by: Catalin Marinas <catalin.marinas@arm.com>
Cc: Tengfei Fan <tengfeif@codeaurora.org>
Signed-off-by: Will Deacon <will@kernel.org>
Diffstat (limited to 'arch/powerpc/tools/gcc-check-mprofile-kernel.sh')
0 files changed, 0 insertions, 0 deletions