Skip to content

Commit

Permalink
compiler-rt-netbsd: Initial libkvm support in sanitizers
Browse files Browse the repository at this point in the history
MSan with ps(1) breaks now in non-kvm(3) code.

$ ./ps
Uninitialized bytes in __interceptor_strcmp at offset 0 inside [0x71a000000008, 5)
==7197==WARNING: MemorySanitizer: use-of-uninitialized-value
    #0 0x7c5d7db0b373  (/lib/libc.so.12+0x10b373)
    #1 0x7c5d7db0bdf9 in _sysctlgetmibinfo (/lib/libc.so.12+0x10bdf9)
    #2 0x7c5d7daaa359 in _sysctlbyname (/lib/libc.so.12+0xaa359)
    #3 0x7c5d7daa65b6 in getdevmajor (/lib/libc.so.12+0xa65b6)
    #4 0x7c5d7daa0083  (/lib/libc.so.12+0xa0083)
    #5 0x7c5d7ea06ccd in pthread_once (/usr/lib/libpthread.so.1+0x6ccd)
    #6 0x7c5d7daa00cb in devname_r (/lib/libc.so.12+0xa00cb)
    #7 0x7c5d7daa0309 in __devname50 (/lib/libc.so.12+0xa0309)
    #8 0x49875e in tname /public/src.git/bin/ps/print.c:725:32
    #9 0x4a9bdf in main /public/src.git/bin/ps/ps.c:467:5
    #10 0x419ffa in ___start (/public/src.git/bin/ps/./ps+0x419ffa)

SUMMARY: MemorySanitizer: use-of-uninitialized-value (/lib/libc.so.12+0x10b373)
Exiting

Sponsored by <The NetBSD Foundation>
  • Loading branch information
krytarowski committed Jan 9, 2018
1 parent ca35e82 commit 8d0f480
Show file tree
Hide file tree
Showing 12 changed files with 332 additions and 21 deletions.
21 changes: 11 additions & 10 deletions compiler-rt-netbsd/distinfo
Original file line number Diff line number Diff line change
@@ -1,26 +1,27 @@
$NetBSD: distinfo,v 1.35 2015/09/11 01:21:57 tnn Exp $

