public inbox for devel@edk2.groups.io
 help / color / mirror / Atom feed
* [PATCH 1/1] SecurityPkg/Library/Tpm2DeviceLibDTpm: fix s/Constructor/CONSTRUCTOR
@ 2018-08-09 14:33 marcandre.lureau
  2018-08-09 15:09 ` Laszlo Ersek
                   ` (3 more replies)
  0 siblings, 4 replies; 5+ messages in thread
From: marcandre.lureau @ 2018-08-09 14:33 UTC (permalink / raw)
  To: edk2-devel; +Cc: Marc-André Lureau, Laszlo Ersek, Zhang Chao B, Long Qin

From: Marc-André Lureau <marcandre.lureau@redhat.com>

The library constructor is not being called because of the typo,
causing TPM2 detection/initialization to fail.

This fixes OVMF TPM2 regression since commit f15cb995bb38.
https://bugzilla.tianocore.org/show_bug.cgi?id=1075

Cc: Laszlo Ersek <lersek@redhat.com>
Cc: Zhang Chao B <chao.b.zhang@intel.com>
Cc: Long Qin <qin.long@intel.com>
Fixes: f15cb995bb3880b77e15afe6facd3da05e599a17
Contributed-under: TianoCore Contribution Agreement 1.1
Reported-by:  Ricardo Araújo <ricardo@lsd.ufcg.edu.br>
Signed-off-by: Marc-André Lureau <marcandre.lureau@redhat.com>
---
 SecurityPkg/Library/Tpm2DeviceLibDTpm/Tpm2DeviceLibDTpm.inf | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/SecurityPkg/Library/Tpm2DeviceLibDTpm/Tpm2DeviceLibDTpm.inf b/SecurityPkg/Library/Tpm2DeviceLibDTpm/Tpm2DeviceLibDTpm.inf
index b6867bc4fff4..c6d23c93fe93 100644
--- a/SecurityPkg/Library/Tpm2DeviceLibDTpm/Tpm2DeviceLibDTpm.inf
+++ b/SecurityPkg/Library/Tpm2DeviceLibDTpm/Tpm2DeviceLibDTpm.inf
@@ -28,7 +28,7 @@
   MODULE_TYPE                    = BASE
   VERSION_STRING                 = 1.0
   LIBRARY_CLASS                  = Tpm2DeviceLib|PEIM DXE_DRIVER DXE_RUNTIME_DRIVER DXE_SMM_DRIVER UEFI_APPLICATION UEFI_DRIVER
-  Constructor                    = Tpm2DeviceLibConstructor
+  CONSTRUCTOR                    = Tpm2DeviceLibConstructor
 #
 # The following information is for reference only and not required by the build tools.
 #
-- 
2.18.0.547.g1d89318c48



^ permalink raw reply related	[flat|nested] 5+ messages in thread

* Re: [PATCH 1/1] SecurityPkg/Library/Tpm2DeviceLibDTpm: fix s/Constructor/CONSTRUCTOR
  2018-08-09 14:33 [PATCH 1/1] SecurityPkg/Library/Tpm2DeviceLibDTpm: fix s/Constructor/CONSTRUCTOR marcandre.lureau
