From: Greg KH <greg@kroah.com>
To: Paul Burton <paul.burton@mips.com>
Cc: "stable@vger.kernel.org" <stable@vger.kernel.org>,
"linux-mips@linux-mips.org" <linux-mips@linux-mips.org>,
Hauke Mehrtens <hauke@hauke-m.de>,
Rene Nielsen <rene.nielsen@microsemi.com>,
Alexandre Belloni <alexandre.belloni@bootlin.com>,
Paul Burton <pburton@wavecomp.com>,
James Hogan <jhogan@kernel.org>
Subject: Re: [PATCH 4.4] MIPS: VDSO: Match data page cache colouring when D$ aliases
Date: Mon, 24 Sep 2018 13:00:21 +0200 [thread overview]
Message-ID: <20180924110021.GH16476@kroah.com> (raw)
In-Reply-To: <20180919212044.21385-1-paul.burton@mips.com>
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@mips.com>
> Reported-by: Hauke Mehrtens <hauke@hauke-m.de>
> Reported-by: Rene Nielsen <rene.nielsen@microsemi.com>
> Reported-by: Alexandre Belloni <alexandre.belloni@bootlin.com>
> Fixes: ebb5e78cc634 ("MIPS: Initial implementation of a VDSO")
> Patchwork: https://patchwork.linux-mips.org/patch/20344/
> Tested-by: Alexandre Belloni <alexandre.belloni@bootlin.com>
> Tested-by: Hauke Mehrtens <hauke@hauke-m.de>
> Cc: James Hogan <jhogan@kernel.org>
> Cc: linux-mips@linux-mips.org
> Cc: stable@vger.kernel.org # 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
prev parent reply other threads:[~2018-09-24 11:00 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2018-09-19 21:20 [PATCH 4.4] MIPS: VDSO: Match data page cache colouring when D$ aliases Paul Burton
2018-09-24 11:00 ` Greg KH [this message]
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20180924110021.GH16476@kroah.com \
--to=greg@kroah.com \
--cc=alexandre.belloni@bootlin.com \
--cc=hauke@hauke-m.de \
--cc=jhogan@kernel.org \
--cc=linux-mips@linux-mips.org \
--cc=paul.burton@mips.com \
--cc=pburton@wavecomp.com \
--cc=rene.nielsen@microsemi.com \
--cc=stable@vger.kernel.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.