public inbox for stable@vger.kernel.org
 help / color / mirror / Atom feed
From: Leo Yan <leo.yan@linaro.org>
To: Marc Zyngier <marc.zyngier@arm.com>
Cc: stable@vger.kernel.org,
	Greg Kroah-Hartman <gregkh@linuxfoundation.org>,
	John Stultz <john.stultz@linaro.org>,
	Dmitry Shmidt <dimitrysh@google.com>,
	Mark Rutland <Mark.Rutland@arm.com>
Subject: Re: [RESEND PATCH] arm64: arch_timer: Workaround for Cortex-A73 erratum 858921
Date: Thu, 31 Aug 2017 08:30:24 +0800	[thread overview]
Message-ID: <20170831003024.GE26938@leoy-ThinkPad-T440> (raw)
In-Reply-To: <fec81aba-1e79-f221-b7bb-1fd8b651b013@arm.com>

Hi Marc,

On Wed, Aug 30, 2017 at 09:46:26AM +0100, Marc Zyngier wrote:

[...]

> >> This is completely busted:
> >>
> >> - You are only addressing the kernel side, and ignore userspace (which
> >> is just as broken as the kernel).
> > 
> > Thanks for quick reviewing.
> > 
> > Yeah, I remembered there have some code directly reads arch timer
> > virtual counter from userspace. But can you remind for userspace
> > broken issue, is the code in libc or vdso?
> 
> You're missing the point. The virtual counter is freely available to
> userspace to play with (this is a de-facto ABI). Since it can return bad
> values, it needs to be trapped to be correctly emulated (together with
> cntfrq_el0), and the VDSO disabled.
> 
> > Here I have another question is: after applied the whole workaround
> > infrastructure, can it also fix userspace broken issue?
> 
> Yup. That's why I ended-up with a 18 patches series, and not just this
> single one. Trust me, I'm lazy. There is nothing I hate more than doing
> useless work.

Thanks for detailed explaination. Now it's much clear for me.

> >> - You lie in the description of the option (this is in no way dynamic,
> >> since you didn't backport the whole workaround infrastructure).
> > 
> > I should fix it.
> > 
> >> So I'm afraid I'm NAKing this. Please refrain from blindly backporting
> >> random patches. fa8d815fac96e7c9 only makes sense in the context of the
> >> whole series, and on its own gives you a very false sense of having
> >> properly addressed it.
> > 
> > IIUC, at least fa8d815fac96e7c9 can fix issue in kernel side, such like
> > for sched_clock() roll back issue [1].
> 
> What's the point of fixing the kernel if userspace is just as likely to
> fail?

Understand now.

> > So for this issue, are you suggesting we need backport whole workaround
> > infrastructure onto kernel 4.4 and 4.9? Many ARM devices are working
> > with these two kernels.
> 
> Then these systems are completely broken if they use a Cortex-A73.
> Either they run mainline (which will be just fine), or they get a fully
> backported workaround infrastructure.

Yeah, we should do right thing.

Have ARM kernel team ported this patch series (or is in planning)? I
also will check with Linaro kernel team as well, I just want to avoid
duplicate efforts if these patches have been back ported. Otherwise, I
will backport the patch series.

Thanks,
Leo Yan

  reply	other threads:[~2017-08-31  0:30 UTC|newest]

Thread overview: 9+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2017-08-30  5:06 [RESEND PATCH] arm64: arch_timer: Workaround for Cortex-A73 erratum 858921 Leo Yan
2017-08-30  6:03 ` Greg Kroah-Hartman
2017-08-30  6:12   ` Leo Yan
2017-08-30  8:02 ` Marc Zyngier
2017-08-30  8:20   ` Leo Yan
2017-08-30  8:46     ` Marc Zyngier
2017-08-31  0:30       ` Leo Yan [this message]
2017-08-31  8:30         ` Marc Zyngier
2017-09-01  2:01           ` Leo Yan

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=20170831003024.GE26938@leoy-ThinkPad-T440 \
    --to=leo.yan@linaro.org \
    --cc=Mark.Rutland@arm.com \
    --cc=dimitrysh@google.com \
    --cc=gregkh@linuxfoundation.org \
    --cc=john.stultz@linaro.org \
    --cc=marc.zyngier@arm.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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox