From: Andrey Ryabinin <aryabinin@virtuozzo.com>
To: Mark Rutland <mark.rutland@arm.com>, linux-kernel@vger.kernel.org
Cc: akpm@linux-foundation.org, dvyukov@google.com, mingo@redhat.com,
peterz@infradead.org
Subject: Re: [PATCH 2/3] kcov: prefault the kcov_area
Date: Fri, 4 May 2018 17:36:49 +0300 [thread overview]
Message-ID: <2389e204-1b78-00a8-d69d-0ca4969be1fd@virtuozzo.com> (raw)
In-Reply-To: <20180504135535.53744-3-mark.rutland@arm.com>
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.
> +}
> +
next prev parent reply other threads:[~2018-05-04 14:35 UTC|newest]
Thread overview: 12+ messages / expand[flat|nested] mbox.gz Atom feed top
2018-05-04 13:55 [PATCH 0/3] kcov: fix unexpected faults Mark Rutland
2018-05-04 13:55 ` [PATCH 1/3] kcov: ensure irq code sees a valid area Mark Rutland
2018-05-04 14:56 ` Mark Rutland
2018-05-04 13:55 ` [PATCH 2/3] kcov: prefault the kcov_area Mark Rutland
2018-05-04 14:36 ` Andrey Ryabinin [this message]
2018-05-04 14:38 ` Mark Rutland
2018-05-04 14:42 ` Andrey Ryabinin
2018-05-08 22:51 ` Andrew Morton
2018-05-09 9:41 ` Mark Rutland
2018-05-04 13:55 ` [PATCH 3/3] sched/core / kcov: avoid kcov_area during task switch Mark Rutland
2018-05-04 14:32 ` Andrey Ryabinin
2018-05-04 14:36 ` Mark Rutland
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=2389e204-1b78-00a8-d69d-0ca4969be1fd@virtuozzo.com \
--to=aryabinin@virtuozzo.com \
--cc=akpm@linux-foundation.org \
--cc=dvyukov@google.com \
--cc=linux-kernel@vger.kernel.org \
--cc=mark.rutland@arm.com \
--cc=mingo@redhat.com \
--cc=peterz@infradead.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox
all inboxes | Powered by JetHome®