Lines Matching +full:multi +full:- +full:word

4  * Copyright (c) 2019-2020 Maxime Villard, m00nbsd.net
68 /* -------------------------------------------------------------------------- */
91 /* -------------------------------------------------------------------------- */
114 * Avoid clobbering any thread-local state before we panic.
150 /* -------------------------------------------------------------------------- */
183 (curthread->td_pflags2 & TDP2_SAN_QUIET) != 0)) in kmsan_report_hook()
203 } else if (__builtin_memcmp((void *)ptr, "----", 4) == 0) { in kmsan_report_hook()
205 * The format of the string is: "----var@function". Parse it to in kmsan_report_hook()
239 (curthread->td_pflags2 & TDP2_SAN_QUIET) != 0)) in kmsan_report_inline()
257 } else if (__builtin_memcmp((void *)ptr, "----", 4) == 0) { in kmsan_report_inline()
259 * The format of the string is: "----var@function". Parse it to in kmsan_report_inline()
278 /* -------------------------------------------------------------------------- */
314 size += ((uintptr_t)orig & (sizeof(*orig) - 1)); in kmsan_origin_fill()
401 mtd = curthread->td_kmsan; in kmsan_init_arg()
402 arg = mtd->tls[mtd->ctx].param_shadow; in kmsan_init_arg()
416 mtd = curthread->td_kmsan; in kmsan_init_ret()
417 arg = mtd->tls[mtd->ctx].retval_shadow; in kmsan_init_ret()
433 mtd = curthread->td_kmsan; in kmsan_check_arg()
434 ctx = mtd->ctx; in kmsan_check_arg()
435 arg = mtd->tls[ctx].param_shadow; in kmsan_check_arg()
440 orig = &mtd->tls[ctx].param_origin[i / sizeof(msan_orig_t)]; in kmsan_check_arg()
454 mtd = td->td_kmsan; in kmsan_thread_alloc()
462 mtd->ctx = 0; in kmsan_thread_alloc()
464 if (td->td_kstack != 0) in kmsan_thread_alloc()
465 kmsan_mark((void *)td->td_kstack, ptoa(td->td_kstack_pages), in kmsan_thread_alloc()
468 td->td_kmsan = mtd; in kmsan_thread_alloc()
481 mtd = td->td_kmsan; in kmsan_thread_free()
484 td->td_kmsan = NULL; in kmsan_thread_free()
498 mtd = curthread->td_kmsan; in kmsan_intr_enter()
499 mtd->ctx++; in kmsan_intr_enter()
500 if (__predict_false(mtd->ctx >= MSAN_NCONTEXT)) in kmsan_intr_enter()
501 kmsan_panic("%s: mtd->ctx = %zu", __func__, mtd->ctx); in kmsan_intr_enter()
512 mtd = curthread->td_kmsan; in kmsan_intr_leave()
513 if (__predict_false(mtd->ctx == 0)) in kmsan_intr_leave()
514 kmsan_panic("%s: mtd->ctx = %zu", __func__, mtd->ctx); in kmsan_intr_leave()
515 mtd->ctx--; in kmsan_intr_leave()
518 /* -------------------------------------------------------------------------- */
563 kmsan_mark(bp->bio_data, bp->bio_length, c); in kmsan_mark_bio()
570 if ((m->m_flags & M_EXTPG) == 0) in kmsan_mark_mbuf()
571 kmsan_mark(m->m_data, m->m_len, c); in kmsan_mark_mbuf()
572 m = m->m_next; in kmsan_mark_mbuf()
585 kmsan_shadow_check((uintptr_t)bp->bio_data, bp->bio_length, descr); in kmsan_check_bio()
592 kmsan_shadow_check((uintptr_t)mtod(m, void *), m->m_len, descr); in kmsan_check_mbuf()
593 } while ((m = m->m_next) != NULL); in kmsan_check_mbuf()
599 for (int i = 0; i < uio->uio_iovcnt; i++) { in kmsan_check_uio()
600 kmsan_check(uio->uio_iov[i].iov_base, uio->uio_iov[i].iov_len, in kmsan_check_uio()
623 /* -------------------------------------------------------------------------- */
725 mtd = curthread->td_kmsan; in __msan_get_context_state()
726 return (&mtd->tls[mtd->ctx]); in __msan_get_context_state()
729 /* -------------------------------------------------------------------------- */
763 return (*_b1 - *_b2); in kmsan_memcmp()
842 return (*(const unsigned char *)s1 - *(const unsigned char *)s2); in kmsan_strcmp()
859 kmsan_shadow_check((uintptr_t)str, (size_t)(s - str) + 1, "strlen():arg1"); in kmsan_strlen()
861 return (s - str); in kmsan_strlen()
911 /* -------------------------------------------------------------------------- */
989 kmsan_suword(volatile void *base, long word) in kmsan_suword() argument
993 kmsan_check_arg(sizeof(base) + sizeof(word), "suword():args"); in kmsan_suword()
994 ret = suword(base, word); in kmsan_suword()
1000 kmsan_suword16(volatile void *base, int word) in kmsan_suword16() argument
1004 kmsan_check_arg(sizeof(base) + sizeof(word), "suword16():args"); in kmsan_suword16()
1005 ret = suword16(base, word); in kmsan_suword16()
1011 kmsan_suword32(volatile void *base, int32_t word) in kmsan_suword32() argument
1015 kmsan_check_arg(sizeof(base) + sizeof(word), "suword32():args"); in kmsan_suword32()
1016 ret = suword32(base, word); in kmsan_suword32()
1022 kmsan_suword64(volatile void *base, int64_t word) in kmsan_suword64() argument
1026 kmsan_check_arg(sizeof(base) + sizeof(word), "suword64():args"); in kmsan_suword64()
1027 ret = suword64(base, word); in kmsan_suword64()
1062 /* -------------------------------------------------------------------------- */
1362 /* -------------------------------------------------------------------------- */
1435 MSAN_BUS_READ_PTR_FUNC(multi, 1, uint8_t)
1442 MSAN_BUS_READ_PTR_FUNC(multi, 2, uint16_t)
1449 MSAN_BUS_READ_PTR_FUNC(multi, 4, uint32_t)
1457 MSAN_BUS_READ_PTR_FUNC(multi, 8, uint64_t)
1483 MSAN_BUS_WRITE_PTR_FUNC(multi, 1, uint8_t)
1490 MSAN_BUS_WRITE_PTR_FUNC(multi, 2, uint16_t)
1497 MSAN_BUS_WRITE_PTR_FUNC(multi, 4, uint32_t)
1513 MSAN_BUS_SET_FUNC(multi, 1, uint8_t)
1518 MSAN_BUS_SET_FUNC(multi, 2, uint16_t)
1523 MSAN_BUS_SET_FUNC(multi, 4, uint32_t)
1550 /* -------------------------------------------------------------------------- */
1563 switch (desc->md_type) { in kmsan_bus_dmamap_sync()
1565 kmsan_check(desc->u.md_vaddr, desc->md_len, in kmsan_bus_dmamap_sync()
1569 kmsan_check_mbuf(desc->u.md_mbuf, "dmasync"); in kmsan_bus_dmamap_sync()
1575 desc->md_type); in kmsan_bus_dmamap_sync()
1579 switch (desc->md_type) { in kmsan_bus_dmamap_sync()
1581 kmsan_mark(desc->u.md_vaddr, desc->md_len, in kmsan_bus_dmamap_sync()
1585 kmsan_mark_mbuf(desc->u.md_mbuf, KMSAN_STATE_INITED); in kmsan_bus_dmamap_sync()
1591 desc->md_type); in kmsan_bus_dmamap_sync()