diff options
| -rw-r--r-- | executor/common_linux.h | 9 | ||||
| -rw-r--r-- | executor/executor.cc | 2 | ||||
| -rw-r--r-- | pkg/csource/generated.go | 9 |
3 files changed, 11 insertions, 9 deletions
diff --git a/executor/common_linux.h b/executor/common_linux.h index e4793f421..c4b3f052f 100644 --- a/executor/common_linux.h +++ b/executor/common_linux.h @@ -3496,15 +3496,16 @@ static void setup_kcsan() } #if SYZ_EXECUTOR // currently only used by executor -static void setup_kcsan_filterlist(char** frames, int nframes, bool ignore) +static void setup_kcsan_filterlist(char** frames, int nframes, bool suppress) { int fd = open(KCSAN_DEBUGFS_FILE, O_WRONLY); if (fd == -1) fail("failed to open(\"%s\")", KCSAN_DEBUGFS_FILE); - const char* const filtertype = ignore ? "blacklist" : "whitelist"; - printf("adding functions to KCSAN %s: ", filtertype); - dprintf(fd, "%s\n", filtertype); + printf("%s KCSAN reports in functions: ", + suppress ? "suppressing" : "only showing"); + if (!suppress) + dprintf(fd, "whitelist\n"); for (int i = 0; i < nframes; ++i) { printf("'%s' ", frames[i]); dprintf(fd, "!%s\n", frames[i]); diff --git a/executor/executor.cc b/executor/executor.cc index bffd0cec2..ab8ae3d6c 100644 --- a/executor/executor.cc +++ b/executor/executor.cc @@ -346,7 +346,7 @@ int main(int argc, char** argv) } if (argc >= 2 && strcmp(argv[1], "setup_kcsan_filterlist") == 0) { #if SYZ_HAVE_KCSAN - setup_kcsan_filterlist(argv + 2, argc - 2, /*ignore=*/true); + setup_kcsan_filterlist(argv + 2, argc - 2, /*suppress=*/true); #else fail("KCSAN is not implemented"); #endif diff --git a/pkg/csource/generated.go b/pkg/csource/generated.go index fe69f9237..33362b51b 100644 --- a/pkg/csource/generated.go +++ b/pkg/csource/generated.go @@ -8343,15 +8343,16 @@ static void setup_kcsan() } #if SYZ_EXECUTOR -static void setup_kcsan_filterlist(char** frames, int nframes, bool ignore) +static void setup_kcsan_filterlist(char** frames, int nframes, bool suppress) { int fd = open(KCSAN_DEBUGFS_FILE, O_WRONLY); if (fd == -1) fail("failed to open(\"%s\")", KCSAN_DEBUGFS_FILE); - const char* const filtertype = ignore ? "blacklist" : "whitelist"; - printf("adding functions to KCSAN %s: ", filtertype); - dprintf(fd, "%s\n", filtertype); + printf("%s KCSAN reports in functions: ", + suppress ? "suppressing" : "only showing"); + if (!suppress) + dprintf(fd, "whitelist\n"); for (int i = 0; i < nframes; ++i) { printf("'%s' ", frames[i]); dprintf(fd, "!%s\n", frames[i]); |
