diff options
| author | Dmitry Vyukov <dvyukov@google.com> | 2024-06-21 10:26:22 +0200 |
|---|---|---|
| committer | Dmitry Vyukov <dvyukov@google.com> | 2024-06-21 09:04:14 +0000 |
| commit | edc5149ad2ab7a38db6b3bcb1b594e0264a92163 (patch) | |
| tree | a0538b071088fffff5716227da1e6cb7369044ee /executor/executor_linux.h | |
| parent | dac2aa43b4dbdbffa2c5e24a736096a6d928f633 (diff) | |
executor: fix is_kernel_data/pc for gVisor
The address ranges in is_kernel_data/pc are only true for normal Linux.
Diffstat (limited to 'executor/executor_linux.h')
| -rw-r--r-- | executor/executor_linux.h | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/executor/executor_linux.h b/executor/executor_linux.h index 984c0ba62..30c10a615 100644 --- a/executor/executor_linux.h +++ b/executor/executor_linux.h @@ -184,6 +184,8 @@ static bool use_cover_edges(uint32 pc) static bool is_kernel_data(uint64 addr) { + if (is_gvisor) + return false; #if GOARCH_386 || GOARCH_amd64 // This range corresponds to the first 1TB of the physical memory mapping, // see Documentation/arch/x86/x86_64/mm.rst. @@ -196,6 +198,8 @@ static bool is_kernel_data(uint64 addr) // Returns >0 for yes, <0 for no, 0 for don't know. static int is_kernel_pc(uint64 pc) { + if (is_gvisor) + return 0; #if GOARCH_386 || GOARCH_amd64 // Text/modules range for x86_64. return pc >= 0xffffffff80000000ull && pc < 0xffffffffff000000ull ? 1 : -1; |
