lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Date:   Thu, 8 Sep 2016 06:28:40 +0000
From:   Meng Yi <meng.yi@....com>
To:     Alexander Stein <alexander.stein@...tec-electronic.com>
CC:     "daniel.lezcano@...aro.org" <daniel.lezcano@...aro.org>,
        "tglx@...utronix.de" <tglx@...utronix.de>,
        "linux-kernel@...r.kernel.org" <linux-kernel@...r.kernel.org>
Subject: RE: [PATCH] clocksource/fsl: Fix errata A-007728 for flextimer

> >  drivers/clocksource/fsl_ftm_timer.c | 9 ++++-----
> >  1 file changed, 4 insertions(+), 5 deletions(-)
> >
> > diff --git a/drivers/clocksource/fsl_ftm_timer.c
> > b/drivers/clocksource/fsl_ftm_timer.c index 738515b..ade26e5 100644
> > --- a/drivers/clocksource/fsl_ftm_timer.c
> > +++ b/drivers/clocksource/fsl_ftm_timer.c
> > @@ -83,11 +83,10 @@ static inline void ftm_counter_disable(void
> > __iomem
> > *base)
> >
> >  static inline void ftm_irq_acknowledge(void __iomem *base)  {
> > -	u32 val;
> > -
> > -	val = ftm_readl(base + FTM_SC);
> > -	val &= ~FTM_SC_TOF;
> > -	ftm_writel(val, base + FTM_SC);
> > +	/*read and clean the FTM_SC_TOF bit until its cleared*/
> > +	while (FTM_SC_TOF & ftm_readl(base + FTM_SC))
> > +		ftm_writel(ftm_readl(base + FTM_SC) & (~FTM_SC_TOF),
> > +			   base + FTM_SC);
> >  }
> 
> So you are essentially polling hardware in interrupt context. Please add a
> sensible timeout to abort this loop in case of defective hardware, and maybe
> disable the interrupt in that case.
> 

Oh, right. Thank for your comments. I will correct that in next version.

 Best regards,
Meng

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