]> Cypherpunks repositories - gostls13.git/commit
runtime: start ARM atomic kernel helper traceback in caller
authorMichael Pratt <mpratt@google.com>
Wed, 10 Nov 2021 17:56:40 +0000 (12:56 -0500)
committerMichael Pratt <mpratt@google.com>
Fri, 12 Nov 2021 21:06:35 +0000 (21:06 +0000)
commit363459479014bde19e83d9fb6781310f63fb0b45
tree8af6aa324aa9275bb9733e66f8481eb1b2c5d4cb
parent76fbd6167364fb98e3ebe946cfc16b5b84d4240e
runtime: start ARM atomic kernel helper traceback in caller

Like the VDSO, we cannot directly traceback from the Linux kernel ARM
atomic/barrier helpers. However, unlike the VDSO, this functions are
extremely simple. Neither of the functions we use, kuser_cmpxchg and
kuser_memory_barrier, touch SP or LR.

We can use this to our advantage to read LR and simply start tracebacks
in the caller.

Fixes #49182

Change-Id: I890edbeb7c128938000fe7baf6f913c02a956edd
Reviewed-on: https://go-review.googlesource.com/c/go/+/362977
Trust: Michael Pratt <mpratt@google.com>
Run-TryBot: Michael Pratt <mpratt@google.com>
TryBot-Result: Go Bot <gobot@golang.org>
Reviewed-by: Cherry Mui <cherryyz@google.com>
src/runtime/traceback.go