libintrovirt v0.57.4
IntroVirt introspection library
Loading...
Searching...
No Matches
SystemCallFilter.hh
Go to the documentation of this file.
1/*
2 * Copyright 2021 Assured Information Security, Inc.
3 *
4 * Licensed under the Apache License, Version 2.0 (the "License");
5 * you may not use this file except in compliance with the License.
6 * You may obtain a copy of the License at
7 *
8 * http://www.apache.org/licenses/LICENSE-2.0
9 *
10 * Unless required by applicable law or agreed to in writing, software
11 * distributed under the License is distributed on an "AS IS" BASIS,
12 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13 * See the License for the specific language governing permissions and
14 * limitations under the License.
15 */
16#pragma once
17
18#include <introvirt/core/fwd.hh>
19
20#include <cstdint>
21#include <memory>
22
23namespace introvirt {
24
36 public:
46 void mask(uint64_t mask);
47
53 uint64_t mask() const;
54
59 void enabled(bool enabled);
60
69 bool enabled() const;
70
80 bool matches(const Event& event) const;
81
93 bool matches(const Vcpu& vcpu) const;
94
101 void set_32(uint32_t index, bool enabled);
102
109 void set_64(uint32_t index, bool enabled);
110
114 void clear();
115
120
125
126 private:
127 class IMPL;
128 std::unique_ptr<IMPL> pImpl_;
129};
130
131} // namespace introvirt
Interface class for hypervisor events.
Definition Event.hh:43
Base class for system call filtering.
Definition SystemCallFilter.hh:35
void set_64(uint32_t index, bool enabled)
Set a filter entry for 64-bit system calls.
bool enabled() const
Check if the filter is enabled.
uint64_t mask() const
Get the mask that is in use by the filter.
bool matches(const Vcpu &vcpu) const
Check if the filter matches the given system call event.
bool matches(const Event &event) const
Check if the filter matches the given system call event.
SystemCallFilter()
Construct a new System Call Filter object.
virtual ~SystemCallFilter()
Destroy the instance.
void clear()
Clear the filter.
void set_32(uint32_t index, bool enabled)
Set a filter entry for 32-bit system calls.
void mask(uint64_t mask)
Mask incoming system calls with the given mask before checking for a match.
void enabled(bool enabled)
Set if the filter is enabled.
A class representing a single virtual processor.
Definition Vcpu.hh:33
Core IntroVirt classes.
Definition Cr0.hh:20