@ 2018-08-09 15:09 ` Laszlo Ersek
  2018-08-09 15:39 ` Zhang, Chao B
                   ` (2 subsequent siblings)
  3 siblings, 0 replies; 5+ messages in thread
From: Laszlo Ersek @ 2018-08-09 15:09 UTC (permalink / raw)
  To: marcandre.lureau, edk2-devel; +Cc: Zhang Chao B, Long Qin, Jiewen Yao

On 08/09/18 16:33, marcandre.lureau@redhat.com wrote:
> From: Marc-André Lureau <marcandre.lureau@redhat.com>
> 
> The library constructor is not being called because of the typo,
> causing TPM2 detection/initialization to fail.
> 
> This fixes OVMF TPM2 regression since commit f15cb995bb38.
> https://bugzilla.tianocore.org/show_bug.cgi?id=1075
> 
> Cc: Laszlo Ersek <lersek@redhat.com>
> Cc: Zhang Chao B <chao.b.zhang@intel.com>
> Cc: Long Qin <qin.long@intel.com>
> Fixes: f15cb995bb3880b77e15afe6facd3da05e599a17
> Contributed-under: TianoCore Contribution Agreement 1.1
> Reported-by:  Ricardo Araújo <ricardo@lsd.ufcg.edu.br>
> Signed-off-by: Marc-André Lureau <marcandre.lureau@redhat.com>
> ---
>  SecurityPkg/Library/Tpm2DeviceLibDTpm/Tpm2DeviceLibDTpm.inf | 2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)
> 
> diff --git a/SecurityPkg/Library/Tpm2DeviceLibDTpm/Tpm2DeviceLibDTpm.inf b/SecurityPkg/Library/Tpm2DeviceLibDTpm/Tpm2DeviceLibDTpm.inf
> index b6867bc4fff4..c6d23c93fe93 100644
> --- a/SecurityPkg/Library/Tpm2DeviceLibDTpm/Tpm2DeviceLibDTpm.inf
> +++ b/SecurityPkg/Library/Tpm2DeviceLibDTpm/Tpm2DeviceLibDTpm.inf
> @@ -28,7 +28,7 @@
>    MODULE_TYPE                    = BASE
>    VERSION_STRING                 = 1.0
>    LIBRARY_CLASS                  = Tpm2DeviceLib|PEIM DXE_DRIVER DXE_RUNTIME_DRIVER DXE_SMM_DRIVER UEFI_APPLICATION UEFI_DRIVER
> -  Constructor                    = Tpm2DeviceLibConstructor
> +  CONSTRUCTOR                    = Tpm2DeviceLibConstructor
>  #
>  # The following information is for reference only and not required by the build tools.
>  #
> 

+ Jiewen (see "SecurityPkg" in "Maintainers.txt").

Reviewed-by: Laszlo Ersek <lersek@redhat.com>

I will wait one day so that Chao, Jiewen and/or Qin can ACK the patch as
well. I will push the patch tomorrow (definitely before the upcoming
stable tag).

Note: I would like to push this patch myself because of the non-ASCII
characters in the metadata. Previously, similar patches have been messed
up, regarding the "Author" field (see 4cc2b63bd829 and 73ee3abab1a1). I
should be able to handle the git-am / git-push cleanly on my side though
(see a39e72267034 and ab9e11da6651).

Thanks!
Laszlo


^ permalink raw reply	[flat|nested] 5+ messages in thread

* Re: [PATCH 1/1] SecurityPkg/Library/Tpm2DeviceLibDTpm: fix s/Constructor/CONSTRUCTOR
  2018-08-09 14:33 [PATCH 1/1] SecurityPkg/Library/Tpm2DeviceLibDTpm: fix s/Constructor/CONSTRUCTOR marcandre.lureau
  2018-08-09 15:09 ` Laszlo Ersek
