Lines Matching refs:KUNIT_EXPECT_KASAN_FAIL
118 #define KUNIT_EXPECT_KASAN_FAIL(test, expression) do { \ macro
177 KUNIT_EXPECT_KASAN_FAIL(test, ptr[size] = 'x'); in kmalloc_oob_right()
183 KUNIT_EXPECT_KASAN_FAIL(test, ptr[size + 5] = 'y'); in kmalloc_oob_right()
186 KUNIT_EXPECT_KASAN_FAIL(test, ptr[0] = in kmalloc_oob_right()
201 KUNIT_EXPECT_KASAN_FAIL(test, *ptr = *(ptr - 1)); in kmalloc_oob_left()
214 KUNIT_EXPECT_KASAN_FAIL(test, ptr[0] = ptr[size]); in kmalloc_node_oob_right()
231 KUNIT_EXPECT_KASAN_FAIL(test, ptr[size] = 'y'); in kmalloc_track_caller_oob_right()
243 KUNIT_EXPECT_KASAN_FAIL(test, ptr[size] = 'y'); in kmalloc_track_caller_oob_right()
261 KUNIT_EXPECT_KASAN_FAIL(test, ptr[size] = 0); in kmalloc_big_oob_right()
280 KUNIT_EXPECT_KASAN_FAIL(test, ptr[size + OOB_TAG_OFF] = 0); in kmalloc_large_oob_right()
294 KUNIT_EXPECT_KASAN_FAIL(test, ((volatile char *)ptr)[0]); in kmalloc_large_uaf()
305 KUNIT_EXPECT_KASAN_FAIL(test, kfree(ptr + 1)); in kmalloc_large_invalid_free()
326 KUNIT_EXPECT_KASAN_FAIL(test, ptr[0] = ptr[size]); in page_alloc_oob_right()
341 KUNIT_EXPECT_KASAN_FAIL(test, ((volatile char *)ptr)[0]); in page_alloc_uaf()
370 KUNIT_EXPECT_KASAN_FAIL(test, ptr2[size2] = 'x'); in krealloc_more_oob_helper()
373 KUNIT_EXPECT_KASAN_FAIL(test, in krealloc_more_oob_helper()
402 KUNIT_EXPECT_KASAN_FAIL(test, ptr2[size2] = 'x'); in krealloc_less_oob_helper()
405 KUNIT_EXPECT_KASAN_FAIL(test, in krealloc_less_oob_helper()
416 KUNIT_EXPECT_KASAN_FAIL(test, ptr2[middle] = 'x'); in krealloc_less_oob_helper()
417 KUNIT_EXPECT_KASAN_FAIL(test, ptr2[size1 - 1] = 'x'); in krealloc_less_oob_helper()
418 KUNIT_EXPECT_KASAN_FAIL(test, ptr2[size1] = 'x'); in krealloc_less_oob_helper()
459 KUNIT_EXPECT_KASAN_FAIL(test, ptr2 = krealloc(ptr1, size2, GFP_KERNEL)); in krealloc_uaf()
461 KUNIT_EXPECT_KASAN_FAIL(test, *(volatile char *)ptr1); in krealloc_uaf()
484 KUNIT_EXPECT_KASAN_FAIL(test, *ptr1 = *ptr2); in kmalloc_oob_16()
504 KUNIT_EXPECT_KASAN_FAIL(test, *ptr1 = *ptr2); in kmalloc_uaf_16()
528 KUNIT_EXPECT_KASAN_FAIL(test, memset(ptr + size - 1, 0, memset_size)); in kmalloc_oob_memset_2()
546 KUNIT_EXPECT_KASAN_FAIL(test, memset(ptr + size - 3, 0, memset_size)); in kmalloc_oob_memset_4()
564 KUNIT_EXPECT_KASAN_FAIL(test, memset(ptr + size - 7, 0, memset_size)); in kmalloc_oob_memset_8()
582 KUNIT_EXPECT_KASAN_FAIL(test, memset(ptr + size - 15, 0, memset_size)); in kmalloc_oob_memset_16()
598 KUNIT_EXPECT_KASAN_FAIL(test, in kmalloc_oob_in_memset()
624 KUNIT_EXPECT_KASAN_FAIL(test, in kmalloc_memmove_negative_size()
643 KUNIT_EXPECT_KASAN_FAIL(test, in kmalloc_memmove_invalid_size()
657 KUNIT_EXPECT_KASAN_FAIL(test, ((volatile char *)ptr)[8]); in kmalloc_uaf()
677 KUNIT_EXPECT_KASAN_FAIL(test, memset(ptr, 0, size)); in kmalloc_uaf_memset()
704 KUNIT_EXPECT_KASAN_FAIL(test, ((volatile char *)ptr1)[40]); in kmalloc_uaf2()
730 KUNIT_EXPECT_KASAN_FAIL(test, ((volatile char *)ptr1)[8]); in kmalloc_uaf3()
737 KUNIT_EXPECT_KASAN_FAIL(test, READ_ONCE(*i_unsafe)); in kasan_atomics_helper()
738 KUNIT_EXPECT_KASAN_FAIL(test, WRITE_ONCE(*i_unsafe, 42)); in kasan_atomics_helper()
739 KUNIT_EXPECT_KASAN_FAIL(test, smp_load_acquire(i_unsafe)); in kasan_atomics_helper()
740 KUNIT_EXPECT_KASAN_FAIL(test, smp_store_release(i_unsafe, 42)); in kasan_atomics_helper()
742 KUNIT_EXPECT_KASAN_FAIL(test, atomic_read(unsafe)); in kasan_atomics_helper()
743 KUNIT_EXPECT_KASAN_FAIL(test, atomic_set(unsafe, 42)); in kasan_atomics_helper()
744 KUNIT_EXPECT_KASAN_FAIL(test, atomic_add(42, unsafe)); in kasan_atomics_helper()
745 KUNIT_EXPECT_KASAN_FAIL(test, atomic_sub(42, unsafe)); in kasan_atomics_helper()
746 KUNIT_EXPECT_KASAN_FAIL(test, atomic_inc(unsafe)); in kasan_atomics_helper()
747 KUNIT_EXPECT_KASAN_FAIL(test, atomic_dec(unsafe)); in kasan_atomics_helper()
748 KUNIT_EXPECT_KASAN_FAIL(test, atomic_and(42, unsafe)); in kasan_atomics_helper()
749 KUNIT_EXPECT_KASAN_FAIL(test, atomic_andnot(42, unsafe)); in kasan_atomics_helper()
750 KUNIT_EXPECT_KASAN_FAIL(test, atomic_or(42, unsafe)); in kasan_atomics_helper()
751 KUNIT_EXPECT_KASAN_FAIL(test, atomic_xor(42, unsafe)); in kasan_atomics_helper()
752 KUNIT_EXPECT_KASAN_FAIL(test, atomic_xchg(unsafe, 42)); in kasan_atomics_helper()
753 KUNIT_EXPECT_KASAN_FAIL(test, atomic_cmpxchg(unsafe, 21, 42)); in kasan_atomics_helper()
754 KUNIT_EXPECT_KASAN_FAIL(test, atomic_try_cmpxchg(unsafe, safe, 42)); in kasan_atomics_helper()
755 KUNIT_EXPECT_KASAN_FAIL(test, atomic_try_cmpxchg(safe, unsafe, 42)); in kasan_atomics_helper()
756 KUNIT_EXPECT_KASAN_FAIL(test, atomic_sub_and_test(42, unsafe)); in kasan_atomics_helper()
757 KUNIT_EXPECT_KASAN_FAIL(test, atomic_dec_and_test(unsafe)); in kasan_atomics_helper()
758 KUNIT_EXPECT_KASAN_FAIL(test, atomic_inc_and_test(unsafe)); in kasan_atomics_helper()
759 KUNIT_EXPECT_KASAN_FAIL(test, atomic_add_negative(42, unsafe)); in kasan_atomics_helper()
760 KUNIT_EXPECT_KASAN_FAIL(test, atomic_add_unless(unsafe, 21, 42)); in kasan_atomics_helper()
761 KUNIT_EXPECT_KASAN_FAIL(test, atomic_inc_not_zero(unsafe)); in kasan_atomics_helper()
762 KUNIT_EXPECT_KASAN_FAIL(test, atomic_inc_unless_negative(unsafe)); in kasan_atomics_helper()
763 KUNIT_EXPECT_KASAN_FAIL(test, atomic_dec_unless_positive(unsafe)); in kasan_atomics_helper()
764 KUNIT_EXPECT_KASAN_FAIL(test, atomic_dec_if_positive(unsafe)); in kasan_atomics_helper()
766 KUNIT_EXPECT_KASAN_FAIL(test, atomic_long_read(unsafe)); in kasan_atomics_helper()
767 KUNIT_EXPECT_KASAN_FAIL(test, atomic_long_set(unsafe, 42)); in kasan_atomics_helper()
768 KUNIT_EXPECT_KASAN_FAIL(test, atomic_long_add(42, unsafe)); in kasan_atomics_helper()
769 KUNIT_EXPECT_KASAN_FAIL(test, atomic_long_sub(42, unsafe)); in kasan_atomics_helper()
770 KUNIT_EXPECT_KASAN_FAIL(test, atomic_long_inc(unsafe)); in kasan_atomics_helper()
771 KUNIT_EXPECT_KASAN_FAIL(test, atomic_long_dec(unsafe)); in kasan_atomics_helper()
772 KUNIT_EXPECT_KASAN_FAIL(test, atomic_long_and(42, unsafe)); in kasan_atomics_helper()
773 KUNIT_EXPECT_KASAN_FAIL(test, atomic_long_andnot(42, unsafe)); in kasan_atomics_helper()
774 KUNIT_EXPECT_KASAN_FAIL(test, atomic_long_or(42, unsafe)); in kasan_atomics_helper()
775 KUNIT_EXPECT_KASAN_FAIL(test, atomic_long_xor(42, unsafe)); in kasan_atomics_helper()
776 KUNIT_EXPECT_KASAN_FAIL(test, atomic_long_xchg(unsafe, 42)); in kasan_atomics_helper()
777 KUNIT_EXPECT_KASAN_FAIL(test, atomic_long_cmpxchg(unsafe, 21, 42)); in kasan_atomics_helper()
778 KUNIT_EXPECT_KASAN_FAIL(test, atomic_long_try_cmpxchg(unsafe, safe, 42)); in kasan_atomics_helper()
779 KUNIT_EXPECT_KASAN_FAIL(test, atomic_long_try_cmpxchg(safe, unsafe, 42)); in kasan_atomics_helper()
780 KUNIT_EXPECT_KASAN_FAIL(test, atomic_long_sub_and_test(42, unsafe)); in kasan_atomics_helper()
781 KUNIT_EXPECT_KASAN_FAIL(test, atomic_long_dec_and_test(unsafe)); in kasan_atomics_helper()
782 KUNIT_EXPECT_KASAN_FAIL(test, atomic_long_inc_and_test(unsafe)); in kasan_atomics_helper()
783 KUNIT_EXPECT_KASAN_FAIL(test, atomic_long_add_negative(42, unsafe)); in kasan_atomics_helper()
784 KUNIT_EXPECT_KASAN_FAIL(test, atomic_long_add_unless(unsafe, 21, 42)); in kasan_atomics_helper()
785 KUNIT_EXPECT_KASAN_FAIL(test, atomic_long_inc_not_zero(unsafe)); in kasan_atomics_helper()
786 KUNIT_EXPECT_KASAN_FAIL(test, atomic_long_inc_unless_negative(unsafe)); in kasan_atomics_helper()
787 KUNIT_EXPECT_KASAN_FAIL(test, atomic_long_dec_unless_positive(unsafe)); in kasan_atomics_helper()
788 KUNIT_EXPECT_KASAN_FAIL(test, atomic_long_dec_if_positive(unsafe)); in kasan_atomics_helper()
820 KUNIT_EXPECT_KASAN_FAIL(test, kfree_sensitive(ptr)); in kmalloc_double_kzfree()
844 KUNIT_EXPECT_KASAN_FAIL(test, ((volatile char *)ptr)[size]); in ksize_unpoisons_memory()
845 KUNIT_EXPECT_KASAN_FAIL(test, ((volatile char *)ptr)[size + 5]); in ksize_unpoisons_memory()
846 KUNIT_EXPECT_KASAN_FAIL(test, ((volatile char *)ptr)[real_size - 1]); in ksize_unpoisons_memory()
865 KUNIT_EXPECT_KASAN_FAIL(test, ksize(ptr)); in ksize_uaf()
866 KUNIT_EXPECT_KASAN_FAIL(test, ((volatile char *)ptr)[0]); in ksize_uaf()
867 KUNIT_EXPECT_KASAN_FAIL(test, ((volatile char *)ptr)[size]); in ksize_uaf()
902 KUNIT_EXPECT_KASAN_FAIL(test, in rcu_uaf()
927 KUNIT_EXPECT_KASAN_FAIL(test, in workqueue_uaf()
975 KUNIT_EXPECT_KASAN_FAIL(test, *p = p[size + OOB_TAG_OFF]); in kmem_cache_oob()
998 KUNIT_EXPECT_KASAN_FAIL(test, kmem_cache_free(cache, p)); in kmem_cache_double_free()
1020 KUNIT_EXPECT_KASAN_FAIL(test, kmem_cache_free(cache, p + 1)); in kmem_cache_invalid_free()
1071 KUNIT_EXPECT_KASAN_FAIL(test, READ_ONCE(*p)); in kmem_cache_rcu_uaf()
1086 KUNIT_EXPECT_KASAN_FAIL(test, kmem_cache_destroy(cache)); in kmem_cache_double_destroy()
1210 KUNIT_EXPECT_KASAN_FAIL(test, in mempool_oob_right_helper()
1213 KUNIT_EXPECT_KASAN_FAIL(test, in mempool_oob_right_helper()
1279 KUNIT_EXPECT_KASAN_FAIL(test, ((volatile char *)ptr)[0]); in mempool_uaf_helper()
1347 KUNIT_EXPECT_KASAN_FAIL(test, mempool_free(elem, pool)); in mempool_double_free_helper()
1399 KUNIT_EXPECT_KASAN_FAIL(test, mempool_free(elem + 1, pool)); in mempool_kmalloc_invalid_free_helper()
1460 KUNIT_EXPECT_KASAN_FAIL(test, *(volatile char *)p); in kasan_global_oob_right()
1474 KUNIT_EXPECT_KASAN_FAIL(test, *(volatile char *)p); in kasan_global_oob_left()
1486 KUNIT_EXPECT_KASAN_FAIL(test, *(volatile char *)p); in kasan_stack_oob()
1501 KUNIT_EXPECT_KASAN_FAIL(test, *(volatile char *)p); in kasan_alloca_oob_left()
1516 KUNIT_EXPECT_KASAN_FAIL(test, *(volatile char *)p); in kasan_alloca_oob_right()
1538 KUNIT_EXPECT_KASAN_FAIL(test, in kasan_memchr()
1565 KUNIT_EXPECT_KASAN_FAIL(test, in kasan_memcmp()
1593 KUNIT_EXPECT_KASAN_FAIL(test, kasan_ptr_result = strchr(ptr, '1')); in kasan_strings()
1595 KUNIT_EXPECT_KASAN_FAIL(test, kasan_ptr_result = strrchr(ptr, '1')); in kasan_strings()
1597 KUNIT_EXPECT_KASAN_FAIL(test, kasan_int_result = strcmp(ptr, "2")); in kasan_strings()
1599 KUNIT_EXPECT_KASAN_FAIL(test, kasan_int_result = strncmp(ptr, "2", 1)); in kasan_strings()
1601 KUNIT_EXPECT_KASAN_FAIL(test, kasan_int_result = strlen(ptr)); in kasan_strings()
1603 KUNIT_EXPECT_KASAN_FAIL(test, kasan_int_result = strnlen(ptr, 1)); in kasan_strings()
1608 KUNIT_EXPECT_KASAN_FAIL(test, set_bit(nr, addr)); in kasan_bitops_modify()
1609 KUNIT_EXPECT_KASAN_FAIL(test, __set_bit(nr, addr)); in kasan_bitops_modify()
1610 KUNIT_EXPECT_KASAN_FAIL(test, clear_bit(nr, addr)); in kasan_bitops_modify()
1611 KUNIT_EXPECT_KASAN_FAIL(test, __clear_bit(nr, addr)); in kasan_bitops_modify()
1612 KUNIT_EXPECT_KASAN_FAIL(test, clear_bit_unlock(nr, addr)); in kasan_bitops_modify()
1613 KUNIT_EXPECT_KASAN_FAIL(test, __clear_bit_unlock(nr, addr)); in kasan_bitops_modify()
1614 KUNIT_EXPECT_KASAN_FAIL(test, change_bit(nr, addr)); in kasan_bitops_modify()
1615 KUNIT_EXPECT_KASAN_FAIL(test, __change_bit(nr, addr)); in kasan_bitops_modify()
1620 KUNIT_EXPECT_KASAN_FAIL(test, test_and_set_bit(nr, addr)); in kasan_bitops_test_and_modify()
1621 KUNIT_EXPECT_KASAN_FAIL(test, __test_and_set_bit(nr, addr)); in kasan_bitops_test_and_modify()
1622 KUNIT_EXPECT_KASAN_FAIL(test, test_and_set_bit_lock(nr, addr)); in kasan_bitops_test_and_modify()
1623 KUNIT_EXPECT_KASAN_FAIL(test, test_and_clear_bit(nr, addr)); in kasan_bitops_test_and_modify()
1624 KUNIT_EXPECT_KASAN_FAIL(test, __test_and_clear_bit(nr, addr)); in kasan_bitops_test_and_modify()
1625 KUNIT_EXPECT_KASAN_FAIL(test, test_and_change_bit(nr, addr)); in kasan_bitops_test_and_modify()
1626 KUNIT_EXPECT_KASAN_FAIL(test, __test_and_change_bit(nr, addr)); in kasan_bitops_test_and_modify()
1627 KUNIT_EXPECT_KASAN_FAIL(test, kasan_int_result = test_bit(nr, addr)); in kasan_bitops_test_and_modify()
1629 KUNIT_EXPECT_KASAN_FAIL(test, kasan_int_result = in kasan_bitops_test_and_modify()
1748 KUNIT_EXPECT_KASAN_FAIL(test, ((volatile char *)v_ptr)[size]); in vmalloc_oob()
1751 KUNIT_EXPECT_KASAN_FAIL(test, ((volatile char *)v_ptr)[size + 5]); in vmalloc_oob()
1945 KUNIT_EXPECT_KASAN_FAIL(test, *ptr = 0); in match_all_mem_tag()
1960 KUNIT_EXPECT_KASAN_FAIL(test, kasan_test_rust_uaf()); in rust_uaf()
1990 KUNIT_EXPECT_KASAN_FAIL(test, in copy_to_kernel_nofault_oob()
1992 KUNIT_EXPECT_KASAN_FAIL(test, in copy_to_kernel_nofault_oob()
2020 KUNIT_EXPECT_KASAN_FAIL(test, in copy_user_test_oob()
2022 KUNIT_EXPECT_KASAN_FAIL(test, in copy_user_test_oob()
2024 KUNIT_EXPECT_KASAN_FAIL(test, in copy_user_test_oob()
2026 KUNIT_EXPECT_KASAN_FAIL(test, in copy_user_test_oob()
2028 KUNIT_EXPECT_KASAN_FAIL(test, in copy_user_test_oob()
2030 KUNIT_EXPECT_KASAN_FAIL(test, in copy_user_test_oob()
2040 KUNIT_EXPECT_KASAN_FAIL(test, in copy_user_test_oob()