lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Date:   Fri, 10 Nov 2017 17:26:56 +0000
From:   Catalin Marinas <catalin.marinas@....com>
To:     Stephen Boyd <sboyd@...eaurora.org>
Cc:     Will Deacon <will.deacon@....com>, linux-arm-msm@...r.kernel.org,
        linux-kernel@...r.kernel.org, linux-arm-kernel@...ts.infradead.org
Subject: Re: [PATCH] arm64: cpu_errata: Add Kryo to Falkor 1003 errata

On Wed, Nov 08, 2017 at 11:00:29AM -0800, Stephen Boyd wrote:
> The Kryo CPUs are also affected by the Falkor 1003 errata, so
> we need to do the same workaround on Kryo CPUs. The MIDR is
> slightly more complicated here, where the PART number is not
> always the same when looking at all the bits from 15 to 4. Drop
> the lower 8 bits and just look at the top 4 to see if it's '2'
> and then consider those as Kryo CPUs. This covers all the
> combinations without having to list them all out.
> 
> Signed-off-by: Stephen Boyd <sboyd@...eaurora.org>
> ---
> 
> We may need to introduce another Kconfig option to block software PAN
> from being enabled when this errata is enabled (and then have software PAN
> depend on this new config being false).

It depends on whether you'd want to use SW PAN together with these CPUs.
>From a defconfig + single Image perspective, SW PAN is disabled but it
would be nice to allow single Image with both E1003 and SW PAN configs
enabled (though SW PAN wouldn't be used at run-time).

As a quick hack, something like below but we may want to add a separate
cap bit as a minor optimisation (not sure it makes a difference).
Untested:

------------------8<--------------------------
diff --git a/arch/arm64/include/asm/cpufeature.h b/arch/arm64/include/asm/cpufeature.h
index ac67cfc2585a..8d2ddaef70a2 100644
--- a/arch/arm64/include/asm/cpufeature.h
+++ b/arch/arm64/include/asm/cpufeature.h
@@ -268,7 +268,8 @@ static inline bool system_supports_fpsimd(void)
 static inline bool system_uses_ttbr0_pan(void)
 {
 	return IS_ENABLED(CONFIG_ARM64_SW_TTBR0_PAN) &&
-		!cpus_have_const_cap(ARM64_HAS_PAN);
+		!cpus_have_const_cap(ARM64_HAS_PAN) &&
+		!cpus_have_const_cap(ARM64_WORKAROUND_QCOM_FALKOR_E1003);
 }
 
------------------8<--------------------------

> Otherwise, I can take a look at updating the software PAN implementation
> to handle this errata, but that is probably a dead-end?

It will probably be more intrusive and would also make SW PAN a lot
slower. I don't think it's worth it.

-- 
Catalin

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