@ 2018-08-09 15:39 ` Zhang, Chao B
  2018-08-09 15:39 ` Zhang, Chao B
  2018-08-09 17:28 ` Laszlo Ersek
  3 siblings, 0 replies; 5+ messages in thread
From: Zhang, Chao B @ 2018-08-09 15:39 UTC (permalink / raw)
  To: marcandre.lureau@redhat.com, edk2-devel@lists.01.org
  Cc: Laszlo Ersek, Long, Qin

HI Lureau:
   Thanks for you investigation. It is my typo! The reason why we didn’t have this issue is that we only use TPM2InstanceLib.
That lib use the correct definition.

-----Original Message-----
From: edk2-devel [mailto:edk2-devel-bounces@lists.01.org] On Behalf Of marcandre.lureau@redhat.com
Sent: Thursday, August 9, 2018 10:33 PM
To: edk2-devel@lists.01.org
Cc: Laszlo Ersek <lersek@redhat.com>; Zhang, Chao B <chao.b.zhang@intel.com>; Long, Qin <qin.long@intel.com>
Subject: [edk2] [PATCH 1/1] SecurityPkg/Library/Tpm2DeviceLibDTpm: fix s/Constructor/CONSTRUCTOR

From: Marc-André Lureau <marcandre.lureau@redhat.com>

The library constructor is not being called because of the typo, causing TPM2 detection/initialization to fail.

This fixes OVMF TPM2 regression since commit f15cb995bb38.
https://bugzilla.tianocore.org/show_bug.cgi?id=1075

Cc: Laszlo Ersek <lersek@redhat.com>
Cc: Zhang Chao B <chao.b.zhang@intel.com>
Cc: Long Qin <qin.long@intel.com>
Fixes: f15cb995bb3880b77e15afe6facd3da05e599a17
Contributed-under: TianoCore Contribution Agreement 1.1
Reported-by:  Ricardo Araújo <ricardo@lsd.ufcg.edu.br>
Signed-off-by: Marc-André Lureau <marcandre.lureau@redhat.com>
---
 SecurityPkg/Library/Tpm2DeviceLibDTpm/Tpm2DeviceLibDTpm.inf | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/SecurityPkg/Library/Tpm2DeviceLibDTpm/Tpm2DeviceLibDTpm.inf b/SecurityPkg/Library/Tpm2DeviceLibDTpm/Tpm2DeviceLibDTpm.inf
index b6867bc4fff4..c6d23c93fe93 100644
--- a/SecurityPkg/Library/Tpm2DeviceLibDTpm/Tpm2DeviceLibDTpm.inf
+++ b/SecurityPkg/Library/Tpm2DeviceLibDTpm/Tpm2DeviceLibDTpm.inf
@@ -28,7 +28,7 @@
   MODULE_TYPE                    = BASE
   VERSION_STRING                 = 1.0
   LIBRARY_CLASS                  = Tpm2DeviceLib|PEIM DXE_DRIVER DXE_RUNTIME_DRIVER DXE_SMM_DRIVER UEFI_APPLICATION UEFI_DRIVER
-  Constructor                    = Tpm2DeviceLibConstructor
+  CONSTRUCTOR                    = Tpm2DeviceLibConstructor
 #
 # The following information is for reference only and not required by the build tools.
 #
--
2.18.0.547.g1d89318c48

_______________________________________________
edk2-devel mailing list
edk2-devel@lists.01.org
https://lists.01.org/mailman/listinfo/edk2-devel

^ permalink raw reply related	[flat|nested] 5+ messages in thread

* Re: [PATCH 1/1] SecurityPkg/Library/Tpm2DeviceLibDTpm: fix s/Constructor/CONSTRUCTOR
  2018-08-09 14:33 [PATCH 1/1] SecurityPkg/Library/Tpm2DeviceLibDTpm: fix s/Constructor/CONSTRUCTOR marcandre.lureau
  2018-08-09 15:09 ` Laszlo Ersek
  2018-08-09 15:39 ` Zhang, Chao B
@ 2018-08-09 15:39 ` Zhang, Chao B
  2018-08-09 17:28 ` Laszlo Ersek
  3 siblings, 0 replies; 5+ messages in thread
From: Zhang, Chao B @ 2018-08-09 15:39 UTC (permalink / raw)
  To: marcandre.lureau@redhat.com, edk2-devel@lists.01.org
  Cc: Laszlo Ersek, Long, Qin

Reviewed-by : Chao Zhang <chao.b.zhang@intel.com>

-----Original Message-----
From: edk2-devel [mailto:edk2-devel-bounces@lists.01.org] On Behalf Of marcandre.lureau@redhat.com
Sent: Thursday, August 9, 2018 10:33 PM
To: edk2-devel@lists.01.org
Cc: Laszlo Ersek <lersek@redhat.com>; Zhang, Chao B <chao.b.zhang@intel.com>; Long, Qin <qin.long@intel.com>
Subject: [edk2] [PATCH 1/1] SecurityPkg/Library/Tpm2DeviceLibDTpm: fix s/Constructor/CONSTRUCTOR

From: Marc-André Lureau <marcandre.lureau@redhat.com>

The library constructor is not being called because of the typo, causing TPM2 detection/initialization to fail.

This fixes OVMF TPM2 regression since commit f15cb995bb38.
https://bugzilla.tianocore.org/show_bug.cgi?id=1075

Cc: Laszlo Ersek <lersek@redhat.com>
Cc: Zhang Chao B <chao.b.zhang@intel.com>
Cc: Long Qin <qin.long@intel.com>
Fixes: f15cb995bb3880b77e15afe6facd3da05e599a17
Contributed-under: TianoCore Contribution Agreement 1.1
Reported-by:  Ricardo Araújo <ricardo@lsd.ufcg.edu.br>
Signed-off-by: Marc-André Lureau <marcandre.lureau@redhat.com>
---
 SecurityPkg/Library/Tpm2DeviceLibDTpm/Tpm2DeviceLibDTpm.inf | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/SecurityPkg/Library/Tpm2DeviceLibDTpm/Tpm2DeviceLibDTpm.inf b/SecurityPkg/Library/Tpm2DeviceLibDTpm/Tpm2DeviceLibDTpm.inf
index b6867bc4fff4..c6d23c93fe93 100644
--- a/SecurityPkg/Library/Tpm2DeviceLibDTpm/Tpm2DeviceLibDTpm.inf
+++ b/SecurityPkg/Library/Tpm2DeviceLibDTpm/Tpm2DeviceLibDTpm.inf
@@ -28,7 +28,7 @@
   MODULE_TYPE                    = BASE
   VERSION_STRING                 = 1.0
   LIBRARY_CLASS                  = Tpm2DeviceLib|PEIM DXE_DRIVER DXE_RUNTIME_DRIVER DXE_SMM_DRIVER UEFI_APPLICATION UEFI_DRIVER
-  Constructor                    = Tpm2DeviceLibConstructor
+  CONSTRUCTOR                    = Tpm2DeviceLibConstructor
 #
 # The following information is for reference only and not required by the build tools.
 #
--
2.18.0.547.g1d89318c48

_______________________________________________
edk2-devel mailing list
edk2-devel@lists.01.org
https://lists.01.org/mailman/listinfo/edk2-devel

^ permalink raw reply related	[flat|nested] 5+ messages in thread

* Re: [PATCH 1/1] SecurityPkg/Library/Tpm2DeviceLibDTpm: fix s/Constructor/CONSTRUCTOR
  2018-08-09 14:33 [PATCH 1/1] SecurityPkg/Library/Tpm2DeviceLibDTpm: fix s/Constructor/CONSTRUCTOR marcandre.lureau
                   ` (2 preceding siblings ...)
  2018-08-09 15:39 ` Zhang, Chao B
@ 2018-08-09 17:28 ` Laszlo Ersek
  3 siblings, 0 replies; 5+ messages in thread
