public inbox for devel@edk2.groups.io
 help / color / mirror / Atom feed
From: Laszlo Ersek <lersek@redhat.com>
To: Qin Long <qin.long@intel.com>, edk2-devel@lists.01.org
Cc: ard.biesheuvel@linaro.org, ting.ye@intel.com,
	David Woodhouse <dwmw2@infradead.org>,
	ronald.cron@arm.com, jiaxin.wu@intel.com, glin@suse.com
Subject: Re: [PATCH v1 1/9] CryptoPkg/OpensslLib: Update INF files to support OpenSSL-1.1.0xx build.
Date: Wed, 22 Mar 2017 13:18:25 +0100	[thread overview]
Message-ID: <c60fc11c-cad1-7323-ac3c-3c365541ab6c@redhat.com> (raw)
In-Reply-To: <20170321155612.1192-2-qin.long@intel.com>

On 03/21/17 16:56, Qin Long wrote:
> Update OpensslLib INF files to support OpenSSL-1.1.0xx source build.
> The file list was generated from the latest OpenSSL-1.1.0e release.
> 
> Main changes to support OpensslLib build in this patch include:
> 1. Use "openssl" instead of "openssl-x.x.xx" as main source directory,
>    Also update include path in CryptoPkg.dec
> 2. Enable warnings in GCC builds;
> 3. Update Visual Studio build options to silence current possible build
>    warnings.
> 4. Move the default opensslconf.h to Include/openssl, and add one dummy
>    dso_conf.h for native UEFI build.
> 
> The OpensslLib module build was validated as
>   build -t VSXXXX -a XX -p CryptoPkg/CryptoPkg.dsc
>         -m CryptoPkg/Library/OpensslLib/OpensslLib.inf
> 
> (NOTE: The extra build options for ARM/RVCT/XCODE were kept, which expect
>        further optimizations from community)
> 
> Cc: Ting Ye <ting.ye@intel.com>
> Cc: Laszlo Ersek <lersek@redhat.com>
> Cc: Ard Biesheuvel <ard.biesheuvel@linaro.org>
> Cc: Gary Lin <glin@suse.com>
> Cc: Ronald Cron <ronald.cron@arm.com>
> Contributed-under: TianoCore Contribution Agreement 1.0
> Signed-off-by: David Woodhouse <dwmw2@infradead.org>
> Signed-off-by: Qin Long <qin.long@intel.com>
> ---
>  CryptoPkg/.gitignore                              |   3 +-
>  CryptoPkg/CryptoPkg.dec                           |   8 +-
>  CryptoPkg/Include/OpenSslSupport.h                |   6 +
>  CryptoPkg/Include/internal/dso_conf.h             |   0
>  CryptoPkg/Include/openssl/opensslconf.h           | 314 ++++++++
>  CryptoPkg/Library/OpensslLib/OpensslLib.inf       | 866 +++++++++++-----------
>  CryptoPkg/Library/OpensslLib/OpensslLibCrypto.inf | 791 ++++++++++----------
>  7 files changed, 1146 insertions(+), 842 deletions(-)
>  create mode 100644 CryptoPkg/Include/internal/dso_conf.h
>  create mode 100644 CryptoPkg/Include/openssl/opensslconf.h

When I diff OpensslLibCrypto.inf and OpensslLib.inf and, I get:

> --- OpensslLibCrypto.inf	2017-03-22 13:00:16.986301008 +0100
> +++ OpensslLib.inf	2017-03-22 13:00:16.986301008 +0100
> @@ -14,9 +14,9 @@
>  
>  [Defines]
>    INF_VERSION                    = 0x00010005
> -  BASE_NAME                      = OpensslLibCrypto
> -  MODULE_UNI_FILE                = OpensslLibCrypto.uni
> -  FILE_GUID                      = E29FC209-8B64-4500-BD20-AF4EAE47EA0E
> +  BASE_NAME                      = OpensslLib
> +  MODULE_UNI_FILE                = OpensslLib.uni
> +  FILE_GUID                      = C873A7D0-9824-409f-9B42-2C158B992E69
>    MODULE_TYPE                    = BASE
>    VERSION_STRING                 = 1.0
>    LIBRARY_CLASS                  = OpensslLib

These differences are OK.

