-
Notifications
You must be signed in to change notification settings - Fork 549
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Upgraded to OpenSSL 1.1.1u. Introduced Intel(R) TDX 1.4 and 1.5 support Upgraded Ring3 Abstraction Layer (R3AAL) library to support Intel(R) TDX MVP 6.2 kernel Enhanced quote verification performance in multi-thread scenarios Fixed bugs. Signed-off-by: Zhang, Lili Z <[email protected]>
- Loading branch information
Showing
23 changed files
with
176 additions
and
62 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Submodule dcap_source
updated
115 files
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,12 +1,13 @@ | ||
From b309912dc33756a51d49af062ba883790d206f14 Mon Sep 17 00:00:00 2001 | ||
From 693787f29e638e6f65dfdd5ee3dd9c2a45b7d3df Mon Sep 17 00:00:00 2001 | ||
From: yanxue <[email protected]> | ||
Date: Fri, 6 May 2022 16:04:12 +0800 | ||
Date: Tue, 1 Aug 2023 07:12:57 +0000 | ||
Subject: [PATCH] Enable Protobuf in SGX | ||
|
||
--- | ||
cmake/CMakeLists.txt | 31 +++- | ||
cmake/libsgx_protobuf.cmake | 140 ++++++++++++++++++ | ||
configure.ac | 2 +- | ||
.../google/protobuf/MessageReflection.java | 26 +++- | ||
.../protobuf/io/zero_copy_stream_impl.cc | 6 + | ||
.../protobuf/io/zero_copy_stream_impl.h | 4 +- | ||
src/google/protobuf/map.h | 12 ++ | ||
|
@@ -28,7 +29,7 @@ Subject: [PATCH] Enable Protobuf in SGX | |
.../protobuf/util/delimited_message_util.cc | 2 + | ||
.../protobuf/util/delimited_message_util.h | 7 +- | ||
src/google/protobuf/util/time_util.h | 4 + | ||
24 files changed, 292 insertions(+), 14 deletions(-) | ||
25 files changed, 317 insertions(+), 15 deletions(-) | ||
create mode 100644 cmake/libsgx_protobuf.cmake | ||
|
||
diff --git a/cmake/CMakeLists.txt b/cmake/CMakeLists.txt | ||
|
@@ -234,7 +235,7 @@ index 000000000..2d5b33da5 | |
+ DEBUG_POSTFIX "${protobuf_DEBUG_POSTFIX}") | ||
+add_library(protobuf::libprotobuf ALIAS libprotobuf) | ||
diff --git a/configure.ac b/configure.ac | ||
index 5de1ce20a..712fa41d5 100644 | ||
index 7c5c2c799..31c63629f 100644 | ||
--- a/configure.ac | ||
+++ b/configure.ac | ||
@@ -106,7 +106,7 @@ ACX_CHECK_SUNCC | ||
|
@@ -246,6 +247,77 @@ index 5de1ce20a..712fa41d5 100644 | |
|
||
# Check whether the linker supports version scripts | ||
AC_MSG_CHECKING([whether the linker supports version scripts]) | ||
diff --git a/java/core/src/main/java/com/google/protobuf/MessageReflection.java b/java/core/src/main/java/com/google/protobuf/MessageReflection.java | ||
index b7f5d52d4..f032d4926 100644 | ||
--- a/java/core/src/main/java/com/google/protobuf/MessageReflection.java | ||
+++ b/java/core/src/main/java/com/google/protobuf/MessageReflection.java | ||
@@ -349,6 +349,7 @@ class MessageReflection { | ||
static class BuilderAdapter implements MergeTarget { | ||
|
||
private final Message.Builder builder; | ||
+ private boolean hasNestedBuilders = true; | ||
|
||
@Override | ||
public Descriptors.Descriptor getDescriptorForType() { | ||
@@ -363,6 +364,17 @@ class MessageReflection { | ||
public Object getField(Descriptors.FieldDescriptor field) { | ||
return builder.getField(field); | ||
} | ||
+ | ||
+ private Message.Builder getFieldBuilder(Descriptors.FieldDescriptor field) { | ||
+ if (hasNestedBuilders) { | ||
+ try { | ||
+ return builder.getFieldBuilder(field); | ||
+ } catch (UnsupportedOperationException e) { | ||
+ hasNestedBuilders = false; | ||
+ } | ||
+ } | ||
+ return null; | ||
+ } | ||
|
||
@Override | ||
public boolean hasField(Descriptors.FieldDescriptor field) { | ||
@@ -371,6 +383,12 @@ class MessageReflection { | ||
|
||
@Override | ||
public MergeTarget setField(Descriptors.FieldDescriptor field, Object value) { | ||
+ if (!field.isRepeated() && value instanceof MessageLite.Builder) { | ||
+ if (value != getFieldBuilder(field)) { | ||
+ builder.setField(field, ((MessageLite.Builder) value).buildPartial()); | ||
+ } | ||
+ return this; | ||
+ } | ||
builder.setField(field, value); | ||
return this; | ||
} | ||
@@ -384,12 +402,18 @@ class MessageReflection { | ||
@Override | ||
public MergeTarget setRepeatedField( | ||
Descriptors.FieldDescriptor field, int index, Object value) { | ||
+ if (value instanceof MessageLite.Builder) { | ||
+ value = ((MessageLite.Builder) value).buildPartial(); | ||
+ } | ||
builder.setRepeatedField(field, index, value); | ||
return this; | ||
} | ||
|
||
@Override | ||
public MergeTarget addRepeatedField(Descriptors.FieldDescriptor field, Object value) { | ||
+ if (value instanceof MessageLite.Builder) { | ||
+ value = ((MessageLite.Builder) value).buildPartial(); | ||
+ } | ||
builder.addRepeatedField(field, value); | ||
return this; | ||
} | ||
@@ -543,7 +567,7 @@ class MessageReflection { | ||
|
||
@Override | ||
public Object finish() { | ||
- return builder.buildPartial(); | ||
+ return builder; | ||
} | ||
} | ||
|
||
diff --git a/src/google/protobuf/io/zero_copy_stream_impl.cc b/src/google/protobuf/io/zero_copy_stream_impl.cc | ||
index c66bc862a..1fee728cd 100644 | ||
--- a/src/google/protobuf/io/zero_copy_stream_impl.cc | ||
|
@@ -408,7 +480,7 @@ index 1c22f894e..69006e686 100644 | |
// Like SerializeToString(), but appends to the data to the string's | ||
// existing contents. All required fields must be set. | ||
diff --git a/src/google/protobuf/port_def.inc b/src/google/protobuf/port_def.inc | ||
index 31ab3b159..cadbf1645 100644 | ||
index 1e360ccce..0765998b8 100644 | ||
--- a/src/google/protobuf/port_def.inc | ||
+++ b/src/google/protobuf/port_def.inc | ||
@@ -608,7 +608,7 @@ | ||
|
@@ -848,5 +920,5 @@ index 95cc64520..6d7c44775 100644 | |
|
||
#include <google/protobuf/duration.pb.h> | ||
-- | ||
2.17.1 | ||
2.34.1 | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.