diff options
-rw-r--r-- | arch/sandbox/Kconfig | 3 | ||||
-rw-r--r-- | common/bthread.c | 8 |
2 files changed, 9 insertions, 2 deletions
diff --git a/arch/sandbox/Kconfig b/arch/sandbox/Kconfig index cef8e9fb7a..01078bca97 100644 --- a/arch/sandbox/Kconfig +++ b/arch/sandbox/Kconfig @@ -43,6 +43,9 @@ config 64BIT select ARCH_DMA_ADDR_T_64BIT select PHYS_ADDR_T_64BIT +config 32BIT + def_bool !64BIT + config SANDBOX_LINUX_I386 bool "32-bit x86 barebox" if CC_HAS_LINUX_I386_SUPPORT diff --git a/common/bthread.c b/common/bthread.c index 5563559cf6..c811797130 100644 --- a/common/bthread.c +++ b/common/bthread.c @@ -15,6 +15,10 @@ #include <asm/setjmp.h> #include <linux/overflow.h> +#if defined CONFIG_ASAN && !defined CONFIG_32BIT +#define HAVE_FIBER_SANITIZER +#endif + static struct bthread { int (*threadfn)(void *); union { @@ -26,7 +30,7 @@ static struct bthread { void *stack; u32 stack_size; struct list_head list; -#ifdef CONFIG_ASAN +#ifdef HAVE_FIBER_SANITIZER void *fake_stack_save; #endif u8 awake :1; @@ -178,7 +182,7 @@ void bthread_schedule(struct bthread *to) finish_switch_fiber(from); } -#ifdef CONFIG_ASAN +#ifdef HAVE_FIBER_SANITIZER void __sanitizer_start_switch_fiber(void **fake_stack_save, const void *bottom, size_t size); void __sanitizer_finish_switch_fiber(void *fake_stack_save, const void **bottom_old, size_t *size_old); |