chromium/sandbox/linux/bpf_dsl/verifier.cc

// Copyright 2012 The Chromium Authors
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.

#ifdef UNSAFE_BUFFERS_BUILD
// TODO(crbug.com/351564777): Remove this and convert code to safer constructs.
#pragma allow_unsafe_buffers
#endif

#include "sandbox/linux/bpf_dsl/verifier.h"

#include <stdint.h>
#include <string.h>

#include "base/memory/raw_ref.h"
#include "sandbox/linux/bpf_dsl/seccomp_macros.h"
#include "sandbox/linux/bpf_dsl/trap_registry.h"
#include "sandbox/linux/system_headers/linux_filter.h"
#include "sandbox/linux/system_headers/linux_seccomp.h"

namespace sandbox {
namespace bpf_dsl {

namespace {

struct State {};

void Ld(State* state, const struct sock_filter& insn, const char** err) {}

void Jmp(State* state, const struct sock_filter& insn, const char** err) {}

uint32_t Ret(State*, const struct sock_filter& insn, const char** err) {}

void Alu(State* state, const struct sock_filter& insn, const char** err) {}

}  // namespace

uint32_t Verifier::EvaluateBPF(const std::vector<struct sock_filter>& program,
                               const struct arch_seccomp_data& data,
                               const char** err) {}

}  // namespace bpf_dsl
}  // namespace sandbox