All of lore.kernel.org
 help / color / mirror / Atom feed
From: Nicolin Chen <nicoleotsuka@gmail.com>
To: Marc Zyngier <marc.zyngier@arm.com>
Cc: mark.rutland@arm.com, catalin.marinas@arm.com,
	will.deacon@arm.com, oleg@redhat.com, cdall@linaro.org,
	tbaicar@codeaurora.org, julien.thierry@arm.com,
	Dave.Martin@arm.com, robin.murphy@arm.com, james.morse@arm.com,
	ard.biesheuvel@linaro.org, xiexiuqi@huawei.com, mingo@kernel.org,
	linux-arm-kernel@lists.infradead.org,
	linux-kernel@vger.kernel.org
Subject: Re: [PATCH RFC v1] arm64: Handle traps from accessing CNTVCT/CNTFRQ for CONFIG_COMPAT
Date: Tue, 16 Jan 2018 12:32:19 -0800	[thread overview]
Message-ID: <20180116203218.GA6318@Asurada-Nvidia> (raw)
In-Reply-To: <e750e380-f06b-dbbf-a61c-4281c0168b05@arm.com>

Hello Marc,

On Thu, Jan 11, 2018 at 08:51:37AM +0000, Marc Zyngier wrote:
> > [ I also added cntfrq here for safety as theoretically it could
> >   trigger the trap as well. However, my another test case (with
> >   mrc insturction) doesn't seem to trigger a trap. So I would
> >   drop it in the next version if someone can confirm it's not
> >   required. Thanks -- Nicolin ]
> 
> See my previous series on this very subject[1] as well as Will's reply.

Thanks for the background.

> > -	for (hook = sys64_hooks; hook->handler; hook++)
> > +	for (; hook && hook->handler; hook++)
> >  		if ((hook->esr_mask & esr) == hook->esr_val) {
> >  			hook->handler(esr, regs);
> >  			return;
> > 
> 
> Also, this code is fairly broken in its handling of conditional
> instructions.

I understand that it should take care of the condition field as
a general instruction handler. Just for curiosity: If we confine
the topic to read access of CNTVCT/CNTFRQ, what'd be the penalty
by ignoring the condition field and executing it anyway?

Thank you
Nicolin

  reply	other threads:[~2018-01-16 20:32 UTC|newest]

Thread overview: 17+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2018-01-11  4:43 [PATCH RFC v1] arm64: Handle traps from accessing CNTVCT/CNTFRQ for CONFIG_COMPAT Nicolin Chen
2018-01-11  4:43 ` Nicolin Chen
2018-01-11  8:51 ` Marc Zyngier
2018-01-11  8:51   ` Marc Zyngier
2018-01-16 20:32   ` Nicolin Chen [this message]
2018-01-16 21:19     ` Marc Zyngier
2018-01-16 21:37       ` Nicolin Chen
2018-01-17  2:13         ` Nicolin Chen
2018-01-17  2:13           ` Nicolin Chen
2018-01-17  9:03           ` Marc Zyngier
2018-01-17  9:03             ` Marc Zyngier
2018-01-17 20:41             ` Nicolin Chen
2018-01-17 20:41               ` Nicolin Chen
2018-01-17 23:35               ` Robin Murphy
2018-01-17 23:35                 ` Robin Murphy
2018-01-17 23:39                 ` Nicolin Chen
2018-01-17 23:39                   ` Nicolin Chen

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=20180116203218.GA6318@Asurada-Nvidia \
    --to=nicoleotsuka@gmail.com \
    --cc=Dave.Martin@arm.com \
    --cc=ard.biesheuvel@linaro.org \
    --cc=catalin.marinas@arm.com \
    --cc=cdall@linaro.org \
    --cc=james.morse@arm.com \
    --cc=julien.thierry@arm.com \
    --cc=linux-arm-kernel@lists.infradead.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=marc.zyngier@arm.com \
    --cc=mark.rutland@arm.com \
    --cc=mingo@kernel.org \
    --cc=oleg@redhat.com \
    --cc=robin.murphy@arm.com \
    --cc=tbaicar@codeaurora.org \
    --cc=will.deacon@arm.com \
    --cc=xiexiuqi@huawei.com \
    /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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.