From: Thadeu Lima de Souza Cascardo <hidden> Date: 2017-03-17 15:59:37
For the current task, the kernel stack would only tell the last time the
process was rescheduled, if ever. Use the current stack pointer for the
current task.
This is also consistent with some other architectures.
Signed-off-by: Thadeu Lima de Souza Cascardo <redacted>
---
arch/powerpc/kernel/stacktrace.c | 7 ++++++-
1 file changed, 6 insertions(+), 1 deletion(-)
From: Michael Ellerman <mpe@ellerman.id.au> Date: 2017-03-22 11:14:13
Thadeu Lima de Souza Cascardo [off-list ref] writes:
For the current task, the kernel stack would only tell the last time the
process was rescheduled, if ever. Use the current stack pointer for the
current task.
You say "fix" in the subject, but is it a bug, or just an enhancement?
This is also consistent with some other architectures.
Such as .. arm64 and x86 (though it's buried in the unwind code).
From: Thadeu Lima de Souza Cascardo <hidden> Date: 2017-03-27 20:09:50
For the current task, the kernel stack would only tell the last time the
process was rescheduled, if ever. Use the current stack pointer for the
current task.
Otherwise, every once in a while, the stacktrace printed when reading
/proc/self/stack would look like the process is running in userspace,
while it's not, which some may consider as a bug.
This is also consistent with some other architectures, like x86 and arm,
at least.
Signed-off-by: Thadeu Lima de Souza Cascardo <redacted>
---
arch/powerpc/kernel/stacktrace.c | 9 ++++++++-
1 file changed, 8 insertions(+), 1 deletion(-)
From: Michael Ellerman <hidden> Date: 2017-03-31 12:34:03
On Mon, 2017-03-27 at 19:32:33 UTC, Thadeu Lima de Souza Cascardo wrote:
For the current task, the kernel stack would only tell the last time the
process was rescheduled, if ever. Use the current stack pointer for the
current task.
Otherwise, every once in a while, the stacktrace printed when reading
/proc/self/stack would look like the process is running in userspace,
while it's not, which some may consider as a bug.
This is also consistent with some other architectures, like x86 and arm,
at least.
Signed-off-by: Thadeu Lima de Souza Cascardo <redacted>