Buildroot Archive on lore.kernel.org
 help / color / mirror / Atom feed
* [Buildroot] [PATCH 1/2] package/ibm-sw-tpm2: bump to version rev183-2024-03-27
@ 2024-07-21  7:40 Fabrice Fontaine
  2024-07-21  7:40 ` [Buildroot] [PATCH 2/2] package/ibm-sw-tpm2: fix build with openssl 3.3.x Fabrice Fontaine
                   ` (2 more replies)
  0 siblings, 3 replies; 5+ messages in thread
From: Fabrice Fontaine @ 2024-07-21  7:40 UTC (permalink / raw)
  To: buildroot; +Cc: Philippe Reynes, Fabrice Fontaine

- Refresh first patch
- Drop second patch (fix differentl by
  https://sourceforge.net/p/ibmswtpm2/tpm2/ci/ebe82ac82fef97feddc558f3c3ad16baf67e6921/)

Signed-off-by: Fabrice Fontaine <fontaine.fabrice@gmail.com>
---
 ...01-Use-LONG_BIT-to-define-RADIX_BITS.patch | 65 +++++++++----------
 .../0002-Add-support-for-OpenSSL-3-2-x.patch  | 28 --------
 package/ibm-sw-tpm2/ibm-sw-tpm2.hash          |  2 +-
 package/ibm-sw-tpm2/ibm-sw-tpm2.mk            |  2 +-
 4 files changed, 33 insertions(+), 64 deletions(-)
 delete mode 100644 package/ibm-sw-tpm2/0002-Add-support-for-OpenSSL-3-2-x.patch

diff --git a/package/ibm-sw-tpm2/0001-Use-LONG_BIT-to-define-RADIX_BITS.patch b/package/ibm-sw-tpm2/0001-Use-LONG_BIT-to-define-RADIX_BITS.patch
index bb5d3a96ee..8d83116dfc 100644
--- a/package/ibm-sw-tpm2/0001-Use-LONG_BIT-to-define-RADIX_BITS.patch
+++ b/package/ibm-sw-tpm2/0001-Use-LONG_BIT-to-define-RADIX_BITS.patch
@@ -14,52 +14,49 @@ Signed-off-by: Thomas Petazzoni <thomas.petazzoni@bootlin.com>
 Signed-off-by: Vincent Fazio <vfazio@gmail.com>
 [Bernd: rebased for git rev 5452af422edeff70fcae8ea99dd28a0922051d7b]
 Signed-off-by: Bernd Kuhls <bernd@kuhls.net>
+[Fabrice: rebase for rev183-2024-03-27]
+Signed-off-by: Fabrice Fontaine <fontaine.fabrice@gmail.com>
 ---
  src/LibSupport.h     | 21 +++------------------
  src/TcpServerPosix.c |  1 +
  src/makefile         |  2 ++
  3 files changed, 6 insertions(+), 18 deletions(-)
 
-diff --git a/src/LibSupport.h b/src/LibSupport.h
+diff --git a/src/tpm_radix.h b/src/tpm_radix.h
 index 5055560..48b1e16 100644
---- a/src/LibSupport.h
-+++ b/src/LibSupport.h
-@@ -64,32 +64,9 @@
- #ifndef _LIB_SUPPORT_H_
- #define _LIB_SUPPORT_H_
- 
--/* kgold added power and s390 */
+--- a/src/tpm_radix.h
++++ b/src/tpm_radix.h
+@@ -61,27 +61,9 @@
+ //** Introduction
+ // Common defines for supporting large numbers and cryptographic buffer sizing.
+ //*********************
 -#ifndef RADIX_BITS
--#   if defined(__x86_64__) || defined(__x86_64)				\
--    || defined(__amd64__) || defined(__amd64)				\
--    || defined(_WIN64) || defined(_M_X64)		 		\
--    || defined(_M_ARM64) || defined(__aarch64__) 			\
--    || defined(__powerpc64__) || defined(__PPC64__) || defined(__ppc64__) \
--    || defined(__s390x__)
--#       define RADIX_BITS                      64
--#   elif defined(__i386__) || defined(__i386) || defined(i386)		\
--    || defined(_WIN32) || defined(_M_IX86)				\
--    || defined(_M_ARM) || defined(__arm__) || defined(__thumb__)	\
--    || defined(__powerpc__) || defined(__PPC__)
--#       define RADIX_BITS                      32
--#   elif defined(__riscv) || defined(__riscv__)
--#       if __riscv_xlen == 32
--#            define RADIX_BITS                 32
--#       elif __riscv_xlen == 64
--#            define RADIX_BITS                 64
--#       else
--#            error Unsupported __riscv_xlen value
--#       endif
--#   else
--#       error Unable to determine RADIX_BITS from compiler environment
--#   endif
--#endif // RADIX_BITS
+-#  if defined(__x86_64__) || defined(__x86_64) || defined(__amd64__)	\
+-    || defined(__amd64) || defined(_WIN64) || defined(_M_X64) || defined(_M_ARM64) \
+-    || defined(__aarch64__) || defined(__PPC64__) || defined(__s390x__) \
+-    || defined(__powerpc64__) || defined(__ppc64__)
+-#    define RADIX_BITS 64
+-#  elif defined(__i386__) || defined(__i386) || defined(i386) || defined(_WIN32) \
+-    || defined(_M_IX86)
+-#    define RADIX_BITS 32
+-#  elif defined(_M_ARM) || defined(__arm__) || defined(__thumb__)
+-#    define RADIX_BITS 32
+-#  elif defined(__riscv)
+-// __riscv and __riscv_xlen are standardized by the RISC-V community and should be available
+-// on any compliant compiler.
+-//
+-// https://github.com/riscv-non-isa/riscv-toolchain-conventions
+-#    define RADIX_BITS __riscv_xlen
+-#  else
+-#    error Unable to determine RADIX_BITS from compiler environment
+-#  endif
+-#endif  // RADIX_BITS
 +#include <limits.h>
 +
 +#define RADIX_BITS LONG_BIT
  
- // These macros use the selected libraries to the proper include files.
- #define LIB_QUOTE(_STRING_) #_STRING_
+ #if RADIX_BITS == 64
+ #  define RADIX_BYTES 8
 diff --git a/src/TcpServerPosix.c b/src/TcpServerPosix.c
 index cad0402..6293cdd 100644
 --- a/src/TcpServerPosix.c
diff --git a/package/ibm-sw-tpm2/0002-Add-support-for-OpenSSL-3-2-x.patch b/package/ibm-sw-tpm2/0002-Add-support-for-OpenSSL-3-2-x.patch
deleted file mode 100644
index 6732efce8c..0000000000
--- a/package/ibm-sw-tpm2/0002-Add-support-for-OpenSSL-3-2-x.patch
+++ /dev/null
@@ -1,28 +0,0 @@
-From beea0f97b3c95ec69f3e269df1af87eb2cdd3c46 Mon Sep 17 00:00:00 2001
-From: Otto Hollmann <otto@hollmann.cz>
-Date: Tue, 12 Dec 2023 13:58:32 +0100
-Subject: [PATCH] Add support for OpenSSL 3.2.x
-
-Upstream: https://github.com/kgoldman/ibmswtpm2/pull/13
-Signed-off-by: Fabrice Fontaine <fontaine.fabrice@gmail.com>
----
- src/TpmToOsslMath.h | 4 ++--
- 1 file changed, 2 insertions(+), 2 deletions(-)
-
-diff --git a/src/TpmToOsslMath.h b/src/TpmToOsslMath.h
-index 0b18191..1271937 100644
---- a/src/TpmToOsslMath.h
-+++ b/src/TpmToOsslMath.h
-@@ -76,10 +76,10 @@
-  * As of release 3.0.0, OPENSSL_VERSION_NUMBER is a combination of the
-  * major (M), minor (NN) and patch (PP) version into a single integer 0xMNN00PP0L
-  */
--#if OPENSSL_VERSION_NUMBER > 0x30100ff0L
-+#if OPENSSL_VERSION_NUMBER > 0x30200ff0L
- // Check the bignum_st definition in crypto/bn/bn_lcl.h or crypto/bn/bn_local.h and either update
- // the version check or provide the new definition for this version.
--// Currently safe for all 3.1.x
-+// Currently safe for all 3.2.x
- #   error Untested OpenSSL version
- #elif OPENSSL_VERSION_NUMBER >= 0x10100000L
- // from crypto/bn/bn_lcl.h
diff --git a/package/ibm-sw-tpm2/ibm-sw-tpm2.hash b/package/ibm-sw-tpm2/ibm-sw-tpm2.hash
index 392fb59815..3c2d0e758f 100644
--- a/package/ibm-sw-tpm2/ibm-sw-tpm2.hash
+++ b/package/ibm-sw-tpm2/ibm-sw-tpm2.hash
@@ -1,3 +1,3 @@
 # Locally computed:
-sha256  da7799baa1d38cd9d2f491006de45d38805db9d5a77c38af6e78728bd318f93e  ibm-sw-tpm2-5452af422edeff70fcae8ea99dd28a0922051d7b-git4.tar.gz
+sha256  239cea3ec99cb31fb25c1ba4fe9b98a862bb20daefefeba8908d370bedd42a31  ibm-sw-tpm2-rev183-2024-03-27-git4.tar.gz
 sha256  dd2d31b560011ea673e197251e710e52669d911367d83cd3cfd018f8ed58bde9  LICENSE
diff --git a/package/ibm-sw-tpm2/ibm-sw-tpm2.mk b/package/ibm-sw-tpm2/ibm-sw-tpm2.mk
index 4df61fe028..67ecd45923 100644
--- a/package/ibm-sw-tpm2/ibm-sw-tpm2.mk
+++ b/package/ibm-sw-tpm2/ibm-sw-tpm2.mk
@@ -4,7 +4,7 @@
 #
 ################################################################################
 
-IBM_SW_TPM2_VERSION = 5452af422edeff70fcae8ea99dd28a0922051d7b
+IBM_SW_TPM2_VERSION = rev183-2024-03-27
 IBM_SW_TPM2_SITE = https://git.code.sf.net/p/ibmswtpm2/tpm2
 IBM_SW_TPM2_SITE_METHOD = git
 IBM_SW_TPM2_LICENSE = BSD-3-Clause
-- 
2.43.0

_______________________________________________
buildroot mailing list
buildroot@buildroot.org
https://lists.buildroot.org/mailman/listinfo/buildroot

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

* [Buildroot] [PATCH 2/2] package/ibm-sw-tpm2: fix build with openssl 3.3.x
  2024-07-21  7:40 [Buildroot] [PATCH 1/2] package/ibm-sw-tpm2: bump to version rev183-2024-03-27 Fabrice Fontaine
@ 2024-07-21  7:40 ` Fabrice Fontaine
  2024-08-29 16:05   ` Peter Korsgaard
  2024-07-21 16:29 ` [Buildroot] [PATCH 1/2] package/ibm-sw-tpm2: bump to version rev183-2024-03-27 Thomas Petazzoni via buildroot
  2024-08-29 16:05 ` Peter Korsgaard
  2 siblings, 1 reply; 5+ messages in thread
From: Fabrice Fontaine @ 2024-07-21  7:40 UTC (permalink / raw)
  To: buildroot; +Cc: Philippe Reynes, Fabrice Fontaine

Fix the following build failure with openssl 3.3.x raised since commit
6d5ce8609f17a3403d1148a0bbf7a2bdb5ec7f67:

In file included from BnValues.h:327,
                 from Global.h:80,
                 from Tpm.h:78,
                 from AuditCommands.c:62:
TpmToOsslMath.h:83:5: error: #error Untested OpenSSL version
   83 | #   error Untested OpenSSL version
      |     ^~~~~

Fixes: 6d5ce8609f17a3403d1148a0bbf7a2bdb5ec7f67
 - http://autobuild.buildroot.org/results/2fb5e1cb792fe25ef860ff8111622cd1ff3770bf

Signed-off-by: Fabrice Fontaine <fontaine.fabrice@gmail.com>
---
 ...lMath.h-fix-build-with-openssl-3.3.x.patch | 40 +++++++++++++++++++
 1 file changed, 40 insertions(+)
 create mode 100644 package/ibm-sw-tpm2/0002-src-BnToOsslMath.h-fix-build-with-openssl-3.3.x.patch

diff --git a/package/ibm-sw-tpm2/0002-src-BnToOsslMath.h-fix-build-with-openssl-3.3.x.patch b/package/ibm-sw-tpm2/0002-src-BnToOsslMath.h-fix-build-with-openssl-3.3.x.patch
new file mode 100644
index 0000000000..a349c05d4c
--- /dev/null
+++ b/package/ibm-sw-tpm2/0002-src-BnToOsslMath.h-fix-build-with-openssl-3.3.x.patch
@@ -0,0 +1,40 @@
+From 1b5d9eb91f0d24d09d711ef839d301ee8b640d61 Mon Sep 17 00:00:00 2001
+From: Fabrice Fontaine <fontaine.fabrice@gmail.com>
+Date: Sun, 21 Jul 2024 09:08:39 +0200
+Subject: [PATCH] src/BnToOsslMath.h: fix build with openssl 3.3.x
+
+Fix the following build failure with openssl 3.3.x:
+
+In file included from BnValues.h:327,
+                 from Global.h:80,
+                 from Tpm.h:78,
+                 from AuditCommands.c:62:
+TpmToOsslMath.h:83:5: error: #error Untested OpenSSL version
+   83 | #   error Untested OpenSSL version
+      |     ^~~~~
+
+Fixes:
+ - http://autobuild.buildroot.org/results/2fb5e1cb792fe25ef860ff8111622cd1ff3770bf
+
+Signed-off-by: Fabrice Fontaine <fontaine.fabrice@gmail.com>
+Upstream: https://github.com/kgoldman/ibmswtpm2/pull/15
+---
+ src/BnToOsslMath.h | 2 +-
+ 1 file changed, 1 insertion(+), 1 deletion(-)
+
+diff --git a/src/BnToOsslMath.h b/src/BnToOsslMath.h
+index df4bcfb..72939ea 100644
+--- a/src/BnToOsslMath.h
++++ b/src/BnToOsslMath.h
+@@ -77,7 +77,7 @@
+ #include <openssl/ec.h>
+ #include <openssl/bn.h>
+ 
+-#if OPENSSL_VERSION_NUMBER >= 0x30200ff0L
++#if OPENSSL_VERSION_NUMBER >= 0x30300ff0L
+ // Check the bignum_st definition against the one below and either update the
+ // version check or provide the new definition for this version.
+ #  error Untested OpenSSL version
+-- 
+2.43.0
+
-- 
2.43.0

_______________________________________________
buildroot mailing list
buildroot@buildroot.org
https://lists.buildroot.org/mailman/listinfo/buildroot

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

* Re: [Buildroot] [PATCH 1/2] package/ibm-sw-tpm2: bump to version rev183-2024-03-27
  2024-07-21  7:40 [Buildroot] [PATCH 1/2] package/ibm-sw-tpm2: bump to version rev183-2024-03-27 Fabrice Fontaine
  2024-07-21  7:40 ` [Buildroot] [PATCH 2/2] package/ibm-sw-tpm2: fix build with openssl 3.3.x Fabrice Fontaine
@ 2024-07-21 16:29 ` Thomas Petazzoni via buildroot
  2024-08-29 16:05 ` Peter Korsgaard
  2 siblings, 0 replies; 5+ messages in thread
From: Thomas Petazzoni via buildroot @ 2024-07-21 16:29 UTC (permalink / raw)
  To: Fabrice Fontaine; +Cc: Philippe Reynes, buildroot

On Sun, 21 Jul 2024 09:40:52 +0200
Fabrice Fontaine <fontaine.fabrice@gmail.com> wrote:

> - Refresh first patch
> - Drop second patch (fix differentl by
>   https://sourceforge.net/p/ibmswtpm2/tpm2/ci/ebe82ac82fef97feddc558f3c3ad16baf67e6921/)
> 
> Signed-off-by: Fabrice Fontaine <fontaine.fabrice@gmail.com>
> ---
>  ...01-Use-LONG_BIT-to-define-RADIX_BITS.patch | 65 +++++++++----------
>  .../0002-Add-support-for-OpenSSL-3-2-x.patch  | 28 --------
>  package/ibm-sw-tpm2/ibm-sw-tpm2.hash          |  2 +-
>  package/ibm-sw-tpm2/ibm-sw-tpm2.mk            |  2 +-
>  4 files changed, 33 insertions(+), 64 deletions(-)
>  delete mode 100644 package/ibm-sw-tpm2/0002-Add-support-for-OpenSSL-3-2-x.patch

Both applied to master, thanks.

Thomas
-- 
Thomas Petazzoni, CTO, Bootlin
Embedded Linux and Kernel engineering
https://bootlin.com
_______________________________________________
buildroot mailing list
buildroot@buildroot.org
https://lists.buildroot.org/mailman/listinfo/buildroot

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

* Re: [Buildroot] [PATCH 1/2] package/ibm-sw-tpm2: bump to version rev183-2024-03-27
  2024-07-21  7:40 [Buildroot] [PATCH 1/2] package/ibm-sw-tpm2: bump to version rev183-2024-03-27 Fabrice Fontaine
  2024-07-21  7:40 ` [Buildroot] [PATCH 2/2] package/ibm-sw-tpm2: fix build with openssl 3.3.x Fabrice Fontaine
  2024-07-21 16:29 ` [Buildroot] [PATCH 1/2] package/ibm-sw-tpm2: bump to version rev183-2024-03-27 Thomas Petazzoni via buildroot
@ 2024-08-29 16:05 ` Peter Korsgaard
  2 siblings, 0 replies; 5+ messages in thread
From: Peter Korsgaard @ 2024-08-29 16:05 UTC (permalink / raw)
  To: Fabrice Fontaine; +Cc: Philippe Reynes, buildroot

>>>>> "Fabrice" == Fabrice Fontaine <fontaine.fabrice@gmail.com> writes:

 > - Refresh first patch
 > - Drop second patch (fix differentl by
 >   https://sourceforge.net/p/ibmswtpm2/tpm2/ci/ebe82ac82fef97feddc558f3c3ad16baf67e6921/)

 > Signed-off-by: Fabrice Fontaine <fontaine.fabrice@gmail.com>

Committed to 2024.05.x, thanks.

-- 
Bye, Peter Korsgaard
_______________________________________________
buildroot mailing list
buildroot@buildroot.org
https://lists.buildroot.org/mailman/listinfo/buildroot

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

* Re: [Buildroot] [PATCH 2/2] package/ibm-sw-tpm2: fix build with openssl 3.3.x
  2024-07-21  7:40 ` [Buildroot] [PATCH 2/2] package/ibm-sw-tpm2: fix build with openssl 3.3.x Fabrice Fontaine
@ 2024-08-29 16:05   ` Peter Korsgaard
  0 siblings, 0 replies; 5+ messages in thread
From: Peter Korsgaard @ 2024-08-29 16:05 UTC (permalink / raw)
  To: Fabrice Fontaine; +Cc: Philippe Reynes, buildroot

>>>>> "Fabrice" == Fabrice Fontaine <fontaine.fabrice@gmail.com> writes:

 > Fix the following build failure with openssl 3.3.x raised since commit
 > 6d5ce8609f17a3403d1148a0bbf7a2bdb5ec7f67:

 > In file included from BnValues.h:327,
 >                  from Global.h:80,
 >                  from Tpm.h:78,
 >                  from AuditCommands.c:62:
 > TpmToOsslMath.h:83:5: error: #error Untested OpenSSL version
 >    83 | #   error Untested OpenSSL version
 >       |     ^~~~~

 > Fixes: 6d5ce8609f17a3403d1148a0bbf7a2bdb5ec7f67
 >  - http://autobuild.buildroot.org/results/2fb5e1cb792fe25ef860ff8111622cd1ff3770bf

 > Signed-off-by: Fabrice Fontaine <fontaine.fabrice@gmail.com>

Committed to 2024.05.x, thanks.

-- 
Bye, Peter Korsgaard
_______________________________________________
buildroot mailing list
buildroot@buildroot.org
https://lists.buildroot.org/mailman/listinfo/buildroot

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

end of thread, other threads:[~2024-08-29 16:05 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2024-07-21  7:40 [Buildroot] [PATCH 1/2] package/ibm-sw-tpm2: bump to version rev183-2024-03-27 Fabrice Fontaine
2024-07-21  7:40 ` [Buildroot] [PATCH 2/2] package/ibm-sw-tpm2: fix build with openssl 3.3.x Fabrice Fontaine
2024-08-29 16:05   ` Peter Korsgaard
2024-07-21 16:29 ` [Buildroot] [PATCH 1/2] package/ibm-sw-tpm2: bump to version rev183-2024-03-27 Thomas Petazzoni via buildroot
2024-08-29 16:05 ` Peter Korsgaard

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