qsimd: don't enforce shstk (CET) feature on launch
Clang with -march=tigerlake or -march=sapphirerapids pre-defines __SHSTK__, which QtCore require the feature, even if the OS does not have support for it. That's of no consequence because the compiler does not generate shadow stack operations on its own. Pick-to: 6.2 6.3 6.4 Change-Id: Id0fb9ab0089845ee8843fffd16fa1ad910f008b8 Reviewed-by: Allan Sandfeld Jensen <allan.jensen@qt.io>
This commit is contained in:
parent
da0d7f61c8
commit
d531c4b65d
@ -564,6 +564,12 @@ uint64_t QT_MANGLE_NAMESPACE(qDetectCpuFeatures)()
|
|||||||
// Yocto hard-codes CRC32+AES on. Since they are unlikely to be used
|
// Yocto hard-codes CRC32+AES on. Since they are unlikely to be used
|
||||||
// automatically by compilers, we can just add runtime check.
|
// automatically by compilers, we can just add runtime check.
|
||||||
minFeatureTest &= ~(CpuFeatureAES|CpuFeatureCRC32);
|
minFeatureTest &= ~(CpuFeatureAES|CpuFeatureCRC32);
|
||||||
|
#endif
|
||||||
|
#if defined(Q_PROCESSOR_X86_64) && defined(cpu_feature_shstk)
|
||||||
|
// Controlflow Enforcement Technology (CET) is an OS-assisted
|
||||||
|
// hardware-feature, meaning the CPUID bit may be disabled if the OS
|
||||||
|
// doesn't support it, but that's ok.
|
||||||
|
minFeatureTest &= ~CpuFeatureSHSTK;
|
||||||
#endif
|
#endif
|
||||||
QCpuFeatureType f = detectProcessorFeatures();
|
QCpuFeatureType f = detectProcessorFeatures();
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user