Re: [PATCH 2/3] kcov: prefault the kcov_area
From: Andrey Ryabinin
Date: Fri May 04 2018 - 10:35:53 EST
On 05/04/2018 04:55 PM, Mark Rutland wrote:
>
> +static void kcov_fault_in_area(struct kcov *kcov)
> +{
> + unsigned long stride = PAGE_SIZE / sizeof(unsigned long);
> + unsigned long *area = kcov->area;
> + unsigned long offset;
> +
> + for (offset = 0; offset < kcov->size; offset += stride) {
> + READ_ONCE(area[offset]);
> + }
Usually we don't use {} for a single statement blocks.
> +}
> +