Android-cuttlefish cvd tool
Namespaces | Functions
secure_env_only_oemlock.cpp File Reference
#include <functional>
#include <mutex>
#include <optional>
#include <thread>
#include <android-base/logging.h>
#include <android-base/strings.h>
#include <gflags/gflags.h>
#include "cuttlefish/common/libs/fs/shared_fd.h"
#include "cuttlefish/common/libs/transport/channel_sharedfd.h"
#include "cuttlefish/host/commands/kernel_log_monitor/kernel_log_server.h"
#include "cuttlefish/host/commands/kernel_log_monitor/utils.h"
#include "cuttlefish/host/commands/secure_env/oemlock/oemlock.h"
#include "cuttlefish/host/commands/secure_env/oemlock/oemlock_responder.h"
#include "cuttlefish/host/commands/secure_env/storage/insecure_json_storage.h"
#include "cuttlefish/host/commands/secure_env/suspend_resume_handler.h"
#include "cuttlefish/host/commands/secure_env/worker_thread_loop_body.h"
#include "cuttlefish/host/libs/config/known_paths.h"
#include "cuttlefish/host/libs/config/logging.h"
Include dependency graph for secure_env_only_oemlock.cpp:

Namespaces

namespace  cuttlefish
 
namespace  cuttlefish::anonymous_namespace{secure_env_only_oemlock.cpp}
 

Functions

 DEFINE_int32 (confui_server_fd, -1, "A named socket to serve confirmation UI")
 
 DEFINE_int32 (snapshot_control_fd, -1, "A socket connected to run_cvd for snapshot operations and" "responses")
 
 DEFINE_int32 (keymaster_fd_in, -1, "A pipe for keymaster communication")
 
 DEFINE_int32 (keymaster_fd_out, -1, "A pipe for keymaster communication")
 
 DEFINE_int32 (keymint_fd_in, -1, "A pipe for keymint communication")
 
 DEFINE_int32 (keymint_fd_out, -1, "A pipe for keymint communication")
 
 DEFINE_int32 (gatekeeper_fd_in, -1, "A pipe for gatekeeper communication")
 
 DEFINE_int32 (gatekeeper_fd_out, -1, "A pipe for gatekeeper communication")
 
 DEFINE_int32 (oemlock_fd_in, -1, "A pipe for oemlock communication")
 
 DEFINE_int32 (oemlock_fd_out, -1, "A pipe for oemlock communication")
 
 DEFINE_int32 (kernel_events_fd, -1, "A pipe for monitoring events based on " "messages written to the kernel log. This " "is used by secure_env to monitor for " "device reboots.")
 
 DEFINE_string (tpm_impl, "in_memory", "The TPM implementation. \"in_memory\" or \"host_device\"")
 
 DEFINE_string (keymint_impl, "tpm", "The KeyMint implementation. \"tpm\" or \"software\"")
 
 DEFINE_string (gatekeeper_impl, "tpm", "The gatekeeper implementation. \"tpm\" or \"software\"")
 
 DEFINE_string (oemlock_impl, "tpm", "The oemlock implementation. \"tpm\" or \"software\"")
 
 DEFINE_int32 (jcardsim_fd_in, -1, "A pipe for jcardsim communication")
 
 DEFINE_int32 (jcardsim_fd_out, -1, "A pipe for jcardsim communication")
 
 DEFINE_bool (enable_jcard_simulator, false, "Whether to enable jcardsimulator.")
 
constexpr std::chrono::seconds cuttlefish::anonymous_namespace{secure_env_only_oemlock.cpp}::kRestartLockTimeout (2)
 
SharedFD cuttlefish::anonymous_namespace{secure_env_only_oemlock.cpp}::DupFdFlag (gflags::int32 fd)
 
void cuttlefish::anonymous_namespace{secure_env_only_oemlock.cpp}::ReExecSelf ()
 
std::thread cuttlefish::anonymous_namespace{secure_env_only_oemlock.cpp}::StartKernelEventMonitor (SharedFD kernel_events_fd, std::timed_mutex &oemlock_lock)
 
Result< void > cuttlefish::anonymous_namespace{secure_env_only_oemlock.cpp}::SecureEnvMain (int argc, char **argv)
 
int main (int argc, char **argv)
 

Function Documentation

◆ DEFINE_bool()

DEFINE_bool ( enable_jcard_simulator  ,
false  ,
"Whether to enable jcardsimulator."   
)

◆ DEFINE_int32() [1/13]

DEFINE_int32 ( confui_server_fd  ,
1,
"A named socket to serve confirmation UI"   
)

◆ DEFINE_int32() [2/13]

DEFINE_int32 ( gatekeeper_fd_in  ,
1,
"A pipe for gatekeeper communication"   
)

◆ DEFINE_int32() [3/13]

DEFINE_int32 ( gatekeeper_fd_out  ,
1,
"A pipe for gatekeeper communication"   
)

◆ DEFINE_int32() [4/13]

DEFINE_int32 ( jcardsim_fd_in  ,
1,
"A pipe for jcardsim communication"   
)

◆ DEFINE_int32() [5/13]

DEFINE_int32 ( jcardsim_fd_out  ,
1,
"A pipe for jcardsim communication"   
)

◆ DEFINE_int32() [6/13]

DEFINE_int32 ( kernel_events_fd  ,
1,
"A pipe for monitoring events based on " "messages written to the kernel log. This " "is used by secure_env to monitor for " "device reboots."   
)

◆ DEFINE_int32() [7/13]

DEFINE_int32 ( keymaster_fd_in  ,
1,
"A pipe for keymaster communication"   
)

◆ DEFINE_int32() [8/13]

DEFINE_int32 ( keymaster_fd_out  ,
1,
"A pipe for keymaster communication"   
)

◆ DEFINE_int32() [9/13]

DEFINE_int32 ( keymint_fd_in  ,
1,
"A pipe for keymint communication"   
)

◆ DEFINE_int32() [10/13]

DEFINE_int32 ( keymint_fd_out  ,
1,
"A pipe for keymint communication"   
)

◆ DEFINE_int32() [11/13]

DEFINE_int32 ( oemlock_fd_in  ,
1,
"A pipe for oemlock communication"   
)

◆ DEFINE_int32() [12/13]

DEFINE_int32 ( oemlock_fd_out  ,
1,
"A pipe for oemlock communication"   
)

◆ DEFINE_int32() [13/13]

DEFINE_int32 ( snapshot_control_fd  ,
1,
"A socket connected to run_cvd for snapshot operations and" "responses"   
)

◆ DEFINE_string() [1/4]

DEFINE_string ( gatekeeper_impl  ,
"tpm"  ,
"The gatekeeper implementation. \"tpm\" or \"software\""   
)

◆ DEFINE_string() [2/4]

DEFINE_string ( keymint_impl  ,
"tpm"  ,
"The KeyMint implementation. \"tpm\" or \"software\""   
)

◆ DEFINE_string() [3/4]

DEFINE_string ( oemlock_impl  ,
"tpm"  ,
"The oemlock implementation. \"tpm\" or \"software\""   
)

◆ DEFINE_string() [4/4]

DEFINE_string ( tpm_impl  ,
"in_memory"  ,
"The TPM implementation. \"in_memory\" or \"host_device\""   
)

◆ main()

int main ( int  argc,
char **  argv 
)