#include "src/sandbox/hardware-support.h"
#if V8_ENABLE_SANDBOX_HARDWARE_SUPPORT
#include "src/base/platform/memory-protection-key.h"
#endif
namespace v8 {
namespace internal {
#if V8_ENABLE_SANDBOX_HARDWARE_SUPPORT
int SandboxHardwareSupport::pkey_ = …;
bool SandboxHardwareSupport::TryEnable(Address addr, size_t size) { … }
void SandboxHardwareSupport::InitializeBeforeThreadCreation() { … }
void SandboxHardwareSupport::SetDefaultPermissionsForSignalHandler() { … }
void SandboxHardwareSupport::NotifyReadOnlyPageCreated(
Address addr, size_t size, PageAllocator::Permission perm) { … }
SandboxHardwareSupport::BlockAccessScope
SandboxHardwareSupport::MaybeBlockAccess() { … }
SandboxHardwareSupport::BlockAccessScope::BlockAccessScope(int pkey)
: … { … }
SandboxHardwareSupport::BlockAccessScope::~BlockAccessScope() { … }
#else
bool SandboxHardwareSupport::TryEnable(Address addr, size_t size) {
return false;
}
void SandboxHardwareSupport::InitializeBeforeThreadCreation() {}
void SandboxHardwareSupport::SetDefaultPermissionsForSignalHandler() {}
void SandboxHardwareSupport::NotifyReadOnlyPageCreated(
Address addr, size_t size, PageAllocator::Permission perm) {}
SandboxHardwareSupport::BlockAccessScope
SandboxHardwareSupport::MaybeBlockAccess() {
return BlockAccessScope();
}
#endif
}
}