android adeb KASAN_SHADOW_SCALE_SHIFT
Unfortunately, the value is defined in Makefile,
ifeq ($(CONFIG_KASAN_SW_TAGS), y)
KASAN_SHADOW_SCALE_SHIFT := 4
else ifeq ($(CONFIG_KASAN_GENERIC), y)
KASAN_SHADOW_SCALE_SHIFT := 3
KBUILD_CFLAGS += -DKASAN_SHADOW_SCALE_SHIFT=$(KASAN_SHADOW_SCALE_SHIFT)
KBUILD_CPPFLAGS += -DKASAN_SHADOW_SCALE_SHIFT=$(KASAN_SHADOW_SCALE_SHIFT)
KBUILD_AFLAGS += -DKASAN_SHADOW_SCALE_SHIFT=$(KASAN_SHADOW_SCALE_SHIFT)
We could add something above in helpers.h e.g.,
#define KASAN_SHADOW_SCALE_SHIFT 4
#define KASAN_SHADOW_SCALE_SHIFT 3
You can also add the above code to the tool itself.
On Wed, Feb 10, 2021 at 10:18 AM katrina lulz
I managed to setup adeb on a pixel4 with custom kernel compiled as suggested by adeb's README.
The setup is working fine for some BCC tools, as vfsstat but a few as opensnoop and the trace command return the following error:
In file included from ./arch/arm64/include/asm/thread_info.h:13:
./arch/arm64/include/asm/memory.h:136:24: error: use of undeclared identifier 'KASAN_SHADOW_SCALE_SHIFT'
return kimage_vaddr - KIMAGE_VADDR;
I verified by the config.gz on the device that IKHEADERS and the other BPF related configs are correctly enabled.
Any ideas on how to fix the above error?