> @@ -476,6 +476,45 @@
>    $(OPENSSL_PATH)/crypto/x509v3/v3_tlsf.c
>    $(OPENSSL_PATH)/crypto/x509v3/v3_utl.c
>    $(OPENSSL_PATH)/crypto/x509v3/v3err.c
> +  $(OPENSSL_PATH)/ssl/bio_ssl.c
> +  $(OPENSSL_PATH)/ssl/d1_lib.c
> +  $(OPENSSL_PATH)/ssl/d1_msg.c
> +  $(OPENSSL_PATH)/ssl/d1_srtp.c
> +  $(OPENSSL_PATH)/ssl/methods.c
> +  $(OPENSSL_PATH)/ssl/pqueue.c
> +  $(OPENSSL_PATH)/ssl/record/dtls1_bitmap.c
> +  $(OPENSSL_PATH)/ssl/record/rec_layer_d1.c
> +  $(OPENSSL_PATH)/ssl/record/rec_layer_s3.c
> +  $(OPENSSL_PATH)/ssl/record/ssl3_buffer.c
> +  $(OPENSSL_PATH)/ssl/record/ssl3_record.c
> +  $(OPENSSL_PATH)/ssl/s3_cbc.c
> +  $(OPENSSL_PATH)/ssl/s3_enc.c
> +  $(OPENSSL_PATH)/ssl/s3_lib.c
> +  $(OPENSSL_PATH)/ssl/s3_msg.c
> +  $(OPENSSL_PATH)/ssl/ssl_asn1.c
> +  $(OPENSSL_PATH)/ssl/ssl_cert.c
> +  $(OPENSSL_PATH)/ssl/ssl_ciph.c
> +  $(OPENSSL_PATH)/ssl/ssl_conf.c
> +  $(OPENSSL_PATH)/ssl/ssl_err.c
> +  $(OPENSSL_PATH)/ssl/ssl_init.c
> +  $(OPENSSL_PATH)/ssl/ssl_lib.c
> +  $(OPENSSL_PATH)/ssl/ssl_mcnf.c
> +  $(OPENSSL_PATH)/ssl/ssl_rsa.c
> +  $(OPENSSL_PATH)/ssl/ssl_sess.c
> +  $(OPENSSL_PATH)/ssl/ssl_stat.c
> +  $(OPENSSL_PATH)/ssl/ssl_txt.c
> +  $(OPENSSL_PATH)/ssl/ssl_utst.c
> +  $(OPENSSL_PATH)/ssl/statem/statem.c
> +  $(OPENSSL_PATH)/ssl/statem/statem_clnt.c
> +  $(OPENSSL_PATH)/ssl/statem/statem_dtls.c
> +  $(OPENSSL_PATH)/ssl/statem/statem_lib.c
> +  $(OPENSSL_PATH)/ssl/statem/statem_srvr.c
> +  $(OPENSSL_PATH)/ssl/t1_enc.c
> +  $(OPENSSL_PATH)/ssl/t1_ext.c
> +  $(OPENSSL_PATH)/ssl/t1_lib.c
> +  $(OPENSSL_PATH)/ssl/t1_reneg.c
> +  $(OPENSSL_PATH)/ssl/t1_trce.c
> +  $(OPENSSL_PATH)/ssl/tls_srp.c
>  # Autogenerated files list ends here
>  
>  [Packages]

Also OK.

> @@ -492,23 +531,25 @@
>    #
>    # Disables the following Visual Studio compiler warnings brought by openssl source,
>    # so we do not break the build with /WX option:
> -  # C4090: 'function' : different 'const' qualifiers
> -  # C4244: conversion from type1 to type2, possible loss of data
> -  # C4245: conversion from type1 to type2, signed/unsigned mismatch
> -  # C4267: conversion from size_t to type, possible loss of data
> -  # C4389: 'operator' : signed/unsigned mismatch (xxxx)
> -  # C4702: unreachable code
> -  # C4706: assignment within conditional expression
> +  #   C4090: 'function' : different 'const' qualifiers
> +  #   C4244: conversion from type1 to type2, possible loss of data
> +  #   C4245: conversion from type1 to type2, signed/unsigned mismatch
> +  #   C4267: conversion from size_t to type, possible loss of data
> +  #   C4389: 'operator' : signed/unsigned mismatch (xxxx)
> +  #   C4702: unreachable code
> +  #   C4706: assignment within conditional expression

Different whitespace. These differences should not exist.

>    #
>    MSFT:*_*_IA32_CC_FLAGS   = -U_WIN32 -U_WIN64 -U_MSC_VER $(OPENSSL_FLAGS) /wd4090 /wd4244 /wd4245 /wd4267 /wd4389 /wd4702 /wd4706
>    MSFT:*_*_X64_CC_FLAGS    = -U_WIN32 -U_WIN64 -U_MSC_VER $(OPENSSL_FLAGS) /wd4090 /wd4244 /wd4245 /wd4267 /wd4389 /wd4702 /wd4706
> +  MSFT:*_*_IPF_CC_FLAGS    = -U_WIN32 -U_WIN64 -U_MSC_VER $(OPENSSL_FLAGS) /wd4090 /wd4244 /wd4245 /wd4267 /wd4389 /wd4702 /wd4706

