Module Name:    src
Committed By:   christos
Date:           Wed Aug 22 14:11:26 UTC 2018

Modified Files:
        src/sys/sys: asan.h

Log Message:
- since we include asan.h unconditionally now, make sure opt_kasan.h is
  included here, following the practice from other header files.
- don't use inline functions, adds complexity (and broke the build)


To generate a diff of this commit:
cvs rdiff -u -r1.6 -r1.7 src/sys/sys/asan.h

Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.

Modified files:

Index: src/sys/sys/asan.h
diff -u src/sys/sys/asan.h:1.6 src/sys/sys/asan.h:1.7
--- src/sys/sys/asan.h:1.6	Wed Aug 22 08:42:06 2018
+++ src/sys/sys/asan.h	Wed Aug 22 10:11:26 2018
@@ -1,4 +1,4 @@
-/*	$NetBSD: asan.h,v 1.6 2018/08/22 12:42:06 maxv Exp $	*/
+/*	$NetBSD: asan.h,v 1.7 2018/08/22 14:11:26 christos Exp $	*/
 
 /*
  * Copyright (c) 2018 The NetBSD Foundation, Inc.
@@ -32,6 +32,10 @@
 #ifndef _SYS_ASAN_H_
 #define _SYS_ASAN_H_
 
+#ifdef _KERNEL_OPT
+#include "opt_kasan.h"
+#endif
+
 #include <sys/types.h>
 
 #ifdef KASAN
@@ -39,24 +43,9 @@ void kasan_add_redzone(size_t *);
 void kasan_alloc(const void *, size_t, size_t);
 void kasan_free(const void *, size_t);
 #else
-__inline static void __unused
-kasan_add_redzone(size_t *size __unused)
-{
-	/* nothing */
-}
-
-__inline static void __unused
-kasan_alloc(const void *addr __unused, size_t size __unused,
-    size_t sz_with_redz __unused)
-{
-	/* nothing */
-}
-
-__inline static void __unused
-kasan_free(const void *addr __unused, size_t sz_with_redz __unused)
-{
-	/* nothing */
-}
+#define kasan_add_redzone(s)	__nothing
+#define kasan_alloc(p, s, l)	__nothing
+#define kasan_free(p, s)	__nothing
 #endif
 
 #endif /* !_SYS_ASAN_H_ */

Reply via email to