Re: [PATCH] sparc64: vdso: Flush the D-cache after updating the time data

From: Thomas Weißschuh

Date: Fri Sep 25 2026 - 03:57:24 EST


On Thu, Sep 17, 2026 at 10:25:47AM +0200, Stian Halseth wrote:
> The vDSO time data page is written through the kernel linear mapping
> and read through a user mapping placed without colour alignment. On
> sun4u the L1 D-cache is virtually indexed, so when the two differ in
> colour the timekeeping CPU's stores leave stale lines behind the user
> alias in its own D-cache. The seqcount does not catch this: the line
> holding seq and the lines holding the clock data are refreshed
> independently, so a reader sees an even, unchanged seq together with a
> mix of old and new fields.

(...)

> Fixes: 9a08862a5d2e ("vDSO for sparc")

I'd like to *also* have a fixes tag for the migration to the generic
infrastructure here:

Fixes: 7c5fc16c7a56 ("sparc64: vdso: Switch to the generic vDSO library")

While it was broken before, the diff is against that commit.

> Closes: https://github.com/sparclinux/issues/issues/94
> Signed-off-by: Stian Halseth <stian@xxxxxx>

Reviewed-by: Thomas Weißschuh <thomas.weissschuh@xxxxxxxxxxxxx>

> ---
> arch/sparc/include/asm/vdso/vsyscall.h | 10 ++++++++++
> arch/sparc/vdso/vma.c | 6 ++++++
> 2 files changed, 16 insertions(+)

(...)