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 for Android: free password hash cracker in your pocket
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <867cqyvqsz.wl-maz@kernel.org>
Date:   Mon, 17 Jul 2023 10:19:08 +0100
From:   Marc Zyngier <maz@...nel.org>
To:     <walter.chang@...iatek.com>
Cc:     Mark Rutland <mark.rutland@....com>,
        "Daniel Lezcano" <daniel.lezcano@...aro.org>,
        Thomas Gleixner <tglx@...utronix.de>,
        Matthias Brugger <matthias.bgg@...il.com>,
        AngeloGioacchino Del Regno 
        <angelogioacchino.delregno@...labora.com>,
        <wsd_upstream@...iatek.com>, <stanley.chu@...iatek.com>,
        <Chun-hung.Wu@...iatek.com>, <Freddy.Hsin@...iatek.com>,
        <stable@...r.kernel.org>, <linux-arm-kernel@...ts.infradead.org>,
        <linux-kernel@...r.kernel.org>,
        <linux-mediatek@...ts.infradead.org>
Subject: Re: [PATCH] clocksource/drivers/arm_arch_timer: Disable timer before programming CVAL

On Mon, 17 Jul 2023 10:07:34 +0100,
<walter.chang@...iatek.com> wrote:
> 
> From: Walter Chang <walter.chang@...iatek.com>
> 
> Due to the fact that the use of `writeq_relaxed()` to program CVAL is
> not guaranteed to be atomic, it is necessary to disable the timer before
> programming CVAL.
> 
> However, if the MMIO timer is already enabled and has not yet expired,
> there is a possibility of unexpected behavior occurring: when the CPU
> enters the idle state during this period, and if the CPU's local event
> is earlier than the broadcast event, the following process occurs:
> 
> tick_broadcast_enter()
>   tick_broadcast_oneshot_control(TICK_BROADCAST_ENTER)
>     __tick_broadcast_oneshot_control()
>       ___tick_broadcast_oneshot_control()
>         tick_broadcast_set_event()
>           clockevents_program_event()
>             set_next_event_mem()
> 
> During this process, the MMIO timer remains enabled while programming
> CVAL. To prevent such behavior, disable timer explicitly prior to
> programming CVAL.
> 
> Fixes: 8b82c4f883a7 ("clocksource/drivers/arm_arch_timer: Move MMIO timer programming over to CVAL")
> Cc: stable@...r.kernel.org
> Signed-off-by: Walter Chang <walter.chang@...iatek.com>

Acked-by: Marc Zyngier <maz@...nel.org>

	M.

-- 
Without deviation from the norm, progress is not possible.

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