diff options
author | Vincenzo Frascino <[email protected]> | 2021-01-26 13:40:56 +0000 |
---|---|---|
committer | Catalin Marinas <[email protected]> | 2021-01-26 17:53:32 +0000 |
commit | 519ea6f1c82fcdc9842908155ae379de47818778 (patch) | |
tree | c18ca05a1beed19e27977af1a503081a73349051 /tools/perf/util/scripting-engines/trace-event-python.c | |
parent | 75bd4bff300b3c5252d4a0e7a959569c62d1dbae (diff) |
arm64: Fix kernel address detection of __is_lm_address()
Currently, the __is_lm_address() check just masks out the top 12 bits
of the address, but if they are 0, it still yields a true result.
This has as a side effect that virt_addr_valid() returns true even for
invalid virtual addresses (e.g. 0x0).
Fix the detection checking that it's actually a kernel address starting
at PAGE_OFFSET.
Fixes: 68dd8ef32162 ("arm64: memory: Fix virt_addr_valid() using __is_lm_address()")
Cc: <[email protected]> # 5.4.x
Cc: Will Deacon <[email protected]>
Suggested-by: Catalin Marinas <[email protected]>
Reviewed-by: Catalin Marinas <[email protected]>
Acked-by: Mark Rutland <[email protected]>
Signed-off-by: Vincenzo Frascino <[email protected]>
Link: https://lore.kernel.org/r/[email protected]
Signed-off-by: Catalin Marinas <[email protected]>
Diffstat (limited to 'tools/perf/util/scripting-engines/trace-event-python.c')
0 files changed, 0 insertions, 0 deletions