diff options
author | Barry Song <song.bao.hua@hisilicon.com> | 2021-05-07 03:05:09 +0200 |
---|---|---|
committer | Linus Torvalds <torvalds@linux-foundation.org> | 2021-05-07 09:26:33 +0200 |
commit | 526940e3962620f1a24d5e30c3dac7358194d963 (patch) | |
tree | 0790f466d62ce8fa68a4a6a9de151b7b56d40363 /scripts/min-tool-version.sh | |
parent | scripts/gdb: document lx_current is only supported by x86 (diff) | |
download | linux-526940e3962620f1a24d5e30c3dac7358194d963.tar.xz linux-526940e3962620f1a24d5e30c3dac7358194d963.zip |
scripts/gdb: add lx_current support for arm64
arm64 uses SP_EL0 to save the current task_struct address. While running
in EL0, SP_EL0 is clobbered by userspace. So if the upper bit is not 1
(not TTBR1), the current address is invalid. This patch checks the upper
bit of SP_EL0, if the upper bit is 1, lx_current() of arm64 will return
the derefrence of current task. Otherwise, lx_current() will tell users
they are running in userspace(EL0).
While arm64 is running in EL0, it is actually pointless to print current
task as the memory of kernel space is not accessible in EL0.
Link: https://lkml.kernel.org/r/20210314203444.15188-3-song.bao.hua@hisilicon.com
Signed-off-by: Barry Song <song.bao.hua@hisilicon.com>
Cc: Jan Kiszka <jan.kiszka@siemens.com>
Cc: Jonathan Corbet <corbet@lwn.net>
Cc: Kieran Bingham <kbingham@kernel.org>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
Diffstat (limited to 'scripts/min-tool-version.sh')
0 files changed, 0 insertions, 0 deletions