From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from us-smtp-delivery-124.mimecast.com (us-smtp-delivery-124.mimecast.com [170.10.133.124]) by mx.groups.io with SMTP id smtpd.web10.13696.1675438621065683813 for ; Fri, 03 Feb 2023 07:37:01 -0800 Authentication-Results: mx.groups.io; dkim=pass header.i=@redhat.com header.s=mimecast20190719 header.b=g8XHIMQR; spf=pass (domain: redhat.com, ip: 170.10.133.124, mailfrom: kraxel@redhat.com) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1675438620; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version:content-type:content-type: in-reply-to:in-reply-to:references:references; bh=jdYZtSa83zWzGaz8+zRqjOvtnslhONHESMmLD/95DAg=; b=g8XHIMQRdhcVY0GI7dy2PuRmSStW7t11IUg9VnPh32PpiOemGi6FJoa4E0SIO6A5LylBOy OqjVNc32dC2ZzoUBuUqgjKjoTdpl3kQG/adj2hc+9esQ/J8BM9gd70NpW4uERNm0swx69p VArVUKK2gNFwm+pXgafTn9i6/PudyVE= Received: from mimecast-mx02.redhat.com (mx3-rdu2.redhat.com [66.187.233.73]) by relay.mimecast.com with ESMTP with STARTTLS (version=TLSv1.2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id us-mta-650-f4Sj-CnpNAegpg95imypUA-1; Fri, 03 Feb 2023 10:36:56 -0500 X-MC-Unique: f4Sj-CnpNAegpg95imypUA-1 Received: from smtp.corp.redhat.com (int-mx09.intmail.prod.int.rdu2.redhat.com [10.11.54.9]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mimecast-mx02.redhat.com (Postfix) with ESMTPS id BE2EA3C10ED2; Fri, 3 Feb 2023 15:36:55 +0000 (UTC) Received: from sirius.home.kraxel.org (unknown [10.39.192.85]) by smtp.corp.redhat.com (Postfix) with ESMTPS id 602A3492C18; Fri, 3 Feb 2023 15:36:55 +0000 (UTC) Received: by sirius.home.kraxel.org (Postfix, from userid 1000) id 1E3DF180060E; Fri, 3 Feb 2023 16:36:54 +0100 (CET) Date: Fri, 3 Feb 2023 16:36:54 +0100 From: "Gerd Hoffmann" To: devel@edk2.groups.io, ardb@kernel.org Cc: Min Xu , Ard Biesheuvel , Michael Roth , Jiewen Yao , Jian J Wang , Jordan Justen , Pawel Polawski , Oliver Steffen , Tom Lendacky , Xiaoyu Lu , Erdem Aktas , Guomin Jiang , James Bottomley Subject: Re: [edk2-devel] [PATCH 00/11] OvmfPkg: add Crypto Driver support Message-ID: <20230203153654.pyutijc54a66pe6e@sirius.home.kraxel.org> References: <20230203132806.2275708-1-kraxel@redhat.com> MIME-Version: 1.0 In-Reply-To: X-Scanned-By: MIMEDefang 3.1 on 10.11.54.9 X-Mimecast-Spam-Score: 0 X-Mimecast-Originator: redhat.com Content-Type: text/plain; charset=us-ascii Content-Disposition: inline On Fri, Feb 03, 2023 at 02:33:07PM +0100, Ard Biesheuvel wrote: > What is the point of this series? If we are trying to deduplicate > crypto code by moving it into a dedicated driver, can we please just > do that unconditionally, instead of doubling the size of the > validation matrix again? Or are there reasons why one might avoid this > crypto driver approach? Unfortunately it is not a clear size win everywhere. PEI jumps up in size even though I'm using the min_pei config for CryptoPei, seems it *still* has way too much bits compiled in (didn't look into tweaking the config yet, hints are welcome). - 17530 TcgPei + 17146 TcgPei + 34362 Tcg2Pei - 51066 Tcg2Pei + 333950 CryptoPei SMM doesn't change much (slight increase): + 106662 VariableSmm - 540818 VariableSmm + 479374 CryptoSmm DXE is a clear win, three users go from > 400k to < 100k which easily compensates for the almost 700k crypto driver: + 17326 TlsDxe - 19494 TcgDxe + 19450 TcgDxe + 36682 SecurityStubDxe + 54630 Tcg2Dxe - 68498 Tcg2Dxe + 78898 SecureBootConfigDxe + 121190 IScsiDxe - 125174 IScsiDxe - 404574 SecureBootConfigDxe - 479414 SecurityStubDxe - 667006 TlsDxe + 696298 CryptoDxe Overall it should still be a (small) win even without looking at why PEI is so big. If there are no objections I happily drop the USE_CRYPTO_DRIVER option and switch over to the crypto driver unconditionally. take care, Gerd