Make sure kernel_stat64 struct is defined on 64-bit MIPS

kernel_stat64 is used only on 32-bit architectures, but it needs to be
defined everywhere, otherwise the compilation fails with:

sandbox/linux/syscall_broker/broker_client.cc:193:28: error:
invalid application of ‘sizeof’ to incomplete type ‘sandbox::syscall_broker::kernel_stat64’

Now linux_stat.h is organized as follows: first come definitions of
kernel_stat64 (one for MIPS and one for all other architectures), then
come definitions of kernel_stat for different architectures.

Change-Id: I59bee3b511d124d59b23f2e7a8339ae69736baa5
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/3304194
Reviewed-by: Matthew Denton <mpdenton@chromium.org>
Commit-Queue: Matthew Denton <mpdenton@chromium.org>
Cr-Commit-Position: refs/heads/main@{#946312}
NOKEYCHECK=True
GitOrigin-RevId: 2e2070d97040715516b99c79e5e59d7f83aa1d0e
1 file changed
tree: 29b6d249e9a0376baff12220fe408446e9f120ad
  1. linux/
  2. mac/
  3. policy/
  4. win/
  5. BUILD.gn
  6. COMMON_METADATA
  7. constants.h
  8. DEPS
  9. DIR_METADATA
  10. features.gni
  11. ipc.dict
  12. OWNERS
  13. README.md
  14. sandbox_export.h
README.md

Sandbox Library

This directory contains platform-specific sandboxing libraries. Sandboxing is a technique that can improve the security of an application by separating untrustworthy code (or code that handles untrustworthy data) and restricting its privileges and capabilities.

Each platform relies on the operating system's process primitive to isolate code into distinct security principals, and platform-specific technologies are used to implement the privilege reduction. At a high-level:

  • mac/ uses the Seatbelt sandbox. See the detailed design for more.
  • linux/ uses namespaces and Seccomp-BPF. See the detailed design for more.
  • win/ uses a combination of restricted tokens, distinct job objects, alternate desktops, and integrity levels. See the detailed design for more.

Built on top of the low-level sandboxing library is the //sandbox/policy component, which provides concrete policies and helper utilities for sandboxing specific Chromium processes and services. The core sandbox library cannot depend on the policy component.