• Home
  • Raw
  • Download

Lines Matching refs:size

115 						      size_t size,  in find_watchpoint()  argument
140 if (matching_access(wp_addr_masked, wp_size, addr_masked, size)) in find_watchpoint()
148 insert_watchpoint(unsigned long addr, size_t size, bool is_write) in insert_watchpoint() argument
151 const long encoded_watchpoint = encode_watchpoint(addr, size, is_write); in insert_watchpoint()
210 check_access(const volatile void *ptr, size_t size, int type, unsigned long ip);
223 check_access(scoped_access->ptr, scoped_access->size, in kcsan_check_scoped_accesses()
231 is_atomic(struct kcsan_ctx *ctx, const volatile void *ptr, size_t size, int type) in is_atomic() argument
245 (type & KCSAN_ACCESS_WRITE) && size <= sizeof(long) && in is_atomic()
246 !(type & KCSAN_ACCESS_COMPOUND) && IS_ALIGNED((unsigned long)ptr, size)) in is_atomic()
268 should_watch(struct kcsan_ctx *ctx, const volatile void *ptr, size_t size, int type) in should_watch() argument
277 if (is_atomic(ctx, ptr, size, type)) in should_watch()
338 static __always_inline u64 read_instrumented_memory(const volatile void *ptr, size_t size) in read_instrumented_memory() argument
349 switch (size) { in read_instrumented_memory()
401 find_reorder_access(struct kcsan_ctx *ctx, const volatile void *ptr, size_t size, in find_reorder_access() argument
413 return reorder_access->ptr == ptr && reorder_access->size == size && in find_reorder_access()
418 set_reorder_access(struct kcsan_ctx *ctx, const volatile void *ptr, size_t size, in set_reorder_access() argument
434 reorder_access->size = size; in set_reorder_access()
456 size_t size, in kcsan_found_watchpoint() argument
483 if (ctx->access_mask && !find_reorder_access(ctx, ptr, size, type, ip)) in kcsan_found_watchpoint()
507 kcsan_report_set_info(ptr, size, type, ip, watchpoint - watchpoints); in kcsan_found_watchpoint()
527 kcsan_setup_watchpoint(const volatile void *ptr, size_t size, int type, unsigned long ip) in kcsan_setup_watchpoint() argument
557 if (!check_encodable((unsigned long)ptr, size)) { in kcsan_setup_watchpoint()
570 is_reorder_access = find_reorder_access(ctx, ptr, size, type, ip); in kcsan_setup_watchpoint()
591 watchpoint = insert_watchpoint((unsigned long)ptr, size, is_write); in kcsan_setup_watchpoint()
609 old = is_reorder_access ? 0 : read_instrumented_memory(ptr, size); in kcsan_setup_watchpoint()
622 new = read_instrumented_memory(ptr, size); in kcsan_setup_watchpoint()
644 if (diff && !kcsan_ignore_data_race(size, type, old, new, diff)) in kcsan_setup_watchpoint()
661 } else if (size > 8 || is_assert) { in kcsan_setup_watchpoint()
678 kcsan_report_known_origin(ptr, size, type, ip, in kcsan_setup_watchpoint()
689 kcsan_report_unknown_origin(ptr, size, type, ip, in kcsan_setup_watchpoint()
713 set_reorder_access(ctx, ptr, size, type, ip); in kcsan_setup_watchpoint()
719 check_access(const volatile void *ptr, size_t size, int type, unsigned long ip) in check_access() argument
728 if (unlikely(size == 0)) in check_access()
737 watchpoint = find_watchpoint((unsigned long)ptr, size, in check_access()
748 kcsan_found_watchpoint(ptr, size, type, ip, watchpoint, encoded_watchpoint); in check_access()
752 if (unlikely(should_watch(ctx, ptr, size, type))) { in check_access()
753 kcsan_setup_watchpoint(ptr, size, type, ip); in check_access()
777 size = READ_ONCE(reorder_access->size); in check_access()
778 if (size) in check_access()
907 kcsan_begin_scoped_access(const volatile void *ptr, size_t size, int type, in kcsan_begin_scoped_access() argument
912 check_access(ptr, size, type, _RET_IP_); in kcsan_begin_scoped_access()
918 sa->size = size; in kcsan_begin_scoped_access()
952 check_access(sa->ptr, sa->size, sa->type, sa->ip); in kcsan_end_scoped_access()
956 void __kcsan_check_access(const volatile void *ptr, size_t size, int type) in __kcsan_check_access() argument
958 check_access(ptr, size, type, _RET_IP_); in __kcsan_check_access()
969 sa->size = 0; \
991 #define DEFINE_TSAN_READ_WRITE(size) \ argument
992 void __tsan_read##size(void *ptr); \
993 void __tsan_read##size(void *ptr) \
995 check_access(ptr, size, 0, _RET_IP_); \
997 EXPORT_SYMBOL(__tsan_read##size); \
998 void __tsan_unaligned_read##size(void *ptr) \
999 __alias(__tsan_read##size); \
1000 EXPORT_SYMBOL(__tsan_unaligned_read##size); \
1001 void __tsan_write##size(void *ptr); \
1002 void __tsan_write##size(void *ptr) \
1004 check_access(ptr, size, KCSAN_ACCESS_WRITE, _RET_IP_); \
1006 EXPORT_SYMBOL(__tsan_write##size); \
1007 void __tsan_unaligned_write##size(void *ptr) \
1008 __alias(__tsan_write##size); \
1009 EXPORT_SYMBOL(__tsan_unaligned_write##size); \
1010 void __tsan_read_write##size(void *ptr); \
1011 void __tsan_read_write##size(void *ptr) \
1013 check_access(ptr, size, \
1017 EXPORT_SYMBOL(__tsan_read_write##size); \
1018 void __tsan_unaligned_read_write##size(void *ptr) \
1019 __alias(__tsan_read_write##size); \
1020 EXPORT_SYMBOL(__tsan_unaligned_read_write##size)
1028 void __tsan_read_range(void *ptr, size_t size);
1029 void __tsan_read_range(void *ptr, size_t size) in __tsan_read_range() argument
1031 check_access(ptr, size, 0, _RET_IP_); in __tsan_read_range()
1035 void __tsan_write_range(void *ptr, size_t size);
1036 void __tsan_write_range(void *ptr, size_t size) in __tsan_write_range() argument
1038 check_access(ptr, size, KCSAN_ACCESS_WRITE, _RET_IP_); in __tsan_write_range()
1051 #define DEFINE_TSAN_VOLATILE_READ_WRITE(size) \ argument
1052 void __tsan_volatile_read##size(void *ptr); \
1053 void __tsan_volatile_read##size(void *ptr) \
1055 const bool is_atomic = size <= sizeof(long long) && \
1056 IS_ALIGNED((unsigned long)ptr, size); \
1059 check_access(ptr, size, is_atomic ? KCSAN_ACCESS_ATOMIC : 0, \
1062 EXPORT_SYMBOL(__tsan_volatile_read##size); \
1063 void __tsan_unaligned_volatile_read##size(void *ptr) \
1064 __alias(__tsan_volatile_read##size); \
1065 EXPORT_SYMBOL(__tsan_unaligned_volatile_read##size); \
1066 void __tsan_volatile_write##size(void *ptr); \
1067 void __tsan_volatile_write##size(void *ptr) \
1069 const bool is_atomic = size <= sizeof(long long) && \
1070 IS_ALIGNED((unsigned long)ptr, size); \
1073 check_access(ptr, size, \
1078 EXPORT_SYMBOL(__tsan_volatile_write##size); \
1079 void __tsan_unaligned_volatile_write##size(void *ptr) \
1080 __alias(__tsan_volatile_write##size); \
1081 EXPORT_SYMBOL(__tsan_unaligned_volatile_write##size)
1130 check_access(reorder_access->ptr, reorder_access->size, in __tsan_func_exit()
1132 reorder_access->size = 0; in __tsan_func_exit()