#ifdef UNSAFE_BUFFERS_BUILD
#pragma allow_unsafe_buffers
#endif
#include "sandbox/linux/syscall_broker/remote_syscall_arg_handler.h"
#include <string.h>
#include <sys/ioctl.h>
#include <sys/syscall.h>
#include <sys/types.h>
#include <sys/uio.h>
#include <unistd.h>
#include <algorithm>
#include "base/bits.h"
#include "base/check_op.h"
#include "base/containers/span.h"
#include "base/logging.h"
#include "base/memory/page_size.h"
#include "sandbox/linux/system_headers/linux_seccomp.h"
#include "sandbox/linux/system_headers/linux_syscalls.h"
#if defined(MEMORY_SANITIZER)
#include <sanitizer/msan_interface.h>
#endif
namespace sandbox {
namespace syscall_broker {
RemoteProcessIOResult WriteRemoteData(pid_t pid,
uintptr_t remote_addr,
size_t remote_size,
base::span<char> data) { … }
RemoteProcessIOResult ReadFilePathFromRemoteProcess(pid_t pid,
const void* remote_addr,
std::string* out_str) { … }
namespace internal {
uintptr_t NumBytesLeftInPage(uintptr_t addr) { … }
}
}
}