Received: by 2002:ab2:687:0:b0:1f4:6588:b3a7 with SMTP id s7csp85161lqe; Tue, 9 Apr 2024 15:38:31 -0700 (PDT) X-Forwarded-Encrypted: i=3; AJvYcCVmK42z3MGo3Nts+akNzxvTisB/NoBTg9nShC6I/zfjyg7z2LF9UhyFnkBFb10sEEKMRsCytXfJTP0iZvVzigyO36BR2vkCaIuqjfK0IA== X-Google-Smtp-Source: AGHT+IEg8ya2GC50oVs19MXEgx/0hUCLe9WwTa8KCW3Wm6q4evp+NA0eE+sXszQPUWba2aue2ZCJ X-Received: by 2002:a17:90a:ea90:b0:2a5:bec9:abd7 with SMTP id h16-20020a17090aea9000b002a5bec9abd7mr611704pjz.42.1712702311479; Tue, 09 Apr 2024 15:38:31 -0700 (PDT) ARC-Seal: i=2; a=rsa-sha256; t=1712702311; cv=pass; d=google.com; s=arc-20160816; b=LLZBZgviuXy0UrSPb5WMGMTrCNlxhzdwGlE6W1e4phja4CcVjDWxgQqEmo5NMiLYbf AWjV6/67z/b7B1fnoqqhky+hoTTlyR14JJOOkJ8/LRkT6aK3aJpje5OfoWdP754cUcAv 07JKFlGLqMdrL9X894VH/PVm7fi0K1S73Rym8g2QfbTMdGhGIKStacTiks/I0tcgeMFO E7ji9NxDS9wJWC894gEcGxrbBQq00Nc+U/M+BW3ES49RGFZ7Q92PESFggfu3ROahyKZ4 +xu8gQX269SffYPo7djIkNLbWvNcWhkBgIji0hWM7gKfuHQxLg8jSMl4h4hptn5c6mpr nq+g== ARC-Message-Signature: i=2; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=mime-version:list-unsubscribe:list-subscribe:list-id:precedence :user-agent:content-transfer-encoding:references:in-reply-to:date:cc :to:from:subject:message-id:dkim-signature; bh=DI0ql6kePi/tPfxIArDLqofFpx+TY99kmnoVisRapqw=; fh=KDeLZrkS3nfaONbZxAc0KKrlIJ9Frni+mtaZvceIv14=; b=LIJ1YWK/gbJ2RCDF35b3GyGEyNll/JtGWUNa4Anlm0lRhjxmVuIjG+gihNc5ksgJWe ncsZr5tHUwVL0cHudEWk4RE9+0TMj4DKFqZIWEj+mab7XvgW0qk/7nO/kFiiDVd9KLcJ 5cpzAW/4CuUrkfFs8lTYRiCffnDac7UuacceoadkclGGzYicb7NIVqjqfQI/nbyBoHeZ XuFf66YxnGgseNJae5NicfuJ5lF0ey3XWr8RbDTuPeMupw6DpStpvc8DIE5XUdyd6ifr lkRRHCSBSgGVvxVB02nkNnQCVweP9cLs9C3n2EQufjVeRmkN34QiBRhEbfxvpkHCZ+t5 u/xQ==; dara=google.com ARC-Authentication-Results: i=2; mx.google.com; dkim=pass header.i=@intel.com header.s=Intel header.b=ArJPQc0m; arc=pass (i=1 dkim=pass dkdomain=intel.com dmarc=pass fromdomain=linux.intel.com); spf=pass (google.com: domain of linux-crypto+bounces-3431-linux.lists.archive=gmail.com@vger.kernel.org designates 139.178.88.99 as permitted sender) smtp.mailfrom="linux-crypto+bounces-3431-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=intel.com Return-Path: Received: from sv.mirrors.kernel.org (sv.mirrors.kernel.org. [139.178.88.99]) by mx.google.com with ESMTPS id u16-20020a17090adb5000b002a4838902dcsi207815pjx.22.2024.04.09.15.38.31 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 09 Apr 2024 15:38:31 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-crypto+bounces-3431-linux.lists.archive=gmail.com@vger.kernel.org designates 139.178.88.99 as permitted sender) client-ip=139.178.88.99; Authentication-Results: mx.google.com; dkim=pass header.i=@intel.com header.s=Intel header.b=ArJPQc0m; arc=pass (i=1 dkim=pass dkdomain=intel.com dmarc=pass fromdomain=linux.intel.com); spf=pass (google.com: domain of linux-crypto+bounces-3431-linux.lists.archive=gmail.com@vger.kernel.org designates 139.178.88.99 as permitted sender) smtp.mailfrom="linux-crypto+bounces-3431-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=intel.com 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 sv.mirrors.kernel.org (Postfix) with ESMTPS id 0C928283634 for ; Tue, 9 Apr 2024 22:38:31 +0000 (UTC) Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id 0DA74433A6; Tue, 9 Apr 2024 22:38:28 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=intel.com header.i=@intel.com header.b="ArJPQc0m" X-Original-To: linux-crypto@vger.kernel.org Received: from mgamail.intel.com (mgamail.intel.com [192.198.163.14]) (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 2156053AC for ; Tue, 9 Apr 2024 22:38:25 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=192.198.163.14 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1712702307; cv=none; b=iWiyAdtihXjEip/h1VJVaVCgdumO9rm+1hBwsKr3dohJ1qKXH2tDMTU6wgmgP8iK8H2k+xVT15Oq/Rq1hWUXRBNdfZjcdAlcRKKUeRzhWqbBmSvHcrjUNgR/pg16qIS1Iu8EZAOPeCdGgikvM9K8QhI97nOti83mqDWF0USOTdI= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1712702307; c=relaxed/simple; bh=jb26GpNwvZNeQlySbTBFG7MuoxLdBGeIOvyQNQMMDAY=; h=Message-ID:Subject:From:To:Cc:Date:In-Reply-To:References: Content-Type:MIME-Version; b=dtCT5cWpIibtW+h9CmLpduOgbWFYpSh2Myg84foC8nxg+bg3pE0YtBhdyNg8fpf9g4bn0lyBPsy7WBFLROOgevqStzGwSGq4x0CF0m3avVhfpuzz0dCquD50OvO3ICKs7YVfyKi26yKUSNxrb+q1QnwePgwNFq6U+HlusG9sS+E= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=linux.intel.com; spf=none smtp.mailfrom=linux.intel.com; dkim=pass (2048-bit key) header.d=intel.com header.i=@intel.com header.b=ArJPQc0m; arc=none smtp.client-ip=192.198.163.14 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=linux.intel.com Authentication-Results: smtp.subspace.kernel.org; spf=none smtp.mailfrom=linux.intel.com DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=intel.com; i=@intel.com; q=dns/txt; s=Intel; t=1712702307; x=1744238307; h=message-id:subject:from:to:cc:date:in-reply-to: references:content-transfer-encoding:mime-version; bh=jb26GpNwvZNeQlySbTBFG7MuoxLdBGeIOvyQNQMMDAY=; b=ArJPQc0m+FlJ//sd8Smp6ox6ovFy77qNyJFihw1F0qzrvFQYdj+m8o2h rx9ZjlVRKbanDZdjJET0U8FGwyHGPv17xketE8Kd7EqqS5TfTeVjcrXM6 66/xRcQHjNz0viOc0iL89X0o+2VoW/4OkOhMh4fqcDUrIa5YSZoUoj6vr ZAXGnuHA5P2QeAqm7INoUgLrmXgxmMOQA8FUz8kWPYsjB1+w353LSF00J ouijHnv3/kYKlke0fvZksNaPSiKx0bXGuR5cgg+djoYAabzITcnLt/ngS +iUuBnrpROZO6uHN1WhdGKvXhWVnaLAiFO6JX4b1L2wITJpLROsVBSHK0 w==; X-CSE-ConnectionGUID: tAVDSY22TW6cri29lKbExQ== X-CSE-MsgGUID: 1fv5i+oORBaU/t1Pt9KoMg== X-IronPort-AV: E=McAfee;i="6600,9927,11039"; a="8269157" X-IronPort-AV: E=Sophos;i="6.07,190,1708416000"; d="scan'208";a="8269157" Received: from fmviesa003.fm.intel.com ([10.60.135.143]) by fmvoesa108.fm.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 09 Apr 2024 15:38:26 -0700 X-CSE-ConnectionGUID: eD+1DAYYQU6jdPaUew+HIg== X-CSE-MsgGUID: lCMDPlZkQm6bigM1LkVz/w== X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="6.07,190,1708416000"; d="scan'208";a="24865247" Received: from amatsuba-mobl2.amr.corp.intel.com (HELO [10.209.3.203]) ([10.209.3.203]) by fmviesa003-auth.fm.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 09 Apr 2024 15:38:25 -0700 Message-ID: <73f90bdd2b5767b3004d130031ef042bd28f1698.camel@linux.intel.com> Subject: Re: [PATCH 2/3] crypto: x86/sha256-avx2 - add missing vzeroupper From: Tim Chen To: Eric Biggers , linux-crypto@vger.kernel.org Cc: x86@kernel.org Date: Tue, 09 Apr 2024 15:38:16 -0700 In-Reply-To: <20240406002610.37202-3-ebiggers@kernel.org> References: <20240406002610.37202-1-ebiggers@kernel.org> <20240406002610.37202-3-ebiggers@kernel.org> Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable User-Agent: Evolution 3.44.4 (3.44.4-2.fc36) Precedence: bulk X-Mailing-List: linux-crypto@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 On Fri, 2024-04-05 at 20:26 -0400, Eric Biggers wrote: > From: Eric Biggers >=20 > Since sha256_transform_rorx() uses ymm registers, execute vzeroupper > before returning from it. This is necessary to avoid reducing the > performance of SSE code. >=20 > Fixes: d34a460092d8 ("crypto: sha256 - Optimized sha256 x86_64 routine us= ing AVX2's RORX instructions") > Signed-off-by: Eric Biggers > --- > arch/x86/crypto/sha256-avx2-asm.S | 1 + > 1 file changed, 1 insertion(+) >=20 > diff --git a/arch/x86/crypto/sha256-avx2-asm.S b/arch/x86/crypto/sha256-a= vx2-asm.S > index 9918212faf91..0ffb072be956 100644 > --- a/arch/x86/crypto/sha256-avx2-asm.S > +++ b/arch/x86/crypto/sha256-avx2-asm.S > @@ -714,10 +714,11 @@ SYM_TYPED_FUNC_START(sha256_transform_rorx) > popq %r15 > popq %r14 > popq %r13 > popq %r12 > popq %rbx > + vzeroupper > RET > SYM_FUNC_END(sha256_transform_rorx) > =20 > .section .rodata.cst512.K256, "aM", @progbits, 512 > .align 64 Acked-by: Tim Chen