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] [thread-next>] [day] [month] [year] [list]
Message-ID: <63ee2dae-7d9d-4838-9fcc-6a15273fc987@linaro.org>
Date: Wed, 10 Sep 2025 22:53:59 +0200
From: Daniel Lezcano <daniel.lezcano@...aro.org>
To: markus.stockhausen@....de, tglx@...utronix.de
Cc: howels@...thatwemight.be, bjorn@...k.no, linux-kernel@...r.kernel.org
Subject: Re: AW: AW: [PATCH 1/4] clocksource/drivers/timer-rtl-otto: work
 around dying timers

On 10/09/2025 20:16, markus.stockhausen@....de wrote:
>> Von: Daniel Lezcano <daniel.lezcano@...aro.org>
>> Gesendet: Mittwoch, 10. September 2025 18:39
>>
>>> What I tried:
>>>
>>> 1. Read out the current (remaining) timer value: In the error cases
>>> this can give any value between 1 (=320ns) and 15 (=4800ns).
>>>
>>> 2. Check if IRQ flag is already set and IRQ might trigger next. This was
>>> never the case.
>>
>> It would have been interesting to check if we are in the time bug range
>> to wait with a delay (5us), check the IRQ flag as the current timer
>> should have expired, then set the counter and recheck the IRQ flag.
> 
> It's been 2 months that I dived deep into this case. Finding a
> reproducer, adding lightweight logging and try&error a solution
> was really hard. In the end I was happy to have a fix that was
> intensively tested.

I understand. No worries I applied the series, it is in the compilation 
batch.

> For some notes see
> https://github.com/openwrt/openwrt/pull/19468#issuecomment-3095570297
> 
>  From what I remember:
> 
> - I started on a multithreading SoC and went over to a single
> core SoC to reduce side effects during analysis.
> 
> - The timer never died when it was reprogrammed from
> an interrupt of a just finished timer. The reason was always
> a reprogramming from outside the interrupt->reprogram
> call sequence.
> 
> - Reprogramming always worked fine. A timer with <5us left, was
> restarted with a timer >5us. The new timer started to count.
> No interrupt flag seemed to be magically toggled during this
> process. There was no active IRQ notification directly after the
> reprogramming. That was how I expected it.
> 
> - But in rare cases the new timer did not trigger the subsequent
> interrupt. I was totally confused that the future interrupt of
> a newly started timer did not work.
> 
> Graphically:
> 
> - timer run ---+-------------------->|
>                 | issue stop & start
>                 | timer run ------------------>|
>                                                | no IRQ here
> 
> Conclusion was for me: If we "kill" a running timer and restart
> it and it will not fire an interrupt after the newly set time,
> then something must be somehow broken. The ending timer and
> the stop/start sequence (that consists of two register writes)
> have some interference. Whatever it might be.

Mmh, I think I misunderstood initially the problem. Thanks for clarifying.



-- 
<http://www.linaro.org/> Linaro.org │ Open source software for ARM SoCs

Follow Linaro:  <http://www.facebook.com/pages/Linaro> Facebook |
<http://twitter.com/#!/linaroorg> Twitter |
<http://www.linaro.org/linaro-blog/> Blog

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