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:   Mon, 6 Dec 2021 21:32:29 +0000
From:   "Bae, Chang Seok" <chang.seok.bae@...el.com>
To:     Peter Zijlstra <peterz@...radead.org>
CC:     Thomas Gleixner <tglx@...utronix.de>, Borislav Petkov <bp@...e.de>,
        "Dave Hansen" <dave.hansen@...ux.intel.com>,
        "mingo@...nel.org" <mingo@...nel.org>,
        "Lutomirski, Andy" <luto@...nel.org>,
        "x86@...nel.org" <x86@...nel.org>,
        "herbert@...dor.apana.org.au" <herbert@...dor.apana.org.au>,
        "linux-kernel@...r.kernel.org" <linux-kernel@...r.kernel.org>,
        "linux-crypto@...r.kernel.org" <linux-crypto@...r.kernel.org>,
        "Williams, Dan J" <dan.j.williams@...el.com>,
        "Gairuboyina, Charishma1" <charishma1.gairuboyina@...el.com>,
        "Dwarakanath, Kumar N" <kumar.n.dwarakanath@...el.com>,
        "Krishnakumar, Lalithambika" <lalithambika.krishnakumar@...el.com>,
        "Shankar, Ravi V" <ravi.v.shankar@...el.com>
Subject: Re: [PATCH v3 11/15] crypto: x86/aes-kl - Support AES algorithm using
 Key Locker instructions

On Dec 2, 2021, at 06:21, Peter Zijlstra <peterz@...radead.org> wrote:
> On Wed, Nov 24, 2021 at 12:06:56PM -0800, Chang S. Bae wrote:
>> +	encodekey256 %eax, %eax
> 
> So this thing uses the fancy new keylocker instructions, however:
> 
>> diff --git a/crypto/Kconfig b/crypto/Kconfig
>> index 285f82647d2b..784a04433549 100644
>> --- a/crypto/Kconfig
>> +++ b/crypto/Kconfig
>> @@ -1113,6 +1113,50 @@ config CRYPTO_AES_NI_INTEL
>> 	  ECB, CBC, LRW, XTS. The 64 bit version has additional
>> 	  acceleration for CTR.
>> 
>> +config CRYPTO_AES_KL
>> +	tristate "AES cipher algorithms (AES-KL)"
>> +	depends on (LD_VERSION >= 23600) || (LLD_VERSION >= 120000)
>> +	depends on DM_CRYPT
>> +	select X86_KEYLOCKER
>> +	select CRYPTO_AES_NI_INTEL
> 
> 
> There is no dependency on the compiler actually supporting them..
> 
> config AS_HAS_KEYLOCKER
> 	def_bool $(as-instr,encodekey256)
> 
> 	depends on AS_HAS_KEYLOCKER
> 
> Hmm?

Well, LD_VERSION reflects the binutils version.

But yes, the as-instr macro looks to be useful here:

+config AS_HAS_KEYLOCKER
+       def_bool $(as-instr,encodekey256 %eax$(comma)%eax)
+       help
+         Supported by binutils >=2.36 and LLVM integrated assembler >= V12
+
 config CRYPTO_AES_KL
        tristate "AES cipher algorithms (AES-KL)"
-       depends on (LD_VERSION >= 23600) || (LLD_VERSION >= 120000)
+       depends on AS_HAS_KEYLOCKER

Thanks,
Chang

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