// Copyright 2018 The Chromium Authors // Use of this source code is governed by a BSD-style license that can be // found in the LICENSE file. #ifndef SANDBOX_LINUX_SYSCALL_BROKER_BROKER_SIMPLE_MESSAGE_H_ #define SANDBOX_LINUX_SYSCALL_BROKER_BROKER_SIMPLE_MESSAGE_H_ #include <stdint.h> #include <sys/types.h> #include "base/containers/span.h" #include "base/files/scoped_file.h" #include "base/memory/raw_ptr_exclusion.h" #include "sandbox/sandbox_export.h" namespace sandbox { namespace syscall_broker { // This class is meant to provide a very simple messaging mechanism that is // signal-safe for the broker to utilize. This addresses many of the issues // outlined in https://crbug.com/255063. In short, the use of the standard // base::UnixDomainSockets is not possible because it uses base::Pickle and // std::vector, which are not signal-safe. // // In implementation, much of the code for sending and receiving is taken from // base::UnixDomainSockets and re-used below. Thus, ultimately, it might be // worthwhile making a first-class base-supported signal-safe set of mechanisms // that reduces the code duplication. class SANDBOX_EXPORT BrokerSimpleMessage { … }; } // namespace syscall_broker } // namespace sandbox #endif // SANDBOX_LINUX_SYSCALL_BROKER_BROKER_SIMPLE_MESSAGE_H_