Re: [PATCH 05/13] clocksource/arm_arch_timer: Fix MMIO base address vs callback ordering issue
From: Marc Zyngier <maz@kernel.org>
Date: 2021-08-10 08:27:38
Also in:
lkml
On Mon, 09 Aug 2021 17:52:00 +0100, Oliver Upton [off-list ref] wrote:
On Mon, Aug 9, 2021 at 8:27 AM Marc Zyngier [off-list ref] wrote:quoted
The MMIO timer base address gets published after we have registered the callbacks and the interrupt handler, which is... a bit dangerous. Fix this by moving the base address publication to the point where we register the timer, and expose a pointer to the timer structure itself rather than a naked value. Signed-off-by: Marc Zyngier <maz@kernel.org>Is this patch stable-worthy? I take it there haven't been any reports of issues, though this seems rather perilous.
It *could* deserve a Cc stable, although I suspect it doesn't easily fall over with the current code: - When programming a timer, the driver uses the base contained in struct arch_timer, and derived from the clock_event_device. - As long as you don't need to read the counter, you are good (the whole point of using TVAL is that you avoid reading the counter). It is only if someone called into the standalone counter accessor that there would be a firework, and that's rather unlikely. Thanks, M. -- Without deviation from the norm, progress is not possible. _______________________________________________ linux-arm-kernel mailing list linux-arm-kernel@lists.infradead.org http://lists.infradead.org/mailman/listinfo/linux-arm-kernel