Re: [PATCH 4.4] MIPS: VDSO: Match data page cache colouring when D$ aliases

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Wed, Sep 19, 2018 at 09:20:59PM +0000, Paul Burton wrote:
> [ Upstream commit 0f02cfbc3d9e413d450d8d0fd660077c23f67eff ]
> 
> When a system suffers from dcache aliasing a user program may observe
> stale VDSO data from an aliased cache line. Notably this can break the
> expectation that clock_gettime(CLOCK_MONOTONIC, ...) is, as its name
> suggests, monotonic.
> 
> In order to ensure that users observe updates to the VDSO data page as
> intended, align the user mappings of the VDSO data page such that their
> cache colouring matches that of the virtual address range which the
> kernel will use to update the data page - typically its unmapped address
> within kseg0.
> 
> This ensures that we don't introduce aliasing cache lines for the VDSO
> data page, and therefore that userland will observe updates without
> requiring cache invalidation.
> 
> Signed-off-by: Paul Burton <paul.burton@xxxxxxxx>
> Reported-by: Hauke Mehrtens <hauke@xxxxxxxxxx>
> Reported-by: Rene Nielsen <rene.nielsen@xxxxxxxxxxxxx>
> Reported-by: Alexandre Belloni <alexandre.belloni@xxxxxxxxxxx>
> Fixes: ebb5e78cc634 ("MIPS: Initial implementation of a VDSO")
> Patchwork: https://patchwork.linux-mips.org/patch/20344/
> Tested-by: Alexandre Belloni <alexandre.belloni@xxxxxxxxxxx>
> Tested-by: Hauke Mehrtens <hauke@xxxxxxxxxx>
> Cc: James Hogan <jhogan@xxxxxxxxxx>
> Cc: linux-mips@xxxxxxxxxxxxxx
> Cc: stable@xxxxxxxxxxxxxxx # v4.4+
> ---
>  arch/mips/kernel/vdso.c | 20 ++++++++++++++++++++
>  1 file changed, 20 insertions(+)

This, and the 4.9.y backport, are now applied, thanks.

greg k-h


[Index of Archives]     [Linux MIPS Home]     [LKML Archive]     [Linux ARM Kernel]     [Linux ARM]     [Linux]     [Git]     [Yosemite News]     [Linux SCSI]     [Linux Hams]

  Powered by Linux