From 5f02070655b3c1f2ab50a82fd5f466aaeb7af44a Mon Sep 17 00:00:00 2001 From: Dmitry Vyukov Date: Mon, 10 Jun 2024 11:06:30 +0200 Subject: executor: add end-to-end coverage/signal/comparisons test --- executor/executor_linux.h | 11 +++++++++++ 1 file changed, 11 insertions(+) (limited to 'executor/executor_linux.h') diff --git a/executor/executor_linux.h b/executor/executor_linux.h index bfd81776f..445a278e2 100644 --- a/executor/executor_linux.h +++ b/executor/executor_linux.h @@ -182,6 +182,17 @@ static bool use_cover_edges(uint32 pc) return true; } +static bool is_kernel_data(uint64 addr) +{ +#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. + return addr >= 0xffff880000000000ull && addr < 0xffff890000000000ull; +#else + return false; +#endif +} + static bool use_cover_edges(uint64 pc) { #if GOARCH_amd64 || GOARCH_arm64 -- cgit mrf-deployment