From: Laszlo Ersek @ 2018-08-09 17:28 UTC (permalink / raw)
  To: marcandre.lureau, edk2-devel; +Cc: Zhang Chao B, Long Qin

On 08/09/18 16:33, marcandre.lureau@redhat.com wrote:
> From: Marc-André Lureau <marcandre.lureau@redhat.com>
>
> The library constructor is not being called because of the typo,
> causing TPM2 detection/initialization to fail.
>
> This fixes OVMF TPM2 regression since commit f15cb995bb38.
> https://bugzilla.tianocore.org/show_bug.cgi?id=1075
>
> Cc: Laszlo Ersek <lersek@redhat.com>
> Cc: Zhang Chao B <chao.b.zhang@intel.com>
> Cc: Long Qin <qin.long@intel.com>
> Fixes: f15cb995bb3880b77e15afe6facd3da05e599a17
> Contributed-under: TianoCore Contribution Agreement 1.1
> Reported-by:  Ricardo Araújo <ricardo@lsd.ufcg.edu.br>
> Signed-off-by: Marc-André Lureau <marcandre.lureau@redhat.com>
> ---
>  SecurityPkg/Library/Tpm2DeviceLibDTpm/Tpm2DeviceLibDTpm.inf | 2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)
>
> diff --git a/SecurityPkg/Library/Tpm2DeviceLibDTpm/Tpm2DeviceLibDTpm.inf b/SecurityPkg/Library/Tpm2DeviceLibDTpm/Tpm2DeviceLibDTpm.inf
> index b6867bc4fff4..c6d23c93fe93 100644
> --- a/SecurityPkg/Library/Tpm2DeviceLibDTpm/Tpm2DeviceLibDTpm.inf
> +++ b/SecurityPkg/Library/Tpm2DeviceLibDTpm/Tpm2DeviceLibDTpm.inf
> @@ -28,7 +28,7 @@
>    MODULE_TYPE                    = BASE
>    VERSION_STRING                 = 1.0
>    LIBRARY_CLASS                  = Tpm2DeviceLib|PEIM DXE_DRIVER DXE_RUNTIME_DRIVER DXE_SMM_DRIVER UEFI_APPLICATION UEFI_DRIVER
> -  Constructor                    = Tpm2DeviceLibConstructor
> +  CONSTRUCTOR                    = Tpm2DeviceLibConstructor
>  #
>  # The following information is for reference only and not required by the build tools.
>  #
>

