Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > linux.kernel > #1571812

Re: [PATCH v4 2/4] arm64: Work around Falkor erratum 1003

From Catalin Marinas <catalin.marinas@arm.com>
Newsgroups linux.kernel
Subject Re: [PATCH v4 2/4] arm64: Work around Falkor erratum 1003
Date 2017-02-01 18:40 +0100
Message-ID <t672W-pD-5@gated-at.bofh.it> (permalink)
References (2 earlier) <t5FT3-Ha-1@gated-at.bofh.it> <t5KJ4-3yR-17@gated-at.bofh.it> <t5KSK-3Cb-11@gated-at.bofh.it> <t65Xc-8e7-17@gated-at.bofh.it> <t666R-8hp-7@gated-at.bofh.it>
Organization linux.* mail to news gateway

Show all headers | View raw


On Wed, Feb 01, 2017 at 04:33:58PM +0000, Will Deacon wrote:
> On Wed, Feb 01, 2017 at 11:29:22AM -0500, Christopher Covington wrote:
> > On 01/31/2017 12:56 PM, Marc Zyngier wrote:
> > > Given that all ARMv8 CPUs can support SW_PAN, it is more likely to be
> > > enabled than the ARMv8.1 PAN. I'd vote for supporting the workaround in
> > > that case too, and hope that people do enable the HW version.
> > 
> > Okay, I'll do my best to add support for the SW PAN case. I rebased and
> > submitted v6 of the E1009 patch [1] so that it no longer depends on this
> > patch landing first, if you all are inclined to pick it up while work on
> > this E1003 patch continues.
> 
> The alternative is not enabling SW_PAN (at runtime) if this errata is
> present, along with a warning stating that hardware-PAN should be
> enabled in kconfig instead. Not sure what distributions will make of that
> though.

The problem with this patch is that when ARM64_SW_TTBR0_PAN is enabled
and in the absence of hardware PAN (or ARM64_PAN disabled),
cpu_do_switch_mm is no longer called for user process switching, so the
workaround is pretty much useless.

I'm ok with adding the Kconfig dependency below to
QCOM_FALKOR_ERRATUM_1003:

	depends on !ARM64_SW_TTBR0_PAN || ARM64_PAN

together with a run-time warning if ARM64_SW_TTBR0_PAN is being used.

I'm not keen on adding the workaround to the uaccess macros. They are
complex enough already and people who do want SW PAN (and single Image)
would end up with 6-8 extra unnecessary nops on each side of a uaccess
(and nops are not entirely free).

-- 
Catalin

Back to linux.kernel | Previous | NextPrevious in thread | Next in thread | Find similar | Unroll thread


Thread

Re: [PATCH v4 2/4] arm64: Work around Falkor erratum 1003 Mark Rutland <mark.rutland@arm.com> - 2017-01-31 13:40 +0100
  Re: [PATCH v4 2/4] arm64: Work around Falkor erratum 1003 Christopher Covington <cov@codeaurora.org> - 2017-01-31 18:50 +0100
    Re: [PATCH v4 2/4] arm64: Work around Falkor erratum 1003 Marc Zyngier <marc.zyngier@arm.com> - 2017-01-31 19:00 +0100
      Re: [PATCH v4 2/4] arm64: Work around Falkor erratum 1003 Christopher Covington <cov@codeaurora.org> - 2017-02-01 17:30 +0100
        Re: [PATCH v4 2/4] arm64: Work around Falkor erratum 1003 Will Deacon <will.deacon@arm.com> - 2017-02-01 17:40 +0100
          Re: [PATCH v4 2/4] arm64: Work around Falkor erratum 1003 Catalin Marinas <catalin.marinas@arm.com> - 2017-02-01 18:40 +0100
            Re: [PATCH v4 2/4] arm64: Work around Falkor erratum 1003 Will Deacon <will.deacon@arm.com> - 2017-02-01 18:50 +0100
              Re: [PATCH v4 2/4] arm64: Work around Falkor erratum 1003 Will Deacon <will.deacon@arm.com> - 2017-02-01 19:00 +0100
                Re: [PATCH v4 2/4] arm64: Work around Falkor erratum 1003 Catalin Marinas <catalin.marinas@arm.com> - 2017-02-01 19:30 +0100
                Re: [PATCH v4 2/4] arm64: Work around Falkor erratum 1003 Will Deacon <will.deacon@arm.com> - 2017-02-01 19:40 +0100
                Re: [PATCH v4 2/4] arm64: Work around Falkor erratum 1003 Catalin Marinas <catalin.marinas@arm.com> - 2017-02-01 19:40 +0100
                Re: [PATCH v4 2/4] arm64: Work around Falkor erratum 1003 Christopher Covington <cov@codeaurora.org> - 2017-02-08 01:40 +0100
              Re: [PATCH v4 2/4] arm64: Work around Falkor erratum 1003 Catalin Marinas <catalin.marinas@arm.com> - 2017-02-01 19:00 +0100
              Re: [PATCH v4 2/4] arm64: Work around Falkor erratum 1003 Catalin Marinas <catalin.marinas@arm.com> - 2017-02-01 19:00 +0100

csiph-web