[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <87fsvhbt6z.wl-maz@kernel.org>
Date: Tue, 10 Aug 2021 09:27:32 +0100
From: Marc Zyngier <maz@...nel.org>
To: Oliver Upton <oupton@...gle.com>
Cc: linux-arm-kernel@...ts.infradead.org, linux-kernel@...r.kernel.org,
Mark Rutland <mark.rutland@....com>,
Daniel Lezcano <daniel.lezcano@...aro.org>,
Thomas Gleixner <tglx@...utronix.de>,
Peter Shier <pshier@...gle.com>,
Raghavendra Rao Ananta <rananta@...gle.com>,
Ricardo Koller <ricarkol@...gle.com>,
Will Deacon <will@...nel.org>,
Catalin Marinas <catalin.marinas@....com>,
Linus Walleij <linus.walleij@...aro.org>,
kernel-team@...roid.com
Subject: Re: [PATCH 05/13] clocksource/arm_arch_timer: Fix MMIO base address vs callback ordering issue
On Mon, 09 Aug 2021 17:52:00 +0100,
Oliver Upton <oupton@...gle.com> wrote:
>
> On Mon, Aug 9, 2021 at 8:27 AM Marc Zyngier <maz@...nel.org> wrote:
> >
> > 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@...nel.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.
Powered by blists - more mailing lists