From mboxrd@z Thu Jan 1 00:00:00 1970 Authentication-Results: mx.groups.io; dkim=missing; spf=pass (domain: redhat.com, ip: 209.85.221.66, mailfrom: philmd@redhat.com) Received: from mail-wr1-f66.google.com (mail-wr1-f66.google.com [209.85.221.66]) by groups.io with SMTP; Tue, 25 Jun 2019 07:55:40 -0700 Received: by mail-wr1-f66.google.com with SMTP id f9so18218330wre.12 for ; Tue, 25 Jun 2019 07:55:40 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:subject:to:cc:references:from:openpgp:message-id :date:user-agent:mime-version:in-reply-to:content-language :content-transfer-encoding; bh=6T5gh9Njcwt1cbzb6jtSJklsco9nVtw57WQUaQ3SrwE=; b=EzGodHH4i73bNtQ+lAkB+X7X1H+7e06hsOkuk8iPeuv+H1xIk25VGPXffnwVQiEKrs qQbPo1917UPNa8lJY33agib1EqwbzW6mec78T9Mib3mn0iBbyZh54LyD6FCF8LLDk+3O MjAbLirnkJUsGi6+3GEvgF2pG/SbW1idlNu/pesgt3RgN6bI/nmVDPAzxpjVKYIoHQcO jNXkxLPMYyr9kyGwYIimseorPwNXUt7kzrMduGSS1jD9JHS/be7q7NHPX2RvupYAtECs dJaJBy2JOMsx968507h+nWkAQ8GWxgszHY6PT3idsBr4y1cF7SaqWDfkXXrdvY7PRrvY ePuQ== X-Gm-Message-State: APjAAAVnxOnjIa1sgrAbVNeDcguyUr2LylGJH1i1NrifliQW+fgkO7pY mMoZzHrVi9ZxuWpBnGq9XJ+dBQ== X-Google-Smtp-Source: APXvYqwA4zS0o0M38ar98uMqh+ExSbv2/hjn64UHGjyQIg2HsoBDa+ozdVf6nD2WhRaLDS9l3zJ1gQ== X-Received: by 2002:adf:fb81:: with SMTP id a1mr29239590wrr.329.1561474538883; Tue, 25 Jun 2019 07:55:38 -0700 (PDT) Return-Path: Received: from [192.168.1.38] (183.red-88-21-202.staticip.rima-tde.net. [88.21.202.183]) by smtp.gmail.com with ESMTPSA id i25sm19523843wrc.91.2019.06.25.07.55.38 (version=TLS1_3 cipher=AEAD-AES128-GCM-SHA256 bits=128/128); Tue, 25 Jun 2019 07:55:38 -0700 (PDT) Subject: Re: [edk2-devel] [PATCH] ArmVirtPkg: handle NETWORK_TLS_ENABLE in ArmVirtQemu* To: devel@edk2.groups.io, lersek@redhat.com Cc: Ard Biesheuvel , Gary Lin , Guillaume GARDET , Julien Grall References: <20190624191336.31611-1-lersek@redhat.com> From: =?UTF-8?B?UGhpbGlwcGUgTWF0aGlldS1EYXVkw6k=?= Openpgp: id=89C1E78F601EE86C867495CBA2A3FD6EDEADC0DE; url=http://pgp.mit.edu/pks/lookup?op=get&search=0xA2A3FD6EDEADC0DE Message-ID: <16a31ae1-c87f-7eef-7653-4033b1009448@redhat.com> Date: Tue, 25 Jun 2019 16:55:37 +0200 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:60.0) Gecko/20100101 Thunderbird/60.7.0 MIME-Version: 1.0 In-Reply-To: <20190624191336.31611-1-lersek@redhat.com> Content-Type: text/plain; charset=utf-8 Content-Language: en-US Content-Transfer-Encoding: 7bit On 6/24/19 9:13 PM, Laszlo Ersek wrote: > Port the [LibraryClasses], [PcdsFixedAtBuild] and [Components] settings > that are related to NETWORK_TLS_ENABLE from OvmfPkg to ArmVirtPkg. > ArmVirtXen is not modified because it doesn't include the edk2 network > stack. > > (This change is now simpler than it would have been when TianoCore#1009 > was originally filed, due to ArmVirtPkg consuming the NetworkPkg include > fragments meanwhile, from TianoCore#1293 / commit 157a3b1aa50f.) > > The usage hints from "OvmfPkg/README", section "HTTPS Boot", apply. > > Cc: Ard Biesheuvel > Cc: Gary Lin > Cc: Guillaume GARDET > Cc: Julien Grall > Ref: https://bugzilla.tianocore.org/show_bug.cgi?id=1009 > Signed-off-by: Laszlo Ersek > --- > > Notes: > Repo: https://github.com/lersek/edk2.git > Branch: armvirt_tls_bz1009 > > ArmVirtPkg/ArmVirt.dsc.inc | 7 +++++++ > ArmVirtPkg/ArmVirtQemu.dsc | 18 ++++++++++++++---- > ArmVirtPkg/ArmVirtQemuKernel.dsc | 18 ++++++++++++++---- > 3 files changed, 35 insertions(+), 8 deletions(-) > > diff --git a/ArmVirtPkg/ArmVirt.dsc.inc b/ArmVirtPkg/ArmVirt.dsc.inc > index 20bf011617a1..a4ae25d982a2 100644 > --- a/ArmVirtPkg/ArmVirt.dsc.inc > +++ b/ArmVirtPkg/ArmVirt.dsc.inc > @@ -71,6 +71,9 @@ [LibraryClasses.common] > > # Networking Requirements > !include NetworkPkg/NetworkLibs.dsc.inc > +!if $(NETWORK_TLS_ENABLE) == TRUE > + TlsLib|CryptoPkg/Library/TlsLib/TlsLib.inf > +!endif > > > # > @@ -136,7 +139,11 @@ [LibraryClasses.common] > # CryptoPkg libraries needed by multiple firmware features > # > IntrinsicLib|CryptoPkg/Library/IntrinsicLib/IntrinsicLib.inf > +!if $(NETWORK_TLS_ENABLE) == TRUE > + OpensslLib|CryptoPkg/Library/OpensslLib/OpensslLib.inf > +!else > OpensslLib|CryptoPkg/Library/OpensslLib/OpensslLibCrypto.inf > +!endif > BaseCryptLib|CryptoPkg/Library/BaseCryptLib/BaseCryptLib.inf > > # > diff --git a/ArmVirtPkg/ArmVirtQemu.dsc b/ArmVirtPkg/ArmVirtQemu.dsc > index cf28478977e1..7ae6702ac1f0 100644 > --- a/ArmVirtPkg/ArmVirtQemu.dsc > +++ b/ArmVirtPkg/ArmVirtQemu.dsc > @@ -43,10 +43,6 @@ [Defines] > !error "NETWORK_SNP_ENABLE is IA32/X64/EBC only" > !endif > > -!if $(NETWORK_TLS_ENABLE) == TRUE > - !error "NETWORK_TLS_ENABLE is tracked at " > -!endif > - > !include NetworkPkg/NetworkDefines.dsc.inc > > !include ArmVirtPkg/ArmVirt.dsc.inc > @@ -113,6 +109,14 @@ [PcdsFixedAtBuild.common] > gArmPlatformTokenSpaceGuid.PcdCPUCorePrimaryStackSize|0x4000 > gEfiMdeModulePkgTokenSpaceGuid.PcdMaxVariableSize|0x2000 > gEfiMdeModulePkgTokenSpaceGuid.PcdMaxAuthVariableSize|0x2800 > +!if $(NETWORK_TLS_ENABLE) == TRUE > + # > + # The cumulative and individual VOLATILE variable size limits should be set > + # high enough for accommodating several and/or large CA certificates. > + # > + gEfiMdeModulePkgTokenSpaceGuid.PcdVariableStoreSize|0x80000 > + gEfiMdeModulePkgTokenSpaceGuid.PcdMaxVolatileVariableSize|0x40000 > +!endif > > # Size of the region used by UEFI in permanent memory (Reserved 64MB) > gArmPlatformTokenSpaceGuid.PcdSystemMemoryUefiRegionSize|0x04000000 > @@ -372,6 +376,12 @@ [Components.common] > # Networking stack > # > !include NetworkPkg/NetworkComponents.dsc.inc > +!if $(NETWORK_TLS_ENABLE) == TRUE > + NetworkPkg/TlsAuthConfigDxe/TlsAuthConfigDxe.inf { > + > + NULL|OvmfPkg/Library/TlsAuthConfigLib/TlsAuthConfigLib.inf > + } > +!endif > > # > # SCSI Bus and Disk Driver > diff --git a/ArmVirtPkg/ArmVirtQemuKernel.dsc b/ArmVirtPkg/ArmVirtQemuKernel.dsc > index 596e59739cab..3b0f04967a4b 100644 > --- a/ArmVirtPkg/ArmVirtQemuKernel.dsc > +++ b/ArmVirtPkg/ArmVirtQemuKernel.dsc > @@ -43,10 +43,6 @@ [Defines] > !error "NETWORK_SNP_ENABLE is IA32/X64/EBC only" > !endif > > -!if $(NETWORK_TLS_ENABLE) == TRUE > - !error "NETWORK_TLS_ENABLE is tracked at " > -!endif > - > !include NetworkPkg/NetworkDefines.dsc.inc > > !include ArmVirtPkg/ArmVirt.dsc.inc > @@ -118,6 +114,14 @@ [PcdsFixedAtBuild.common] > gArmPlatformTokenSpaceGuid.PcdCPUCorePrimaryStackSize|0x4000 > gEfiMdeModulePkgTokenSpaceGuid.PcdMaxVariableSize|0x2000 > gEfiMdeModulePkgTokenSpaceGuid.PcdMaxAuthVariableSize|0x2800 > +!if $(NETWORK_TLS_ENABLE) == TRUE > + # > + # The cumulative and individual VOLATILE variable size limits should be set > + # high enough for accommodating several and/or large CA certificates. > + # > + gEfiMdeModulePkgTokenSpaceGuid.PcdVariableStoreSize|0x80000 > + gEfiMdeModulePkgTokenSpaceGuid.PcdMaxVolatileVariableSize|0x40000 > +!endif > > # Size of the region used by UEFI in permanent memory (Reserved 64MB) > gArmPlatformTokenSpaceGuid.PcdSystemMemoryUefiRegionSize|0x04000000 > @@ -356,6 +360,12 @@ [Components.common] > # Networking stack > # > !include NetworkPkg/NetworkComponents.dsc.inc > +!if $(NETWORK_TLS_ENABLE) == TRUE > + NetworkPkg/TlsAuthConfigDxe/TlsAuthConfigDxe.inf { > + > + NULL|OvmfPkg/Library/TlsAuthConfigLib/TlsAuthConfigLib.inf > + } > +!endif > > # > # SCSI Bus and Disk Driver > Reviewed-by: Philippe Mathieu-Daude