Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Remove now-unused code specific to a deprecated platform #6781

Merged
merged 3 commits into from
Jan 27, 2025
Merged
Show file tree
Hide file tree
Changes from 2 commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
7 changes: 1 addition & 6 deletions include/ccf/pal/attestation.h
Original file line number Diff line number Diff line change
Expand Up @@ -13,12 +13,7 @@

#include <fcntl.h>
#include <functional>

#if !defined(INSIDE_ENCLAVE) || defined(VIRTUAL_ENCLAVE)
# include <sys/ioctl.h>
#else
# include "ccf/pal/attestation_sgx.h"
#endif
#include <sys/ioctl.h>

namespace ccf::pal
{
Expand Down
77 changes: 0 additions & 77 deletions include/ccf/pal/attestation_sgx.h

This file was deleted.

9 changes: 0 additions & 9 deletions include/ccf/pal/locking.h
Original file line number Diff line number Diff line change
Expand Up @@ -15,13 +15,4 @@ namespace ccf::pal
* Virtual enclaves and the host code share the same PAL.
*/
using Mutex = std::mutex;

#if !defined(INSIDE_ENCLAVE) || defined(VIRTUAL_ENCLAVE)
static inline void speculation_barrier() {}
#else
static inline void speculation_barrier()
{
oe_lfence();
}
#endif
}
4 changes: 0 additions & 4 deletions src/enclave/main.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -184,8 +184,6 @@ extern "C"

ccf::enclavetime::host_time_us =
static_cast<decltype(ccf::enclavetime::host_time_us)>(time_location);

ccf::pal::speculation_barrier();
}

if (!ccf::pal::is_outside_enclave(ccf_config, ccf_config_size))
Expand Down Expand Up @@ -213,8 +211,6 @@ extern "C"
return CreateNodeStatus::UnalignedArguments;
}

ccf::pal::speculation_barrier();

ccf::StartupConfig cc =
nlohmann::json::parse(ccf_config, ccf_config + ccf_config_size);

Expand Down
4 changes: 0 additions & 4 deletions src/js/core/context.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -16,10 +16,6 @@
#include <cstdarg>
#include <quickjs/quickjs.h>

#if defined(INSIDE_ENCLAVE) && !defined(VIRTUAL_ENCLAVE)
# include <openenclave/3rdparty/libc/sys/time.h> // For timeval
#endif

namespace ccf::js::core
{
namespace
Expand Down
2 changes: 0 additions & 2 deletions src/node/snapshotter.h
Original file line number Diff line number Diff line change
Expand Up @@ -317,8 +317,6 @@ namespace ccf
return false;
}

ccf::pal::speculation_barrier();

std::copy(
pending_snapshot.serialised_snapshot.begin(),
pending_snapshot.serialised_snapshot.end(),
Expand Down
Loading