SHA1 (patch-cmake_config-ix.cmake) = b863945f74990e30c6ae902953334f1324efc06d
SHA1 (patch-cmake_config-ix.cmake) = dfc7a195cb774cc13cb495387781d600e16c82d9
SHA1 (patch-include_CMakeLists.txt) = b6f2713b7e5337aed542442936b6f747efe0a607
SHA1 (patch-include_sanitizer_netbsd__syscall__hooks.h) = 8104f06ec9e1b7646e2906767ef557a2e7d089da
SHA1 (patch-include_sanitizer_netbsd__syscall__hooks.h) = 9b4900e42388d560e75b35a071b35dd75a70fe62
SHA1 (patch-lib_asan_asan__interceptors.cc) = ea4005ce02775060ff52af76d568c450892067b5
SHA1 (patch-lib_esan_esan__interceptors.cpp) = a7103ca053e92a810c87c593262bb386f3d02606
SHA1 (patch-lib_fuzzer_tests_CMakeLists.txt) = 38ca750154dfc9843a56748078235824b772a147
SHA1 (patch-lib_hwasan_hwasan__interceptors.cc) = 45fd48ae7bb21878432f925dea7af8d9f0ee0b02
SHA1 (patch-lib_msan_msan__interceptors.cc) = 77f8abc8dfdc5212b7991fd6e9a724990aa4f8cb
SHA1 (patch-lib_msan_msan__interceptors.cc) = 92ed308e84b0845f15110e0167f265ed5cea2580
SHA1 (patch-lib_msan_msan__linux.cc) = d75d7587071a9e7a3f6a08a3008af55319e62cab
SHA1 (patch-lib_sanitizer__common_CMakeLists.txt) = e6f0ecddd946981e9a4b76fd5325f56c2343edcd
SHA1 (patch-lib_sanitizer__common_sanitizer__common__interceptors.inc) = 0837dfc7937d93b5811eae751d754006daba26dc
SHA1 (patch-lib_sanitizer__common_CMakeLists.txt) = fcbf2987ccab5258fe760aef6ef47bd97e0e0b2c
SHA1 (patch-lib_sanitizer__common_sanitizer__common__interceptors.inc) = e4ec25bef1effa4649f9989ea74a997315ba368d
SHA1 (patch-lib_sanitizer__common_sanitizer__common__interceptors__ioctl.inc) = 231f519a0564aa69d746a7f0bbee1b1aeed927a7
SHA1 (patch-lib_sanitizer__common_sanitizer__internal__defs.h) = 126424635f89439e89371a57754232082e2290c6
SHA1 (patch-lib_sanitizer__common_sanitizer__netbsd__interceptors__ioctl.inc) = 0050635f92a9fa772303d3cddebd01f1f386c44a
SHA1 (patch-lib_sanitizer__common_sanitizer__netbsd__syscalls.inc) = 460fc4a35f689d0fba6579e22de6c78aa0d252f7
SHA1 (patch-lib_sanitizer__common_sanitizer__netbsd__interceptors__ioctl.inc) = c351daa33f782bfe644f7b8517618a12328c7996
SHA1 (patch-lib_sanitizer__common_sanitizer__netbsd__syscalls.inc) = 35fae2ad655097b5dc019f6e3e82ed415f92db07
SHA1 (patch-lib_sanitizer__common_sanitizer__platform__interceptors.h) = 063eb96ea0d41c9359df4c347c4da08a995f0702
SHA1 (patch-lib_sanitizer__common_sanitizer__platform__limits__netbsd.cc) = 206f075ce7fa3445abd7207dfc96c615dd841c13
SHA1 (patch-lib_sanitizer__common_sanitizer__platform__limits__netbsd.h) = 390589d3adec17df72fa71f2bf0a3b32d387d167
SHA1 (patch-lib_sanitizer__common_sanitizer__platform__limits__netbsd.h) = 0275ddf3c60d43d793f656a76c5cccc46f28116a
SHA1 (patch-lib_scudo_scudo__platform.h) = 6b07d34d5f1209c7f1bf21fdf0cda5cbe88b802f
SHA1 (patch-lib_tsan_rtl_tsan__interceptors.cc) = 4fbaa64e3f8d28cdbab6783c296dfd31cecb45a5
SHA1 (patch-test_asan_lit.cfg) = 121fb6db88a17b8b588a40ee022a9a219d84493f
SHA1 (patch-test_lsan_lit.common.cfg) = 10dc251f80efb96d015a22c740dc20b1843b9a11
SHA1 (patch-test_scudo_lit.cfg) = 171f340505f7c87f74a7814b9c4d12d7fcbc5690
SHA1 (patch-utils_generate__netbsd__ioctls.awk) = 369b26ac9c66803045bf3ca01b7e476819da15f7
SHA1 (patch-utils_generate__netbsd__syscalls.awk) = bb702f4239fef65813bef4732edd8912eeaef681
SHA1 (patch-utils_generate__netbsd__ioctls.awk) = da4a60c43df5cd9b022ff108ac5120486f76a1d2
SHA1 (patch-utils_generate__netbsd__syscalls.awk) = 9a767008efc35b0b509287e6c2ccc14f49446323
2 changes: 1 addition & 1 deletion compiler-rt-netbsd/patches/patch-cmake_config-ix.cmake
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
$NetBSD$

--- cmake/config-ix.cmake.orig 2017-12-21 18:53:10.000000000 +0000
--- cmake/config-ix.cmake.orig 2018-01-08 15:33:13.000000000 +0000
+++ cmake/config-ix.cmake
@@ -542,7 +542,7 @@ else()
endif()
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
$NetBSD$

