Page Menu
Home
FreeBSD
Search
Configure Global Search
Log In
Files
F115723327
D36700.id110953.diff
No One
Temporary
Actions
View File
Edit File
Delete File
View Transforms
Subscribe
Mute Notifications
Flag For Later
Award Token
Size
1 KB
Referenced Files
None
Subscribers
None
D36700.id110953.diff
View Options
diff --git a/sys/kern/subr_asan.c b/sys/kern/subr_asan.c
--- a/sys/kern/subr_asan.c
+++ b/sys/kern/subr_asan.c
@@ -44,6 +44,7 @@
#include <sys/sysctl.h>
#include <machine/asan.h>
+#include <machine/bus.h>
/* ASAN constants. Part of the compiler ABI. */
#define KASAN_SHADOW_MASK (KASAN_SHADOW_SCALE - 1)
@@ -1017,6 +1018,32 @@
ASAN_BUS_SET_FUNC(multi_stream, 4, uint32_t)
ASAN_BUS_SET_FUNC(region_stream, 4, uint32_t)
+#define ASAN_BUS_PEEK_FUNC(width, type) \
+ int kasan_bus_space_peek_##width(bus_space_tag_t tag, \
+ bus_space_handle_t hnd, bus_size_t offset, type *valuep) \
+ { \
+ return (bus_space_peek_##width(tag, hnd, offset, \
+ valuep)); \
+ }
+
+ASAN_BUS_PEEK_FUNC(1, uint8_t)
+ASAN_BUS_PEEK_FUNC(2, uint16_t)
+ASAN_BUS_PEEK_FUNC(4, uint32_t)
+ASAN_BUS_PEEK_FUNC(8, uint64_t)
+
+#define ASAN_BUS_POKE_FUNC(width, type) \
+ int kasan_bus_space_poke_##width(bus_space_tag_t tag, \
+ bus_space_handle_t hnd, bus_size_t offset, type value) \
+ { \
+ return (bus_space_poke_##width(tag, hnd, offset, \
+ value)); \
+ }
+
+ASAN_BUS_POKE_FUNC(1, uint8_t)
+ASAN_BUS_POKE_FUNC(2, uint16_t)
+ASAN_BUS_POKE_FUNC(4, uint32_t)
+ASAN_BUS_POKE_FUNC(8, uint64_t)
+
/* -------------------------------------------------------------------------- */
void __asan_register_globals(struct __asan_global *, size_t);
File Metadata
Details
Attached
Mime Type
text/plain
Expires
Mon, Apr 28, 5:15 PM (14 h, 36 m)
Storage Engine
blob
Storage Format
Raw Data
Storage Handle
17831968
Default Alt Text
D36700.id110953.diff (1 KB)
Attached To
Mode
D36700: kasan: provide bus peek/poke definitions
Attached
Detach File
Event Timeline
Log In to Comment