Lines Matching full:area

56 	/* The lock protects mode, size, area and t. */
62 void *area; member
67 /* Size of remote area (in long's). */
137 struct kcov_remote_area *area; in kcov_remote_area_get() local
141 area = list_entry(pos, struct kcov_remote_area, list); in kcov_remote_area_get()
142 if (area->size == size) { in kcov_remote_area_get()
143 list_del(&area->list); in kcov_remote_area_get()
144 return area; in kcov_remote_area_get()
151 static void kcov_remote_area_put(struct kcov_remote_area *area, in kcov_remote_area_put() argument
154 INIT_LIST_HEAD(&area->list); in kcov_remote_area_put()
155 area->size = size; in kcov_remote_area_put()
156 list_add(&area->list, &kcov_remote_areas); in kcov_remote_area_put()
158 * KMSAN doesn't instrument this file, so it may not know area->list in kcov_remote_area_put()
162 kmsan_unpoison_memory(&area->list, sizeof(area->list)); in kcov_remote_area_put()
212 unsigned long *area; in __sanitizer_cov_trace_pc() local
220 area = t->kcov_area; in __sanitizer_cov_trace_pc()
222 pos = READ_ONCE(area[0]) + 1; in __sanitizer_cov_trace_pc()
231 WRITE_ONCE(area[0], pos); in __sanitizer_cov_trace_pc()
233 area[pos] = ip; in __sanitizer_cov_trace_pc()
242 u64 *area; in write_comp_data() local
255 area = (u64 *)t->kcov_area; in write_comp_data()
258 count = READ_ONCE(area[0]); in write_comp_data()
265 WRITE_ONCE(area[0], count + 1); in write_comp_data()
267 area[start_index] = type; in write_comp_data()
268 area[start_index + 1] = arg1; in write_comp_data()
269 area[start_index + 2] = arg2; in write_comp_data()
270 area[start_index + 3] = ip; in write_comp_data()
357 unsigned int size, void *area, enum kcov_mode mode, in kcov_start() argument
360 kcov_debug("t = %px, size = %u, area = %px\n", t, size, area); in kcov_start()
364 t->kcov_area = area; in kcov_start()
439 vfree(kcov->area); in kcov_put()
497 if (kcov->area == NULL || vma->vm_pgoff != 0 || in kcov_mmap()
505 page = vmalloc_to_page(kcov->area + off); in kcov_mmap()
554 * Fault in a lazily-faulted vmalloc area before it can be used by
561 unsigned long *area = kcov->area; in kcov_fault_in_area() local
565 READ_ONCE(area[offset]); in kcov_fault_in_area()
603 if (kcov->mode != KCOV_MODE_INIT || !kcov->area) in kcov_ioctl_locked()
613 kcov_start(t, kcov, kcov->size, kcov->area, kcov->mode, in kcov_ioctl_locked()
631 if (kcov->mode != KCOV_MODE_INIT || !kcov->area) in kcov_ioctl_locked()
701 void *area; in kcov_ioctl() local
716 area = vmalloc_user(size * sizeof(unsigned long)); in kcov_ioctl()
717 if (area == NULL) in kcov_ioctl()
722 vfree(area); in kcov_ioctl()
725 kcov->area = area; in kcov_ioctl()
804 * provided handle, allocates an area for coverage collection, and saves the
805 * pointers to kcov and area into the current task_struct to allow coverage to
808 * collecting coverage and copies all collected coverage into the kcov area.
855 void *area; in kcov_remote_start() local
906 area = kcov_remote_area_get(size); in kcov_remote_start()
909 area = this_cpu_ptr(&kcov_percpu_data)->irq_area; in kcov_remote_start()
914 if (!area) { in kcov_remote_start()
916 area = vmalloc(size * sizeof(unsigned long)); in kcov_remote_start()
917 if (!area) { in kcov_remote_start()
925 *(u64 *)area = 0; in kcov_remote_start()
931 kcov_start(t, kcov, size, area, mode, sequence); in kcov_remote_start()
999 void *area; in kcov_remote_stop() local
1030 area = t->kcov_area; in kcov_remote_stop()
1046 kcov_move_area(kcov->mode, kcov->area, kcov->size, area); in kcov_remote_stop()
1051 kcov_remote_area_put(area, size); in kcov_remote_stop()
1084 * We set kcov_mode to enable tracing, but don't setup the area, in selftest()
1102 void *area = vmalloc_node(CONFIG_KCOV_IRQ_AREA_SIZE * in kcov_init() local
1104 if (!area) in kcov_init()
1106 per_cpu_ptr(&kcov_percpu_data, cpu)->irq_area = area; in kcov_init()