I've pushed this patch: commit 3781f14c31e0.

However, Marc-André, your git setup does not seem to be correct for
edk2. Your patch email was encoded as base64 (which is totally fine per
se). After "git-am" failed to apply your patch initially, I hand-decoded
the base64 blob in your patch email, and investigated the output. Your
patch contains LF line endings, not CRLF ones -- not just on the line
you introduced, but also on the line you removed, and on the context
lines:

  00000470  20 20 3d 20 31 2e 30 0a  20 20 20 4c 49 42 52 41  |  = 1.0.   LIBRA|
                                 ^^
  00000480  52 59 5f 43 4c 41 53 53  20 20 20 20 20 20 20 20  |RY_CLASS        |
  00000490  20 20 20 20 20 20 20 20  20 20 3d 20 54 70 6d 32  |          = Tpm2|
  000004a0  44 65 76 69 63 65 4c 69  62 7c 50 45 49 4d 20 44  |DeviceLib|PEIM D|
  000004b0  58 45 5f 44 52 49 56 45  52 20 44 58 45 5f 52 55  |XE_DRIVER DXE_RU|
  000004c0  4e 54 49 4d 45 5f 44 52  49 56 45 52 20 44 58 45  |NTIME_DRIVER DXE|
  000004d0  5f 53 4d 4d 5f 44 52 49  56 45 52 20 55 45 46 49  |_SMM_DRIVER UEFI|
  000004e0  5f 41 50 50 4c 49 43 41  54 49 4f 4e 20 55 45 46  |_APPLICATION UEF|
  000004f0  49 5f 44 52 49 56 45 52  0a 2d 20 20 43 6f 6e 73  |I_DRIVER.-  Cons|
                                     ^^
  00000500  74 72 75 63 74 6f 72 20  20 20 20 20 20 20 20 20  |tructor         |
  00000510  20 20 20 20 20 20 20 20  20 20 20 3d 20 54 70 6d  |           = Tpm|
  00000520  32 44 65 76 69 63 65 4c  69 62 43 6f 6e 73 74 72  |2DeviceLibConstr|
  00000530  75 63 74 6f 72 0a 2b 20  20 43 4f 4e 53 54 52 55  |uctor.+  CONSTRU|
                           ^^
  00000540  43 54 4f 52 20 20 20 20  20 20 20 20 20 20 20 20  |CTOR            |
  00000550  20 20 20 20 20 20 20 20  3d 20 54 70 6d 32 44 65  |        = Tpm2De|
  00000560  76 69 63 65 4c 69 62 43  6f 6e 73 74 72 75 63 74  |viceLibConstruct|
  00000570  6f 72 0a 20 23 0a 20 23  20 54 68 65 20 66 6f 6c  |or. #. # The fol|
                  ^^       ^^

I applied your patch with "git am --ignore-whitespace", then converted
the result back to CRLF with "unix2dos", and then I squashed that change
into your patch.

Please update your git config (for edk2) as described in:

  https://github.com/tianocore/tianocore.github.io/wiki/Laszlo's-unkempt-git-guide-for-edk2-contributors-and-maintainers#contrib-05

Thanks!
Laszlo


^ permalink raw reply	[flat|nested] 5+ messages in thread

end of thread, other threads:[~2018-08-09 17:28 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2018-08-09 14:33 [PATCH 1/1] SecurityPkg/Library/Tpm2DeviceLibDTpm: fix s/Constructor/CONSTRUCTOR marcandre.lureau
2018-08-09 15:09 ` Laszlo Ersek
2018-08-09 15:39 ` Zhang, Chao B
2018-08-09 15:39 ` Zhang, Chao B
2018-08-09 17:28 ` Laszlo Ersek

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox