zerotier / libzt

Encrypted P2P sockets over ZeroTier

Home Page:https://zerotier.com

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

ARM: ZeroTier incorrectly assumes ArmV8A Crypto Extension is available

glebm opened this issue · comments

ZeroTier on aarch64 requires the ArmV8A Crypto Extension.
This extension is optional and not all CPUs support it.

If the CPU does not support it, currently ZeroTier has to be disabled entirely.

Additionaly, ZeroTier apparently tries to use crypto extensions on arm32, which is never supported.

Example from a distro: https://github.com/batocera-linux/batocera.linux/blob/4a2d3af26b15f2a1852d6addede9385500289285/package/batocera/ports/devilutionx/devilutionx.mk#L22-L31

ZeroTier should instead check if the extension is supported and fall back to the non-accellerated implementation if it isn't.

This check should ideally happen in the source file using compiler macros, rather than in the build system:

#ifdef __ARM_FEATURE_CRYPTO
// OK to use crypto instructions, such as `vaeseq_u8`
#endif

I've sent a fix to ZeroTierOne in zerotier/ZeroTierOne#1855

The ZeroTierOne fix has been merged, simply need to bump the submodule version here to fix this and #178

Submodule was bumped some time ago so this should work now. Thanks for your help.