diff --git a/sandboxed_api/sandbox2/monitor_unotify.cc b/sandboxed_api/sandbox2/monitor_unotify.cc index 94d25a1..2c6950c 100644 --- a/sandboxed_api/sandbox2/monitor_unotify.cc +++ b/sandboxed_api/sandbox2/monitor_unotify.cc @@ -108,11 +108,12 @@ void UnotifyMonitor::HandleUnotify() { {req_->data.args[0], req_->data.args[1], req_->data.args[2], req_->data.args[3], req_->data.args[4], req_->data.args[5]}, req_->pid, 0, req_->data.instruction_pointer); - LogSyscallViolation(syscall); - MaybeGetStackTrace(req_->pid, Result::VIOLATION); ViolationType violation_type = syscall.arch() == Syscall::GetHostArch() ? kSyscallViolation : kArchitectureSwitchViolation; + LogSyscallViolation(syscall); + notify_->EventSyscallViolation(syscall, violation_type); + MaybeGetStackTrace(req_->pid, Result::VIOLATION); SetExitStatusCode(Result::VIOLATION, syscall.nr()); notify_->EventSyscallViolation(syscall, violation_type); result_.SetSyscall(std::make_unique(syscall)); diff --git a/sandboxed_api/sandbox2/sandbox2.cc b/sandboxed_api/sandbox2/sandbox2.cc index 4347e16..b9fdeef 100644 --- a/sandboxed_api/sandbox2/sandbox2.cc +++ b/sandboxed_api/sandbox2/sandbox2.cc @@ -113,8 +113,10 @@ void Sandbox2::Launch() { absl::Status Sandbox2::EnableUnotifyMonitor() { if (notify_) { - return absl::FailedPreconditionError( - "sandbox2::Notify is not compatible with unotify monitor"); + LOG(WARNING) << "Running UnotifyMonitor with sandbox2::Notify is not fully " + "supported. Runtime syscall decisions via " + "EventSyscallTrap/EventSyscallTrace, notifications about " + "signals via EventSignal will not work"; } if (policy_->GetNamespace() == nullptr) { return absl::FailedPreconditionError(