--- include/sanitizer/netbsd_syscall_hooks.h.orig 2017-12-29 22:46:24.550628204 +0000
--- include/sanitizer/netbsd_syscall_hooks.h.orig 2018-01-09 21:22:24.945820046 +0000
+++ include/sanitizer/netbsd_syscall_hooks.h
@@ -0,0 +1,4730 @@
+//===-- netbsd_syscall_hooks.h --------------------------------------------===//
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
$NetBSD$

--- lib/msan/msan_interceptors.cc.orig 2018-01-08 15:33:13.616083625 +0000
--- lib/msan/msan_interceptors.cc.orig 2018-01-08 15:33:13.000000000 +0000
+++ lib/msan/msan_interceptors.cc
@@ -33,6 +33,7 @@
#include "sanitizer_common/sanitizer_libc.h"
Expand Down
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
$NetBSD$

--- lib/sanitizer_common/CMakeLists.txt.orig 2017-12-04 19:21:19.000000000 +0000
--- lib/sanitizer_common/CMakeLists.txt.orig 2018-01-08 15:33:13.000000000 +0000
+++ lib/sanitizer_common/CMakeLists.txt
@@ -116,6 +116,7 @@ set(SANITIZER_HEADERS
@@ -119,6 +119,7 @@ set(SANITIZER_HEADERS
sanitizer_list.h
sanitizer_mac.h
sanitizer_mutex.h
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
$NetBSD$

--- lib/sanitizer_common/sanitizer_common_interceptors.inc.orig 2017-12-21 18:53:10.000000000 +0000
--- lib/sanitizer_common/sanitizer_common_interceptors.inc.orig 2018-01-08 15:33:14.000000000 +0000
+++ lib/sanitizer_common/sanitizer_common_interceptors.inc
@@ -1703,6 +1703,7 @@ FORMAT_INTERCEPTOR_IMPL(__isoc99_snprint

Expand All @@ -10,3 +10,258 @@ $NetBSD$
INTERCEPTOR(int, ioctl, int d, unsigned long request, ...) {
// We need a frame pointer, because we call into ioctl_common_[pre|post] which
// can trigger a report and we need to be able to unwind through this
@@ -6452,6 +6453,246 @@ INTERCEPTOR(wchar_t *, wcsncat, wchar_t
#define INIT_WCSCAT
#endif

+#if SANITIZER_INTERCEPT_KVM
+INTERCEPTOR(int, kvm_close, struct __sanitizer_kvm *kd) {
+ void *ctx;
+ COMMON_INTERCEPTOR_ENTER(ctx, kvm_close, kd);
+ if (kd)
+ COMMON_INTERCEPTOR_READ_RANGE(ctx, kd, sizeof(struct __sanitizer_kvm));
+ return REAL(kvm_close)(kd);
+}
+
+INTERCEPTOR(int, kvm_dump_header, struct __sanitizer_kvm *kd, bool (*write_buf)(void*,void*,uptr), void *cookie, int dumpsize) {
+ void *ctx;
+ COMMON_INTERCEPTOR_ENTER(ctx, kvm_dump_header, kd, write_buf, cookie, dumpsize);
+ if (kd)
+ COMMON_INTERCEPTOR_READ_RANGE(ctx, kd, sizeof(struct __sanitizer_kvm));
+ return REAL(kvm_dump_header)(kd, write_buf, cookie, dumpsize);
+}
+
+INTERCEPTOR(int, kvm_dump_inval, struct __sanitizer_kvm *kd) {
+ void *ctx;
+ COMMON_INTERCEPTOR_ENTER(ctx, kvm_dump_inval, kd);
+ if (kd)
+ COMMON_INTERCEPTOR_READ_RANGE(ctx, kd, sizeof(struct __sanitizer_kvm));
+ return REAL(kvm_dump_inval)(kd);
+}
+
+INTERCEPTOR(int, kvm_dump_mkheader, struct __sanitizer_kvm *kd, OFF_T dump_off) {
+ void *ctx;
+ COMMON_INTERCEPTOR_ENTER(ctx, kvm_dump_mkheader, kd, dump_off);
+ if (kd)
+ COMMON_INTERCEPTOR_READ_RANGE(ctx, kd, sizeof(struct __sanitizer_kvm));
+ return REAL(kvm_dump_mkheader)(kd, dump_off);
+}
+
+INTERCEPTOR(int, kvm_dump_wrtheader, struct __sanitizer_kvm *kd, __sanitizer_FILE *fp, int dumpsize) {
+ void *ctx;
+ COMMON_INTERCEPTOR_ENTER(ctx, kvm_dump_wrtheader, kd, fp, dumpsize);
+ if (kd)
+ COMMON_INTERCEPTOR_READ_RANGE(ctx, kd, sizeof(struct __sanitizer_kvm));
+ return REAL(kvm_dump_wrtheader)(kd, fp, dumpsize);
+}
+
+INTERCEPTOR(char **, kvm_getargv, struct __sanitizer_kvm *kd, void *kp, int nchr) {
+ void *ctx;
+ COMMON_INTERCEPTOR_ENTER(ctx, kvm_getargv, kd, kp, nchr);
+ if (kd)
+ COMMON_INTERCEPTOR_READ_RANGE(ctx, kd, sizeof(struct __sanitizer_kvm));
+ return REAL(kvm_getargv)(kd, kp, nchr);
+}
+
+INTERCEPTOR(char **, kvm_getargv2, struct __sanitizer_kvm *kd, void *kp, int nchr) {
+ void *ctx;
+ COMMON_INTERCEPTOR_ENTER(ctx, kvm_getargv2, kd, kp, nchr);
+ if (kd)
+ COMMON_INTERCEPTOR_READ_RANGE(ctx, kd, sizeof(struct __sanitizer_kvm));
+ return REAL(kvm_getargv2)(kd, kp, nchr);
+}
+
+INTERCEPTOR(char **, kvm_getenvv, struct __sanitizer_kvm *kd, void *kp, int nchr) {
+ void *ctx;
+ COMMON_INTERCEPTOR_ENTER(ctx, kvm_getenvv, kd, kp, nchr);
+ if (kd)
+ COMMON_INTERCEPTOR_READ_RANGE(ctx, kd, sizeof(struct __sanitizer_kvm));
+ return REAL(kvm_getenvv)(kd, kp, nchr);
+}
+
+INTERCEPTOR(char **, kvm_getenvv2, struct __sanitizer_kvm *kd, void *kp, int nchr) {
+ void *ctx;
+ COMMON_INTERCEPTOR_ENTER(ctx, kvm_getenvv2, kd, kp, nchr);
+ if (kd)
+ COMMON_INTERCEPTOR_READ_RANGE(ctx, kd, sizeof(struct __sanitizer_kvm));
+ return REAL(kvm_getenvv2)(kd, kp, nchr);
+}
+
+INTERCEPTOR(char *, kvm_geterr, struct __sanitizer_kvm *kd) {
+ void *ctx;
+ COMMON_INTERCEPTOR_ENTER(ctx, kvm_geterr, kd);
+ if (kd)
+ COMMON_INTERCEPTOR_READ_RANGE(ctx, kd, sizeof(struct __sanitizer_kvm));
+ return REAL(kvm_geterr)(kd);
+}
+
+INTERCEPTOR(int, kvm_getloadavg, struct __sanitizer_kvm *kd, double loadavg[], int nelem) {
+ void *ctx;
+ COMMON_INTERCEPTOR_ENTER(ctx, kvm_getloadavg, kd, loadavg, nelem);
+ if (kd)
+ COMMON_INTERCEPTOR_READ_RANGE(ctx, kd, sizeof(struct __sanitizer_kvm));
+ return REAL(kvm_getloadavg)(kd, loadavg, nelem);
+}
+
+INTERCEPTOR(char *, kvm_getfiles, struct __sanitizer_kvm *kd, int op, int arg, int *cnt) {
+ void *ctx;
+ COMMON_INTERCEPTOR_ENTER(ctx, kvm_getfiles, kd, op, arg, cnt);
+ if (kd)
+ COMMON_INTERCEPTOR_READ_RANGE(ctx, kd, sizeof(struct __sanitizer_kvm));
+ return REAL(kvm_getfiles)(kd, op, arg, cnt);
+}
+
+INTERCEPTOR(char *, kvm_getkernelname, struct __sanitizer_kvm *kd) {
+ void *ctx;
+ char *name;
+ COMMON_INTERCEPTOR_ENTER(ctx, kvm_getkernelname, kd);
+ name = REAL(kvm_getkernelname)(kd);
+ if (name)
+ COMMON_INTERCEPTOR_WRITE_RANGE(ctx, name, REAL(strlen)(name) + 1);
+ return name;
+}
+
+INTERCEPTOR(void *, kvm_getlwps, struct __sanitizer_kvm *kd, int pid, unsigned long paddr, uptr esize, int *cnt) {
+ void *ctx;
+ void *res;
+ COMMON_INTERCEPTOR_ENTER(ctx, kvm_getlwps, kd, pid, paddr, esize, cnt);
+ if (kd)
+ COMMON_INTERCEPTOR_READ_RANGE(ctx, kd, sizeof(struct __sanitizer_kvm));
+ res = REAL(kvm_getlwps)(kd, pid, paddr, esize, cnt);
+ if (res) {
+ COMMON_INTERCEPTOR_WRITE_RANGE(ctx, cnt, sizeof(int));
+ COMMON_INTERCEPTOR_WRITE_RANGE(ctx, res, esize * (*cnt));
+ }
+ return res;
+}
+
+INTERCEPTOR(void *, kvm_getproc2, struct __sanitizer_kvm *kd, int op, int arg, uptr esize, int *cnt) {
+ void *ctx;
+ void *res;
+ COMMON_INTERCEPTOR_ENTER(ctx, kvm_getproc2, kd, op, arg, esize, cnt);
+ if (kd)
+ COMMON_INTERCEPTOR_READ_RANGE(ctx, kd, sizeof(struct __sanitizer_kvm));
+ res = REAL(kvm_getproc2)(kd, op, arg, esize, cnt);
+ if (res) {
+ COMMON_INTERCEPTOR_WRITE_RANGE(ctx, cnt, sizeof(int));
+ COMMON_INTERCEPTOR_WRITE_RANGE(ctx, res, esize * (*cnt));
+ }
+ return res;
+}
+
+INTERCEPTOR(void *, kvm_getprocs, struct __sanitizer_kvm *kd, int op, int arg, int *cnt) {
+ void *ctx;
+ COMMON_INTERCEPTOR_ENTER(ctx, kvm_getprocs, kd, op, arg, cnt);
+ if (kd)
+ COMMON_INTERCEPTOR_READ_RANGE(ctx, kd, sizeof(struct __sanitizer_kvm));
+ return REAL(kvm_getprocs)(kd, op, arg, cnt);
+}
+
+INTERCEPTOR(int, kvm_nlist, struct __sanitizer_kvm *kd, void *nl) {
+ void *ctx;
+ COMMON_INTERCEPTOR_ENTER(ctx, kvm_nlist, kd, nl);
+ if (kd)
+ COMMON_INTERCEPTOR_READ_RANGE(ctx, kd, sizeof(struct __sanitizer_kvm));
+ return REAL(kvm_nlist)(kd, nl);
+}
+
+INTERCEPTOR(struct __sanitizer_kvm *, kvm_open, char *uf, char *mf, char *sf, int flag, char *program) {
+ void *ctx;
+ struct __sanitizer_kvm *kd;
+ COMMON_INTERCEPTOR_ENTER(ctx, kvm_open, uf, mf, sf, flag, program);
+ if (uf)
+ COMMON_INTERCEPTOR_READ_RANGE(ctx, uf, REAL(strlen)(uf) + 1);
+ if (mf)
+ COMMON_INTERCEPTOR_READ_RANGE(ctx, mf, REAL(strlen)(mf) + 1);
+ if (sf)
+ COMMON_INTERCEPTOR_READ_RANGE(ctx, sf, REAL(strlen)(sf) + 1);
+ kd = REAL(kvm_open)(uf, mf, sf, flag, program);
+ if (kd)
+ COMMON_INTERCEPTOR_WRITE_RANGE(ctx, kd, sizeof(struct __sanitizer_kvm));
+ return kd;
+}
+
+INTERCEPTOR(struct __sanitizer_kvm *, kvm_openfiles, char *uf, char *mf, char *sf, int flag, char *program) {
+ void *ctx;
+ struct __sanitizer_kvm *kd;
+ COMMON_INTERCEPTOR_ENTER(ctx, kvm_openfiles, uf, mf, sf, flag, program);
+ if (uf)
+ COMMON_INTERCEPTOR_READ_RANGE(ctx, uf, REAL(strlen)(uf) + 1);
+ if (mf)
+ COMMON_INTERCEPTOR_READ_RANGE(ctx, mf, REAL(strlen)(mf) + 1);
+ if (sf)
+ COMMON_INTERCEPTOR_READ_RANGE(ctx, sf, REAL(strlen)(sf) + 1);
+ kd = REAL(kvm_openfiles)(uf, mf, sf, flag, program);
+ if (kd)
+ COMMON_INTERCEPTOR_WRITE_RANGE(ctx, kd, sizeof(struct __sanitizer_kvm));
+ return kd;
+}
+
+INTERCEPTOR(uptr, kvm_read, struct __sanitizer_kvm *kd, unsigned long kva, void *buf, uptr len) {
+ void *ctx;
+ uptr res;
+ COMMON_INTERCEPTOR_ENTER(ctx, kvm_read, kd, kva, buf, len);
+ res = REAL(kvm_read)(kd, kva, buf, len);
+ if (res)
+ COMMON_INTERCEPTOR_WRITE_RANGE(ctx, buf, res);
+ return res;
+}
+
+INTERCEPTOR(uptr, kvm_uread, struct __sanitizer_kvm *kd, unsigned long uva, void *buf, uptr len) {
+ void *ctx;
+ uptr res;
+ COMMON_INTERCEPTOR_ENTER(ctx, kvm_uread, kd, uva, buf, len);
+ res = REAL(kvm_uread)(kd, uva, buf, len);
+ if (res)
+ COMMON_INTERCEPTOR_WRITE_RANGE(ctx, buf, res);
+ return res;
+}
+
+INTERCEPTOR(uptr, kvm_write, struct __sanitizer_kvm *kd, unsigned long kva, void *buf, uptr len) {
+ void *ctx;
+ uptr res;
+ COMMON_INTERCEPTOR_ENTER(ctx, kvm_write, kd, kva, buf, len);
+ res = REAL(kvm_uread)(kd, kva, buf, len);
+ if (res)
+ COMMON_INTERCEPTOR_READ_RANGE(ctx, buf, res);
+ return res;
+}
+
+#define INIT_KVM \
+ COMMON_INTERCEPT_FUNCTION(kvm_close); \
+ COMMON_INTERCEPT_FUNCTION(kvm_dump_header); \
+ COMMON_INTERCEPT_FUNCTION(kvm_dump_inval); \
+ COMMON_INTERCEPT_FUNCTION(kvm_dump_mkheader); \
+ COMMON_INTERCEPT_FUNCTION(kvm_dump_wrtheader); \
+ COMMON_INTERCEPT_FUNCTION(kvm_getargv); \
+ COMMON_INTERCEPT_FUNCTION(kvm_getargv2); \
+ COMMON_INTERCEPT_FUNCTION(kvm_getenvv); \
+ COMMON_INTERCEPT_FUNCTION(kvm_getenvv2); \
+ COMMON_INTERCEPT_FUNCTION(kvm_geterr); \
+ COMMON_INTERCEPT_FUNCTION(kvm_getfiles); \
+ COMMON_INTERCEPT_FUNCTION(kvm_getkernelname); \
+ COMMON_INTERCEPT_FUNCTION(kvm_getloadavg); \
+ COMMON_INTERCEPT_FUNCTION(kvm_getlwps); \
+ COMMON_INTERCEPT_FUNCTION(kvm_getproc2); \
+ COMMON_INTERCEPT_FUNCTION(kvm_getprocs); \
+ COMMON_INTERCEPT_FUNCTION(kvm_nlist); \
+ COMMON_INTERCEPT_FUNCTION(kvm_open); \
+ COMMON_INTERCEPT_FUNCTION(kvm_openfiles); \
+ COMMON_INTERCEPT_FUNCTION(kvm_read); \
+ COMMON_INTERCEPT_FUNCTION(kvm_uread); \
+ COMMON_INTERCEPT_FUNCTION(kvm_write)
+#else
+#define INIT_KVM
+#endif
+
static void InitializeCommonInterceptors() {
static u64 metadata_mem[sizeof(MetadataHashMap) / sizeof(u64) + 1];
interceptor_metadata_map = new((void *)&metadata_mem) MetadataHashMap();
@@ -6663,6 +6904,7 @@ static void InitializeCommonInterceptors
INIT_GETLOADAVG;
INIT_WCSLEN;
INIT_WCSCAT;
+ INIT_KVM;

#if SANITIZER_NETBSD
COMMON_INTERCEPT_FUNCTION(__libc_mutex_lock);
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
$NetBSD$

--- lib/sanitizer_common/sanitizer_netbsd_interceptors_ioctl.inc.orig 2017-12-29 22:46:24.553501326 +0000
--- lib/sanitizer_common/sanitizer_netbsd_interceptors_ioctl.inc.orig 2018-01-09 21:22:24.948571630 +0000
+++ lib/sanitizer_common/sanitizer_netbsd_interceptors_ioctl.inc
@@ -0,0 +1,1490 @@
+//===-- sanitizer_common_interceptors_ioctl.inc -----------------*- C++ -*-===//
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
$NetBSD$

--- lib/sanitizer_common/sanitizer_netbsd_syscalls.inc.orig 2017-12-29 22:46:24.554391054 +0000
--- lib/sanitizer_common/sanitizer_netbsd_syscalls.inc.orig 2018-01-09 21:22:24.949458680 +0000
+++ lib/sanitizer_common/sanitizer_netbsd_syscalls.inc
@@ -0,0 +1,3793 @@
+//===-- sanitizer_common_syscalls.inc ---------------------------*- C++ -*-===//
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
$NetBSD$

--- lib/sanitizer_common/sanitizer_platform_interceptors.h.orig 2018-01-08 15:33:13.000000000 +0000
+++ lib/sanitizer_common/sanitizer_platform_interceptors.h
@@ -432,4 +432,6 @@
#define SANITIZER_INTERCEPT_SIGNAL_AND_SIGACTION (!SI_WINDOWS && SI_NOT_FUCHSIA)
#define SANITIZER_INTERCEPT_BSD_SIGNAL SI_ANDROID

+#define SANITIZER_INTERCEPT_KVM SI_NETBSD
+
#endif // #ifndef SANITIZER_PLATFORM_INTERCEPTORS_H
Loading

0 comments on commit 8d0f480

Please sign in to comment.