Module Name: src Committed By: maxv Date: Wed Nov 6 06:57:22 UTC 2019
Modified Files: src/sys/arch/amd64/include: csan.h src/sys/kern: subr_csan.c Log Message: Change kcsan_md_is_avail() to always return true; I was testing with interrupts disabled as debugging. Change the delay/sample parameters to have better fluidity. To generate a diff of this commit: cvs rdiff -u -r1.1 -r1.2 src/sys/arch/amd64/include/csan.h cvs rdiff -u -r1.1 -r1.2 src/sys/kern/subr_csan.c Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files.
Modified files: Index: src/sys/arch/amd64/include/csan.h diff -u src/sys/arch/amd64/include/csan.h:1.1 src/sys/arch/amd64/include/csan.h:1.2 --- src/sys/arch/amd64/include/csan.h:1.1 Tue Nov 5 20:19:17 2019 +++ src/sys/arch/amd64/include/csan.h Wed Nov 6 06:57:22 2019 @@ -1,4 +1,4 @@ -/* $NetBSD: csan.h,v 1.1 2019/11/05 20:19:17 maxv Exp $ */ +/* $NetBSD: csan.h,v 1.2 2019/11/06 06:57:22 maxv Exp $ */ /* * Copyright (c) 2019 The NetBSD Foundation, Inc. @@ -35,7 +35,7 @@ static inline bool kcsan_md_is_avail(void) { - return (x86_read_psl() & PSL_I) == 0; + return true; } static inline void Index: src/sys/kern/subr_csan.c diff -u src/sys/kern/subr_csan.c:1.1 src/sys/kern/subr_csan.c:1.2 --- src/sys/kern/subr_csan.c:1.1 Tue Nov 5 20:19:17 2019 +++ src/sys/kern/subr_csan.c Wed Nov 6 06:57:22 2019 @@ -1,4 +1,4 @@ -/* $NetBSD: subr_csan.c,v 1.1 2019/11/05 20:19:17 maxv Exp $ */ +/* $NetBSD: subr_csan.c,v 1.2 2019/11/06 06:57:22 maxv Exp $ */ /* * Copyright (c) 2019 The NetBSD Foundation, Inc. @@ -30,7 +30,7 @@ */ #include <sys/cdefs.h> -__KERNEL_RCSID(0, "$NetBSD: subr_csan.c,v 1.1 2019/11/05 20:19:17 maxv Exp $"); +__KERNEL_RCSID(0, "$NetBSD: subr_csan.c,v 1.2 2019/11/06 06:57:22 maxv Exp $"); #include "opt_kcsan.h" @@ -69,8 +69,8 @@ static bool kcsan_enabled __read_mostly; #define __RET_ADDR (uintptr_t)__builtin_return_address(0) -#define KCSAN_NACCESSES 2000 -#define KCSAN_DELAY 10000 /* 10 milliseconds */ +#define KCSAN_NACCESSES 1024 +#define KCSAN_DELAY 10 /* 10 microseconds */ /* -------------------------------------------------------------------------- */