Re: arch/x86/crypto/curve25519-x86_64.c:609:3: error: inline assembly requires more registers than available

From: Nathan Chancellor
Date: Mon Feb 06 2023 - 11:52:14 EST


On Mon, Feb 06, 2023 at 11:52:01PM +0800, kernel test robot wrote:
> tree: https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git master
> head: d2d11f342b179f1894a901f143ec7c008caba43e
> commit: 07b586fe06625b0b610dc3d3a969c51913d143d4 crypto: x86/curve25519 - replace with formally verified implementation
> date: 3 years ago
> config: x86_64-buildonly-randconfig-r006-20230206 (https://download.01.org/0day-ci/archive/20230206/202302062324.HhzEZCF7-lkp@xxxxxxxxx/config)
> compiler: clang version 14.0.6 (https://github.com/llvm/llvm-project f28c006a5895fc0e329fe15fead81e37457cb1d1)
> reproduce (this is a W=1 build):
> wget https://raw.githubusercontent.com/intel/lkp-tests/master/sbin/make.cross -O ~/bin/make.cross
> chmod +x ~/bin/make.cross
> # https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git/commit/?id=07b586fe06625b0b610dc3d3a969c51913d143d4
> git remote add linus https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
> git fetch --no-tags linus master
> git checkout 07b586fe06625b0b610dc3d3a969c51913d143d4
> # save the config file
> mkdir build_dir && cp config build_dir/.config
> COMPILER_INSTALL_PATH=$HOME/0day COMPILER=clang make.cross W=1 O=build_dir ARCH=x86_64 olddefconfig
> COMPILER_INSTALL_PATH=$HOME/0day COMPILER=clang make.cross W=1 O=build_dir ARCH=x86_64 SHELL=/bin/bash arch/x86/crypto/
>
> If you fix the issue, kindly add following tag where applicable
> | Reported-by: kernel test robot <lkp@xxxxxxxxx>
>
> All errors (new ones prefixed by >>):
>
> arch/x86/crypto/curve25519-x86_64.c:954:6: warning: variable 'carry' set but not used [-Wunused-but-set-variable]
> u64 carry;
> ^
> arch/x86/crypto/curve25519-x86_64.c:951:6: warning: variable 'carry0' set but not used [-Wunused-but-set-variable]
> u64 carry0;
> ^
> >> arch/x86/crypto/curve25519-x86_64.c:609:3: error: inline assembly requires more registers than available
> " movq 0(%1), %%rdx;" /* f[0] */
> ^
> >> arch/x86/crypto/curve25519-x86_64.c:609:3: error: inline assembly requires more registers than available
> 2 warnings and 2 errors generated.

https://github.com/ClangBuiltLinux/linux/issues/1589

Intel folks, this can probably just be sent to our list from now on.

Cheers,
Nathan