The IPF flags are inconsistent between the two INF files.

>  
> -  INTEL:*_*_IA32_CC_FLAGS   = -U_WIN32 -U_WIN64 -U_MSC_VER -U__ICC $(OPENSSL_FLAGS) /w
> -  INTEL:*_*_X64_CC_FLAGS    = -U_WIN32 -U_WIN64 -U_MSC_VER -U__ICC $(OPENSSL_FLAGS) /w
> -  INTEL:*_*_IPF_CC_FLAGS    = -U_WIN32 -U_WIN64 -U_MSC_VER -U__ICC $(OPENSSL_FLAGS) /w
> +  INTEL:*_*_IA32_CC_FLAGS  = -U_WIN32 -U_WIN64 -U_MSC_VER -U__ICC $(OPENSSL_FLAGS) /w
> +  INTEL:*_*_X64_CC_FLAGS   = -U_WIN32 -U_WIN64 -U_MSC_VER -U__ICC $(OPENSSL_FLAGS) /w
> +  INTEL:*_*_IPF_CC_FLAGS   = -U_WIN32 -U_WIN64 -U_MSC_VER -U__ICC $(OPENSSL_FLAGS) /w

The whitespace is not in sync between the two INF files.

>  
>    GCC:*_*_IA32_CC_FLAGS    = -U_WIN32 -U_WIN64 $(OPENSSL_FLAGS)
>    GCC:*_*_X64_CC_FLAGS     = -U_WIN32 -U_WIN64 $(OPENSSL_FLAGS) -DNO_MSABI_VA_FUNCS
> +  GCC:*_*_IPF_CC_FLAGS     = -U_WIN32 -U_WIN64 $(OPENSSL_FLAGS)
>    GCC:*_*_ARM_CC_FLAGS     = $(OPENSSL_FLAGS)
>    GCC:*_*_AARCH64_CC_FLAGS = $(OPENSSL_FLAGS)
>  

The IPF flags are inconsistent between the two INF files.

Thanks
Laszlo


  parent reply	other threads:[~2017-03-22 12:18 UTC|newest]

Thread overview: 24+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2017-03-21 15:56 [PATCH v1 0/9] *** Upgrade CryptoPkg to use the latest OpenSSL 1.1.0xx/stable release *** Qin Long
2017-03-21 15:56 ` [PATCH v1 1/9] CryptoPkg/OpensslLib: Update INF files to support OpenSSL-1.1.0xx build Qin Long
2017-03-22 12:02   ` Laszlo Ersek
2017-03-22 12:18   ` Laszlo Ersek [this message]
2017-03-21 15:56 ` [PATCH v1 2/9] CryptoPkg/OpensslLib: Remove patch file and installation scripts Qin Long
2017-03-22 12:05   ` Laszlo Ersek
2017-03-21 15:56 ` [PATCH v1 3/9] CryptoPkg: Fix handling of &strcmp function pointers Qin Long
2017-03-22 10:11   ` Gary Lin
2017-03-23  2:16     ` Long, Qin
2017-03-23  3:39       ` Long, Qin
2017-03-21 15:56 ` [PATCH v1 4/9] CryptoPkg/OpensslLib: Use new Perl script for file list generation Qin Long
2017-03-21 15:56 ` [PATCH v1 5/9] CryptoPkg: Clean-up CRT Library Wrapper Qin Long
2017-03-21 15:56 ` [PATCH v1 6/9] CryptoPkg: Add extra build option to disable VS build warning Qin Long
2017-03-21 15:56 ` [PATCH v1 7/9] CryptoPkg: Update HMAC Wrapper implementation with opaque HMAC_CTX object Qin Long
2017-03-21 15:56 ` [PATCH v1 8/9] CryptoPkg: Update PK Ciphers Wrapper Implementations work with opaque objects Qin Long
2017-03-21 15:56 ` [PATCH v1 9/9] CryptoPkg/TlsLib: Update TLS Wrapper Library to align with OpenSSL changes Qin Long
2017-03-21 17:42   ` Palmer, Thomas
2017-03-22  1:32     ` Long, Qin
2017-03-23  1:20       ` Wu, Jiaxin
2017-03-23 16:23         ` Palmer, Thomas
2017-03-22  2:22 ` [PATCH v1 0/9] *** Upgrade CryptoPkg to use the latest OpenSSL 1.1.0xx/stable release *** Gao, Liming
2017-03-22  2:44   ` Long, Qin
2017-03-22 13:02 ` Laszlo Ersek
2017-03-22 16:20   ` Long, Qin

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-list from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=c60fc11c-cad1-7323-ac3c-3c365541ab6c@redhat.com \
    --to=devel@edk2.groups.io \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox