lkml.org 
[lkml]   [2018]   [Jan]   [16]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
SubjectRe: [PATCH RFC v1] arm64: Handle traps from accessing CNTVCT/CNTFRQ for CONFIG_COMPAT
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

\
 
 \ /
  Last update: 2018-01-16 21:32    [W:0.258 / U:0.052 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site