|
16 | 16 |
|
17 | 17 | #include "hwasan.h"
|
18 | 18 | #include "hwasan_checks.h"
|
19 |
| -#include "hwasan_platform_interceptors.h" |
20 | 19 | #include "hwasan_thread.h"
|
21 | 20 | #include "hwasan_thread_list.h"
|
22 | 21 | #include "interception/interception.h"
|
@@ -45,104 +44,6 @@ using namespace __hwasan;
|
45 | 44 | # include "sanitizer_common/sanitizer_common_syscalls.inc"
|
46 | 45 | # include "sanitizer_common/sanitizer_syscalls_netbsd.inc"
|
47 | 46 |
|
48 |
| -#define COMMON_INTERCEPTOR_WRITE_RANGE(ctx, ptr, size) \ |
49 |
| - do { \ |
50 |
| - } while (false) |
51 |
| - |
52 |
| -#define COMMON_INTERCEPTOR_READ_RANGE(ctx, ptr, size) \ |
53 |
| - do { \ |
54 |
| - (void)(ctx); \ |
55 |
| - (void)(ptr); \ |
56 |
| - (void)(size); \ |
57 |
| - } while (false) |
58 |
| - |
59 |
| -#define COMMON_INTERCEPTOR_ENTER(ctx, func, ...) \ |
60 |
| - do { \ |
61 |
| - (void)(ctx); \ |
62 |
| - (void)(func); \ |
63 |
| - } while (false) |
64 |
| - |
65 |
| -#define COMMON_INTERCEPTOR_DIR_ACQUIRE(ctx, path) \ |
66 |
| - do { \ |
67 |
| - (void)(ctx); \ |
68 |
| - (void)(path); \ |
69 |
| - } while (false) |
70 |
| - |
71 |
| -#define COMMON_INTERCEPTOR_FD_ACQUIRE(ctx, fd) \ |
72 |
| - do { \ |
73 |
| - (void)(ctx); \ |
74 |
| - (void)(fd); \ |
75 |
| - } while (false) |
76 |
| - |
77 |
| -#define COMMON_INTERCEPTOR_FD_RELEASE(ctx, fd) \ |
78 |
| - do { \ |
79 |
| - (void)(ctx); \ |
80 |
| - (void)(fd); \ |
81 |
| - } while (false) |
82 |
| - |
83 |
| -#define COMMON_INTERCEPTOR_FD_SOCKET_ACCEPT(ctx, fd, newfd) \ |
84 |
| - do { \ |
85 |
| - (void)(ctx); \ |
86 |
| - (void)(fd); \ |
87 |
| - (void)(newfd); \ |
88 |
| - } while (false) |
89 |
| - |
90 |
| -#define COMMON_INTERCEPTOR_SET_THREAD_NAME(ctx, name) \ |
91 |
| - do { \ |
92 |
| - (void)(ctx); \ |
93 |
| - (void)(name); \ |
94 |
| - } while (false) |
95 |
| - |
96 |
| -#define COMMON_INTERCEPTOR_SET_PTHREAD_NAME(ctx, thread, name) \ |
97 |
| - do { \ |
98 |
| - (void)(ctx); \ |
99 |
| - (void)(thread); \ |
100 |
| - (void)(name); \ |
101 |
| - } while (false) |
102 |
| - |
103 |
| -#define COMMON_INTERCEPTOR_BLOCK_REAL(name) \ |
104 |
| - do { \ |
105 |
| - (void)(name); \ |
106 |
| - } while (false) |
107 |
| - |
108 |
| -#define COMMON_INTERCEPTOR_MEMMOVE_IMPL(ctx, to, from, size) \ |
109 |
| - do { \ |
110 |
| - (void)(ctx); \ |
111 |
| - (void)(to); \ |
112 |
| - (void)(from); \ |
113 |
| - (void)(size); \ |
114 |
| - } while (false) |
115 |
| - |
116 |
| -#define COMMON_INTERCEPTOR_MEMCPY_IMPL(ctx, to, from, size) \ |
117 |
| - do { \ |
118 |
| - (void)(ctx); \ |
119 |
| - (void)(to); \ |
120 |
| - (void)(from); \ |
121 |
| - (void)(size); \ |
122 |
| - } while (false) |
123 |
| - |
124 |
| -#define COMMON_INTERCEPTOR_MEMSET_IMPL(ctx, block, c, size) \ |
125 |
| - do { \ |
126 |
| - (void)(ctx); \ |
127 |
| - (void)(block); \ |
128 |
| - (void)(c); \ |
129 |
| - (void)(size); \ |
130 |
| - } while (false) |
131 |
| - |
132 |
| -#define COMMON_INTERCEPTOR_STRERROR() \ |
133 |
| - do { \ |
134 |
| - } while (false) |
135 |
| - |
136 |
| -#define COMMON_INTERCEPT_FUNCTION(name) \ |
137 |
| - do { \ |
138 |
| - (void)(name); \ |
139 |
| - } while (false) |
140 |
| - |
141 |
| -#pragma clang diagnostic push |
142 |
| -#pragma clang diagnostic ignored "-Wunused-function" |
143 |
| -#include "sanitizer_common/sanitizer_common_interceptors.inc" |
144 |
| -#pragma clang diagnostic pop |
145 |
| - |
146 | 47 | struct ThreadStartArg {
|
147 | 48 | __sanitizer_sigset_t starting_sigset_;
|
148 | 49 | };
|
@@ -416,10 +317,6 @@ void InitializeInterceptors() {
|
416 | 317 | static int inited = 0;
|
417 | 318 | CHECK_EQ(inited, 0);
|
418 | 319 |
|
419 |
| - (void)(InitializeCommonInterceptors); |
420 |
| - (void)(read_iovec); |
421 |
| - (void)(write_iovec); |
422 |
| - |
423 | 320 | # if HWASAN_WITH_INTERCEPTORS
|
424 | 321 | # if defined(__linux__)
|
425 | 322 | INTERCEPT_FUNCTION(__libc_longjmp);
|
|
0 commit comments