Received: by 2002:ab2:6857:0:b0:1ef:ffd0:ce49 with SMTP id l23csp3171737lqp; Tue, 26 Mar 2024 01:18:24 -0700 (PDT) X-Forwarded-Encrypted: i=3; AJvYcCUyar9s4scotVohT7uNGhCQ3R//A3TM8KSa0jioSvKZStItalUPC41Oq0hgBC/+lqn424iqG2scr3tyxNGInxhKgZZhK/cyC5Fx2LqE4w== X-Google-Smtp-Source: AGHT+IEVtx4GAjoGsC7TKTHofj8D/iM3sP4C2NVNbJTHvbHNantZnbK0ECh32o30Ugxufy/x0nK+ X-Received: by 2002:ac8:7d49:0:b0:431:624c:535e with SMTP id h9-20020ac87d49000000b00431624c535emr3714685qtb.0.1711441104072; Tue, 26 Mar 2024 01:18:24 -0700 (PDT) ARC-Seal: i=2; a=rsa-sha256; t=1711441104; cv=pass; d=google.com; s=arc-20160816; b=TXe5DCXuor5PZWxnjNjq6FJgpRxipCPnlXQ5pyNohbVSLkQIWGEmTBhAXptVXWUE8m 4PU4qTURqMCK2D4zjP7xdMRyuDsyBypCA6IoOR15ud6vYqCY29F+jJ7nuUZ9imIIj5hZ vzBwQZw6uBUl3pnYUfa7SRZZ34+TXR8WJf1m7tfG9Qtkp03cvFUX933g4XhHBKVSnno2 w4KQawHQZWksXAeCl7UL+pJ8o8hlprWnAyo2PWFaRCO7GpYa16mr4gvuwPUZ1k/6qRka T5dK2ZedunPOtyVVvho+YYW2PKrYCXE8zNzRDq2qsCB5qkF+xn9P404sZi2FaEL6D+J8 QXbw== ARC-Message-Signature: i=2; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=in-reply-to:content-disposition:mime-version:list-unsubscribe :list-subscribe:list-id:precedence:references:message-id:subject:cc :to:from:date:dkim-signature; bh=4kdLySVbcAp87ohedwwkefbjXy6LsW3Hr/KdieTseHc=; fh=0g3pl8+s/ZPZ9ME22LBwn45yT4mtvnRHoU53yOz85hg=; b=ZyPcv9N6a9y2G4H4wTleF+h+VSYpXBtwLsuOfY2Fq3gWvQ9slDgJY4zWXNM2mrkrzO IpoLFO0l0m+W9qm3CVR1NZGhSG/48KmSstTaoezI01/4FyOFR5JN0UcPETDM4d/IFxBS FcgM9T+4JgvB1kAFGVLguaiKlQ5sQeCF2aKRVCkGxa4BR7XNFg4S6f3xqTuOw5wFkuyp vtnTh1JNwXYfHluiwzYu+1ul899SnzUKlMVUvQKfGRlJQRR6uX6lbljVmyS8GLrgdlw4 z6jnRqmniC0Ts59rgdNKtYFzeckgy97kU9zKA7LArxNByHxPIfV3TmXiBkQRuCwO3c8r DVpw==; dara=google.com ARC-Authentication-Results: i=2; mx.google.com; dkim=pass header.i=@kernel.org header.s=k20201202 header.b=kc8a5xJ7; arc=pass (i=1 dkim=pass dkdomain=kernel.org); spf=pass (google.com: domain of linux-crypto+bounces-2867-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:45d1:ec00::1 as permitted sender) smtp.mailfrom="linux-crypto+bounces-2867-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org Return-Path: Received: from ny.mirrors.kernel.org (ny.mirrors.kernel.org. [2604:1380:45d1:ec00::1]) by mx.google.com with ESMTPS id d21-20020a05622a101500b00431609550f6si2550114qte.308.2024.03.26.01.18.23 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 26 Mar 2024 01:18:24 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-crypto+bounces-2867-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:45d1:ec00::1 as permitted sender) client-ip=2604:1380:45d1:ec00::1; Authentication-Results: mx.google.com; dkim=pass header.i=@kernel.org header.s=k20201202 header.b=kc8a5xJ7; arc=pass (i=1 dkim=pass dkdomain=kernel.org); spf=pass (google.com: domain of linux-crypto+bounces-2867-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:45d1:ec00::1 as permitted sender) smtp.mailfrom="linux-crypto+bounces-2867-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org Received: from smtp.subspace.kernel.org (wormhole.subspace.kernel.org [52.25.139.140]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by ny.mirrors.kernel.org (Postfix) with ESMTPS id CB1DF1C29EEF for ; Tue, 26 Mar 2024 08:18:23 +0000 (UTC) Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id 94C00131BB7; Tue, 26 Mar 2024 08:18:18 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=kernel.org header.i=@kernel.org header.b="kc8a5xJ7" X-Original-To: linux-crypto@vger.kernel.org Received: from smtp.kernel.org (aws-us-west-2-korg-mail-1.web.codeaurora.org [10.30.226.201]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id 5264B21A0D; Tue, 26 Mar 2024 08:18:18 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=10.30.226.201 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1711441098; cv=none; b=D7YaqpICqmZCzJCN+y1QJcw2oxI+RSGsUD4T/vXL4NsPTkjxMvgxajVdWbka/wkXiZNjfijzqkyT1OUCpSxZk1db/2p7ziRzgughgFoIcIQDY6EmUqyIfVCl38NFxw5oviOM6ZLrtg10drTOF8fedzYeLnhVp93QxrCBi1q7Lrc= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1711441098; c=relaxed/simple; bh=M/XyZ/Z+QBR65BVhuTqcNZ0wsFkc0/b4T3XmpOmoruo=; h=Date:From:To:Cc:Subject:Message-ID:References:MIME-Version: Content-Type:Content-Disposition:In-Reply-To; b=hRXac8ImZtchiBFk4thE9DtZXCGz9nJ+iZ2VjaeYwG9BqGmOL2ZeAWjYPI4BD7s5ROU5co9tCe0he4daCXctpFA914aj7cESYbzymcw3u5mfwLHmH/VOmGRBY8OYnTZxBBUatyzVYY52tPUzNu4UVFQDv5Xb30XHzhx5ASGq0l4= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=kernel.org header.i=@kernel.org header.b=kc8a5xJ7; arc=none smtp.client-ip=10.30.226.201 Received: by smtp.kernel.org (Postfix) with ESMTPSA id B3853C43390; Tue, 26 Mar 2024 08:18:17 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1711441097; bh=M/XyZ/Z+QBR65BVhuTqcNZ0wsFkc0/b4T3XmpOmoruo=; h=Date:From:To:Cc:Subject:References:In-Reply-To:From; b=kc8a5xJ72UrCiowd/D+/6dcTC177LepbBe5CCJ1VxL9LDPvfQ1uiIDRKrd8vVGHNs CWrGENPXYaCH3rutS82h99rVzz5tjagR9ly/EH2o3hGrpdD4j81TEW0lmjnEJBvEQm n8cRshukS5TYFz/OLP3Pvo/u89AHfMKEPSb3Z4U5dc7lxLUJvtgKsfAzy1i2k/3VBj XM5ceIXvquQ217Vu0Gy9ohXxNrvAvfiuXgVcvPPbwQLLAC5ZN95aggYz3m/S4hHKqR YS9H1CkQilaVaw2Z7Bjw/t+7m/HVkwLjJ9XsJov0FFz5KHlNDJ2jakKXKccX+OgxMI ouqx8EWW71opQ== Date: Tue, 26 Mar 2024 01:18:16 -0700 From: Eric Biggers To: Ingo Molnar Cc: linux-crypto@vger.kernel.org, x86@kernel.org, linux-kernel@vger.kernel.org, Ard Biesheuvel , Andy Lutomirski , "Chang S . Bae" Subject: Re: [PATCH 1/6] x86: add kconfig symbols for assembler VAES and VPCLMULQDQ support Message-ID: <20240326081816.GA431948@sol.localdomain> References: <20240326080305.402382-1-ebiggers@kernel.org> <20240326080305.402382-2-ebiggers@kernel.org> Precedence: bulk X-Mailing-List: linux-crypto@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: On Tue, Mar 26, 2024 at 09:10:13AM +0100, Ingo Molnar wrote: > > * Eric Biggers wrote: > > > From: Eric Biggers > > > > Add config symbols AS_VAES and AS_VPCLMULQDQ that expose whether the > > assembler supports the vector AES and carryless multiplication > > cryptographic extensions. > > > > Signed-off-by: Eric Biggers > > --- > > arch/x86/Kconfig.assembler | 10 ++++++++++ > > 1 file changed, 10 insertions(+) > > > > diff --git a/arch/x86/Kconfig.assembler b/arch/x86/Kconfig.assembler > > index 8ad41da301e5..59aedf32c4ea 100644 > > --- a/arch/x86/Kconfig.assembler > > +++ b/arch/x86/Kconfig.assembler > > @@ -23,9 +23,19 @@ config AS_TPAUSE > > config AS_GFNI > > def_bool $(as-instr,vgf2p8mulb %xmm0$(comma)%xmm1$(comma)%xmm2) > > help > > Supported by binutils >= 2.30 and LLVM integrated assembler > > > > +config AS_VAES > > + def_bool $(as-instr,vaesenc %ymm0$(comma)%ymm1$(comma)%ymm2) > > + help > > + Supported by binutils >= 2.30 and LLVM integrated assembler > > Nit: any reason it isn't called AS_VAESENC, like the instruction itself? > > The other new AS_ Kconfig symbols follow the same nomenclature: The CPU feature flag is called VAES. It guards the vaesenc, vaesenclast, vaesdec, and vaesdeclast instructions when used on ymm and zmm registers. So the name AS_VAES seems fine as-is. I think you may have been confused by AS_VPCLMULQDQ, because in that case the feature happens to provides a single instruction with the same name as the CPU feature flag. - Eric