Changeset View
Changeset View
Standalone View
Standalone View
sys/kern/subr_msan.c
| Show First 20 Lines • Show All 173 Lines • ▼ Show 20 Lines | kmsan_report_hook(const void *addr, msan_orig_t *orig, size_t size, size_t off, | ||||
| char *var, *fn; | char *var, *fn; | ||||
| uintptr_t ptr; | uintptr_t ptr; | ||||
| long foff; | long foff; | ||||
| char buf[128]; | char buf[128]; | ||||
| int type; | int type; | ||||
| if (__predict_false(KERNEL_PANICKED() || kdb_active || kmsan_reporting)) | if (__predict_false(KERNEL_PANICKED() || kdb_active || kmsan_reporting)) | ||||
| return; | return; | ||||
| if (__predict_false(curthread != NULL && | |||||
| (curthread->td_pflags2 & TDP2_SAN_QUIET) != 0)) | |||||
| return; | |||||
| kmsan_reporting = true; | kmsan_reporting = true; | ||||
| __compiler_membar(); | __compiler_membar(); | ||||
| if (*orig == 0) { | if (*orig == 0) { | ||||
| REPORT("MSan: Uninitialized memory in %s, offset %zu", | REPORT("MSan: Uninitialized memory in %s, offset %zu", | ||||
| hook, off); | hook, off); | ||||
| goto out; | goto out; | ||||
| Show All 36 Lines | kmsan_report_inline(msan_orig_t orig, unsigned long pc) | ||||
| const char *typename; | const char *typename; | ||||
| char *var, *fn; | char *var, *fn; | ||||
| uintptr_t ptr; | uintptr_t ptr; | ||||
| char buf[128]; | char buf[128]; | ||||
| long foff; | long foff; | ||||
| int type; | int type; | ||||
| if (__predict_false(KERNEL_PANICKED() || kdb_active || kmsan_reporting)) | if (__predict_false(KERNEL_PANICKED() || kdb_active || kmsan_reporting)) | ||||
| return; | |||||
| if (__predict_false(curthread != NULL && | |||||
| (curthread->td_pflags2 & TDP2_SAN_QUIET) != 0)) | |||||
| return; | return; | ||||
| kmsan_reporting = true; | kmsan_reporting = true; | ||||
| __compiler_membar(); | __compiler_membar(); | ||||
| if (orig == 0) { | if (orig == 0) { | ||||
| REPORT("MSan: uninitialized variable in %p", (void *)pc); | REPORT("MSan: uninitialized variable in %p", (void *)pc); | ||||
| goto out; | goto out; | ||||
| ▲ Show 20 Lines • Show All 1,346 Lines • Show Last 20 Lines | |||||