Merge branch 'microsoft:main' into issue4001
This commit is contained in:
Коммит
8dcbdb9f4b
|
@ -95,7 +95,7 @@
|
|||
<ConformanceMode>true</ConformanceMode>
|
||||
<PrecompiledHeaderFile>pch.h</PrecompiledHeaderFile>
|
||||
<RuntimeLibrary>MultiThreadedDebugDll</RuntimeLibrary>
|
||||
<AdditionalIncludeDirectories>$(SolutionDir)libs\api;$(SolutionDir)rpc_interface;$(SolutionDir)include;$(SolutionDir)libs\shared;$(SolutionDir)libs\shared\user;$(SolutionDir)external\usersim\cxplat\inc;$(SolutionDir)external\usersim\cxplat\inc\winuser;$(SolutionDir)libs\execution_context;$(SolutionDir)libs\api_common;$(SolutionDir)external\ebpf-verifier\src;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
|
||||
<AdditionalIncludeDirectories>$(SolutionDir)libs\api;$(SolutionDir)rpc_interface;$(SolutionDir)include;$(SolutionDir)libs\shared;$(SolutionDir)libs\shared\user;$(SolutionDir)external\usersim\cxplat\inc;$(SolutionDir)external\usersim\cxplat\inc\winuser;$(SolutionDir)libs\execution_context;$(SolutionDir)libs\api_common;$(SolutionDir)external\ebpf-verifier\src;$(SolutionDir)external\ebpf-verifier\build\_deps\gsl-src\include;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
|
||||
</ClCompile>
|
||||
<Link>
|
||||
<SubSystem>Windows</SubSystem>
|
||||
|
@ -112,7 +112,7 @@
|
|||
<ConformanceMode>true</ConformanceMode>
|
||||
<PrecompiledHeaderFile>pch.h</PrecompiledHeaderFile>
|
||||
<RuntimeLibrary>MultiThreadedDebugDll</RuntimeLibrary>
|
||||
<AdditionalIncludeDirectories>$(SolutionDir)libs\api;$(SolutionDir)rpc_interface;$(SolutionDir)include;$(SolutionDir)libs\shared;$(SolutionDir)libs\shared\user;$(SolutionDir)external\usersim\cxplat\inc;$(SolutionDir)external\usersim\cxplat\inc\winuser;$(SolutionDir)libs\execution_context;$(SolutionDir)libs\api_common;$(SolutionDir)external\ebpf-verifier\src;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
|
||||
<AdditionalIncludeDirectories>$(SolutionDir)libs\api;$(SolutionDir)rpc_interface;$(SolutionDir)include;$(SolutionDir)libs\shared;$(SolutionDir)libs\shared\user;$(SolutionDir)external\usersim\cxplat\inc;$(SolutionDir)external\usersim\cxplat\inc\winuser;$(SolutionDir)libs\execution_context;$(SolutionDir)libs\api_common;$(SolutionDir)external\ebpf-verifier\src;$(SolutionDir)external\ebpf-verifier\build\_deps\gsl-src\include;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
|
||||
</ClCompile>
|
||||
<Link>
|
||||
<SubSystem>Windows</SubSystem>
|
||||
|
@ -130,7 +130,7 @@
|
|||
<ConformanceMode>true</ConformanceMode>
|
||||
<PrecompiledHeaderFile>pch.h</PrecompiledHeaderFile>
|
||||
<RuntimeLibrary>MultiThreadedDebugDll</RuntimeLibrary>
|
||||
<AdditionalIncludeDirectories>$(SolutionDir)libs\api;$(SolutionDir)rpc_interface;$(SolutionDir)include;$(SolutionDir)libs\shared;$(SolutionDir)libs\shared\user;$(SolutionDir)external\usersim\cxplat\inc;$(SolutionDir)external\usersim\cxplat\inc\winuser;$(SolutionDir)libs\execution_context;$(SolutionDir)libs\api_common;$(SolutionDir)external\ebpf-verifier\src;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
|
||||
<AdditionalIncludeDirectories>$(SolutionDir)libs\api;$(SolutionDir)rpc_interface;$(SolutionDir)include;$(SolutionDir)libs\shared;$(SolutionDir)libs\shared\user;$(SolutionDir)external\usersim\cxplat\inc;$(SolutionDir)external\usersim\cxplat\inc\winuser;$(SolutionDir)libs\execution_context;$(SolutionDir)libs\api_common;$(SolutionDir)external\ebpf-verifier\src;$(SolutionDir)external\ebpf-verifier\build\_deps\gsl-src\include;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
|
||||
</ClCompile>
|
||||
<Link>
|
||||
<SubSystem>Windows</SubSystem>
|
||||
|
@ -146,7 +146,7 @@
|
|||
<PreprocessorDefinitions>NDEBUG;EBPFAPI_EXPORTS;_WINDOWS;_USRDLL;%(PreprocessorDefinitions)</PreprocessorDefinitions>
|
||||
<ConformanceMode>true</ConformanceMode>
|
||||
<PrecompiledHeaderFile>pch.h</PrecompiledHeaderFile>
|
||||
<AdditionalIncludeDirectories>$(SolutionDir)libs\api;$(SolutionDir)rpc_interface;$(SolutionDir)include;$(SolutionDir)libs\shared;$(SolutionDir)libs\shared\user;$(SolutionDir)external\usersim\cxplat\inc;$(SolutionDir)external\usersim\cxplat\inc\winuser;$(SolutionDir)libs\execution_context;$(SolutionDir)libs\api_common;$(SolutionDir)external\ebpf-verifier\src;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
|
||||
<AdditionalIncludeDirectories>$(SolutionDir)libs\api;$(SolutionDir)rpc_interface;$(SolutionDir)include;$(SolutionDir)libs\shared;$(SolutionDir)libs\shared\user;$(SolutionDir)external\usersim\cxplat\inc;$(SolutionDir)external\usersim\cxplat\inc\winuser;$(SolutionDir)libs\execution_context;$(SolutionDir)libs\api_common;$(SolutionDir)external\ebpf-verifier\src;$(SolutionDir)external\ebpf-verifier\build\_deps\gsl-src\include;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
|
||||
</ClCompile>
|
||||
<Link>
|
||||
<SubSystem>Windows</SubSystem>
|
||||
|
@ -164,7 +164,7 @@
|
|||
<PreprocessorDefinitions>NDEBUG;EBPFAPI_EXPORTS;_WINDOWS;_USRDLL;%(PreprocessorDefinitions)</PreprocessorDefinitions>
|
||||
<ConformanceMode>true</ConformanceMode>
|
||||
<PrecompiledHeaderFile>pch.h</PrecompiledHeaderFile>
|
||||
<AdditionalIncludeDirectories>$(SolutionDir)libs\api;$(SolutionDir)rpc_interface;$(SolutionDir)include;$(SolutionDir)libs\shared;$(SolutionDir)libs\shared\user;$(SolutionDir)external\usersim\cxplat\inc;$(SolutionDir)external\usersim\cxplat\inc\winuser;$(SolutionDir)libs\execution_context;$(SolutionDir)libs\api_common;$(SolutionDir)external\ebpf-verifier\src;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
|
||||
<AdditionalIncludeDirectories>$(SolutionDir)libs\api;$(SolutionDir)rpc_interface;$(SolutionDir)include;$(SolutionDir)libs\shared;$(SolutionDir)libs\shared\user;$(SolutionDir)external\usersim\cxplat\inc;$(SolutionDir)external\usersim\cxplat\inc\winuser;$(SolutionDir)libs\execution_context;$(SolutionDir)libs\api_common;$(SolutionDir)external\ebpf-verifier\src;$(SolutionDir)external\ebpf-verifier\build\_deps\gsl-src\include;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
|
||||
</ClCompile>
|
||||
<Link>
|
||||
<SubSystem>Windows</SubSystem>
|
||||
|
|
|
@ -22,6 +22,9 @@
|
|||
<ClInclude Include="resource.h">
|
||||
<Filter>Header Files</Filter>
|
||||
</ClInclude>
|
||||
<ClInclude Include="..\libs\shared\hash.h">
|
||||
<Filter>Header Files</Filter>
|
||||
</ClInclude>
|
||||
</ItemGroup>
|
||||
<ItemGroup>
|
||||
<ClCompile Include="dllmain.cpp">
|
||||
|
@ -33,10 +36,18 @@
|
|||
<ClCompile Include="..\libs\thunk\windows\platform.cpp">
|
||||
<Filter>Source Files</Filter>
|
||||
</ClCompile>
|
||||
<ClCompile Include="..\libs\shared\hash.cpp">
|
||||
<Filter>Source Files</Filter>
|
||||
</ClCompile>
|
||||
</ItemGroup>
|
||||
<ItemGroup>
|
||||
<None Include="Source.def">
|
||||
<Filter>Source Files</Filter>
|
||||
</None>
|
||||
</ItemGroup>
|
||||
</Project>
|
||||
<ItemGroup>
|
||||
<ResourceCompile Include="$(SolutionDir)resource\ebpf_resource.rc">
|
||||
<Filter>Resource Files</Filter>
|
||||
</ResourceCompile>
|
||||
</ItemGroup>
|
||||
</Project>
|
|
@ -68,7 +68,7 @@
|
|||
<PrecompiledHeader>NotUsing</PrecompiledHeader>
|
||||
<PrecompiledHeaderFile>pch.h</PrecompiledHeaderFile>
|
||||
<RuntimeLibrary>MultiThreadedDebugDll</RuntimeLibrary>
|
||||
<AdditionalIncludeDirectories>$(SolutionDir)libs\api_common;$(SolutionDir)libs\api;$(SolutionDir)libs\shared\user;$(SolutionDir)libs\shared;$(SolutionDir)external\usersim\cxplat\inc;$(SolutionDir)external\usersim\cxplat\inc\winuser;$(SolutionDir)libs\service;$(SolutionDir)include;$(SolutionDir)rpc_interface;$(SolutionDir)external\ubpf\vm;$(SolutionDir)external\ubpf\vm\inc;$(SolutionDir)external\ebpf-verifier\src;$(SolutionDir)external\ebpf-verifier\external;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
|
||||
<AdditionalIncludeDirectories>$(SolutionDir)libs\api_common;$(SolutionDir)libs\api;$(SolutionDir)libs\shared\user;$(SolutionDir)libs\shared;$(SolutionDir)external\usersim\cxplat\inc;$(SolutionDir)external\usersim\cxplat\inc\winuser;$(SolutionDir)libs\service;$(SolutionDir)include;$(SolutionDir)rpc_interface;$(SolutionDir)external\ubpf\vm;$(SolutionDir)external\ubpf\vm\inc;$(SolutionDir)external\ebpf-verifier\src;$(SolutionDir)external\ebpf-verifier\external;$(SolutionDir)external\ebpf-verifier\build\_deps\gsl-src\include;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
|
||||
</ClCompile>
|
||||
<Link>
|
||||
<SubSystem>Console</SubSystem>
|
||||
|
@ -90,7 +90,7 @@
|
|||
<PrecompiledHeader>NotUsing</PrecompiledHeader>
|
||||
<PrecompiledHeaderFile>pch.h</PrecompiledHeaderFile>
|
||||
<RuntimeLibrary>MultiThreadedDebugDll</RuntimeLibrary>
|
||||
<AdditionalIncludeDirectories>$(SolutionDir)libs\api_common;$(SolutionDir)libs\api;$(SolutionDir)libs\shared\user;$(SolutionDir)libs\shared;$(SolutionDir)external\usersim\cxplat\inc;$(SolutionDir)external\usersim\cxplat\inc\winuser;$(SolutionDir)libs\service;$(SolutionDir)include;$(SolutionDir)rpc_interface;$(SolutionDir)external\ubpf\vm;$(SolutionDir)external\ubpf\vm\inc;$(SolutionDir)external\ebpf-verifier\src;$(SolutionDir)external\ebpf-verifier\external;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
|
||||
<AdditionalIncludeDirectories>$(SolutionDir)libs\api_common;$(SolutionDir)libs\api;$(SolutionDir)libs\shared\user;$(SolutionDir)libs\shared;$(SolutionDir)external\usersim\cxplat\inc;$(SolutionDir)external\usersim\cxplat\inc\winuser;$(SolutionDir)libs\service;$(SolutionDir)include;$(SolutionDir)rpc_interface;$(SolutionDir)external\ubpf\vm;$(SolutionDir)external\ubpf\vm\inc;$(SolutionDir)external\ebpf-verifier\src;$(SolutionDir)external\ebpf-verifier\external;$(SolutionDir)external\ebpf-verifier\build\_deps\gsl-src\include;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
|
||||
</ClCompile>
|
||||
<Link>
|
||||
<SubSystem>Console</SubSystem>
|
||||
|
@ -111,7 +111,7 @@
|
|||
<ConformanceMode>true</ConformanceMode>
|
||||
<PrecompiledHeader>NotUsing</PrecompiledHeader>
|
||||
<PrecompiledHeaderFile>pch.h</PrecompiledHeaderFile>
|
||||
<AdditionalIncludeDirectories>$(SolutionDir)libs\api_common;$(SolutionDir)libs\api;$(SolutionDir)libs\shared\user;$(SolutionDir)libs\shared;$(SolutionDir)external\usersim\cxplat\inc;$(SolutionDir)external\usersim\cxplat\inc\winuser;$(SolutionDir)libs\service;$(SolutionDir)include;$(SolutionDir)rpc_interface;$(SolutionDir)external\ubpf\vm;$(SolutionDir)external\ubpf\vm\inc;$(SolutionDir)external\ebpf-verifier\src;$(SolutionDir)external\ebpf-verifier\external;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
|
||||
<AdditionalIncludeDirectories>$(SolutionDir)libs\api_common;$(SolutionDir)libs\api;$(SolutionDir)libs\shared\user;$(SolutionDir)libs\shared;$(SolutionDir)external\usersim\cxplat\inc;$(SolutionDir)external\usersim\cxplat\inc\winuser;$(SolutionDir)libs\service;$(SolutionDir)include;$(SolutionDir)rpc_interface;$(SolutionDir)external\ubpf\vm;$(SolutionDir)external\ubpf\vm\inc;$(SolutionDir)external\ebpf-verifier\src;$(SolutionDir)external\ebpf-verifier\external;$(SolutionDir)external\ebpf-verifier\build\_deps\gsl-src\include;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
|
||||
</ClCompile>
|
||||
<Link>
|
||||
<SubSystem>Console</SubSystem>
|
||||
|
@ -163,4 +163,4 @@
|
|||
</ProjectReference>
|
||||
</ItemGroup>
|
||||
<Import Project="$(VCTargetsPath)\Microsoft.Cpp.targets" />
|
||||
</Project>
|
||||
</Project>
|
|
@ -43,4 +43,9 @@
|
|||
<Filter>Source Files</Filter>
|
||||
</ClCompile>
|
||||
</ItemGroup>
|
||||
</Project>
|
||||
<ItemGroup>
|
||||
<ResourceCompile Include="$(SolutionDir)resource\ebpf_resource.rc">
|
||||
<Filter>Resource Files</Filter>
|
||||
</ResourceCompile>
|
||||
</ItemGroup>
|
||||
</Project>
|
|
@ -1 +1 @@
|
|||
Subproject commit 16266b9459437f95c6e6dbfad2dcdc496b321dce
|
||||
Subproject commit 41fbd5a378e80afbb45813a72a3353226c899fef
|
|
@ -1 +1 @@
|
|||
Subproject commit 88a336d86cfb835d3f295650f6fc5151b4b92b15
|
||||
Subproject commit d91240e391a5a966fd7b4090b4e1b64a4deb856d
|
|
@ -281,7 +281,7 @@ _Must_inspect_result_ ebpf_result_t
|
|||
load_byte_code(
|
||||
std::variant<std::string, std::vector<uint8_t>>& file_or_buffer,
|
||||
_In_opt_z_ const char* section_name,
|
||||
_In_ const ebpf_verifier_options_t* verifier_options,
|
||||
_In_ const ebpf_verifier_options_t& verifier_options,
|
||||
_In_z_ const char* pin_root_path,
|
||||
_Inout_ std::vector<ebpf_program_t*>& programs,
|
||||
_Inout_ std::vector<ebpf_map_t*>& maps,
|
||||
|
@ -486,7 +486,7 @@ ebpf_api_elf_enumerate_programs(
|
|||
_Outptr_result_maybenull_ ebpf_api_program_info_t** infos,
|
||||
_Outptr_result_maybenull_z_ const char** error_message) noexcept
|
||||
{
|
||||
ebpf_verifier_options_t verifier_options{false, false, false, false, true};
|
||||
ebpf_verifier_options_t verifier_options{};
|
||||
const ebpf_platform_t* platform = &g_ebpf_platform_windows;
|
||||
std::ostringstream str;
|
||||
|
||||
|
@ -497,7 +497,7 @@ ebpf_api_elf_enumerate_programs(
|
|||
ebpf_clear_thread_local_storage();
|
||||
|
||||
try {
|
||||
auto raw_programs = read_elf(file, section ? std::string(section) : std::string(), &verifier_options, platform);
|
||||
auto raw_programs = read_elf(file, section ? std::string(section) : std::string(), verifier_options, platform);
|
||||
for (const auto& raw_program : raw_programs) {
|
||||
info = (ebpf_api_program_info_t*)ebpf_allocate(sizeof(*info));
|
||||
if (info == nullptr) {
|
||||
|
@ -513,7 +513,7 @@ ebpf_api_elf_enumerate_programs(
|
|||
return 1;
|
||||
}
|
||||
auto& program = std::get<InstructionSeq>(programOrError);
|
||||
cfg_t controlFlowGraph = prepare_cfg(program, raw_program.info, true);
|
||||
cfg_t controlFlowGraph = prepare_cfg(program, raw_program.info, verifier_options.cfg_opts);
|
||||
std::map<std::string, int> stats = collect_stats(controlFlowGraph);
|
||||
for (auto it = stats.rbegin(); it != stats.rend(); ++it) {
|
||||
_ebpf_add_stat(info, it->first, it->second);
|
||||
|
@ -572,7 +572,7 @@ ebpf_api_elf_disassemble_program(
|
|||
_Outptr_result_maybenull_z_ const char** disassembly,
|
||||
_Outptr_result_maybenull_z_ const char** error_message) noexcept
|
||||
{
|
||||
ebpf_verifier_options_t verifier_options = ebpf_verifier_default_options;
|
||||
ebpf_verifier_options_t verifier_options{};
|
||||
const ebpf_platform_t* platform = &g_ebpf_platform_windows;
|
||||
std::ostringstream error;
|
||||
std::ostringstream output;
|
||||
|
@ -584,7 +584,7 @@ ebpf_api_elf_disassemble_program(
|
|||
|
||||
try {
|
||||
std::string section(section_name ? section_name : "");
|
||||
auto raw_programs = read_elf(file, section, &verifier_options, platform);
|
||||
auto raw_programs = read_elf(file, section, verifier_options, platform);
|
||||
auto found_program =
|
||||
std::find_if(raw_programs.begin(), raw_programs.end(), [&program_name](const raw_program& program) {
|
||||
return (program_name == nullptr) || (program.function_name == program_name);
|
||||
|
@ -649,9 +649,9 @@ _ebpf_api_elf_verify_program_from_stream(
|
|||
|
||||
try {
|
||||
const ebpf_platform_t* platform = &g_ebpf_platform_windows;
|
||||
ebpf_verifier_options_t verifier_options = ebpf_verifier_default_options;
|
||||
ebpf_verifier_options_t verifier_options{};
|
||||
verifier_options.assume_assertions = verbosity < EBPF_VERIFICATION_VERBOSITY_VERBOSE;
|
||||
verifier_options.check_termination = true;
|
||||
verifier_options.cfg_opts.check_for_termination = true;
|
||||
verifier_options.print_invariants = verbosity >= EBPF_VERIFICATION_VERBOSITY_INFORMATIONAL;
|
||||
verifier_options.print_failures = true;
|
||||
verifier_options.mock_map_fds = true;
|
||||
|
@ -659,7 +659,7 @@ _ebpf_api_elf_verify_program_from_stream(
|
|||
if (!stream) {
|
||||
throw std::runtime_error(std::string("No such file or directory opening ") + stream_name);
|
||||
}
|
||||
auto raw_programs = read_elf(stream, stream_name, section_name, &verifier_options, platform);
|
||||
auto raw_programs = read_elf(stream, stream_name, section_name, verifier_options, platform);
|
||||
std::optional<raw_program> found_program;
|
||||
for (auto& program : raw_programs) {
|
||||
if ((program_name == nullptr) || (program.function_name == program_name)) {
|
||||
|
@ -683,9 +683,9 @@ _ebpf_api_elf_verify_program_from_stream(
|
|||
}
|
||||
auto& program = std::get<InstructionSeq>(programOrError);
|
||||
|
||||
verifier_options.simplify = false;
|
||||
verifier_options.cfg_opts.simplify = false;
|
||||
bool res =
|
||||
ebpf_verify_program(output, program, raw_program.info, &verifier_options, (ebpf_verifier_stats_t*)stats);
|
||||
ebpf_verify_program(output, program, raw_program.info, verifier_options, (ebpf_verifier_stats_t*)stats);
|
||||
if (!res) {
|
||||
error << "Verification failed";
|
||||
*error_message = allocate_string(error.str());
|
||||
|
|
|
@ -18,7 +18,7 @@ _Must_inspect_result_ ebpf_result_t
|
|||
load_byte_code(
|
||||
std::variant<std::string, std::vector<uint8_t>>& file_or_buffer,
|
||||
_In_opt_z_ const char* section_name,
|
||||
_In_ const ebpf_verifier_options_t* verifier_options,
|
||||
_In_ const ebpf_verifier_options_t& verifier_options,
|
||||
_In_z_ const char* pin_root_path,
|
||||
_Inout_ std::vector<ebpf_program_t*>& programs,
|
||||
_Inout_ std::vector<ebpf_map_t*>& maps,
|
||||
|
|
|
@ -64,7 +64,9 @@ _Guarded_by_(_ebpf_state_mutex) static std::vector<ebpf_object_t*> _ebpf_objects
|
|||
#define SERVICE_PARAMETERS L"Parameters"
|
||||
#define NPI_MODULE_ID L"NpiModuleId"
|
||||
|
||||
#define NO_EXCEPT_TRY noexcept try
|
||||
#define NO_EXCEPT_TRY \
|
||||
noexcept \
|
||||
try
|
||||
|
||||
#define CATCH_NO_MEMORY_FD \
|
||||
catch (const std::bad_alloc&) { EBPF_RETURN_FD(ebpf_fd_invalid); }
|
||||
|
@ -2278,11 +2280,12 @@ _initialize_ebpf_object_from_elf(
|
|||
|
||||
ebpf_result_t result = EBPF_SUCCESS;
|
||||
|
||||
ebpf_verifier_options_t verifier_options{false, false, false, false, false};
|
||||
ebpf_verifier_options_t verifier_options{};
|
||||
|
||||
result = load_byte_code(
|
||||
file_or_data,
|
||||
nullptr,
|
||||
&verifier_options,
|
||||
verifier_options,
|
||||
pin_root_path ? pin_root_path : DEFAULT_PIN_ROOT_PATH,
|
||||
object.programs,
|
||||
object.maps,
|
||||
|
@ -4174,7 +4177,8 @@ typedef struct _ebpf_ring_buffer_subscription
|
|||
: unsubscribed(false), ring_buffer_map_handle(ebpf_handle_invalid), sample_callback_context(nullptr),
|
||||
sample_callback(nullptr), buffer(nullptr), reply({}), async_ioctl_completion(nullptr),
|
||||
async_ioctl_failed(false)
|
||||
{}
|
||||
{
|
||||
}
|
||||
~_ebpf_ring_buffer_subscription()
|
||||
{
|
||||
EBPF_LOG_ENTRY();
|
||||
|
|
|
@ -5,7 +5,18 @@
|
|||
#include "ebpf_api.h"
|
||||
#include "ebpf_execution_context.h"
|
||||
#include "ebpf_utilities.h"
|
||||
|
||||
#pragma warning(push)
|
||||
#pragma warning(disable : 26439) // This kind of function should not throw. Declare it 'noexcept'.
|
||||
#pragma warning(disable : 26451) // Arithmetic overflow: Using operator '+' on a 4 byte value and then casting the
|
||||
// result to a 8 byte value.
|
||||
#undef min // don't interfere with C++ min/max definitions required inside platform.hpp.
|
||||
#undef max
|
||||
#include "platform.hpp"
|
||||
#define max(a, b) (((a) > (b)) ? (a) : (b))
|
||||
#define min(a, b) (((a) < (b)) ? (a) : (b))
|
||||
#pragma warning(pop)
|
||||
|
||||
#include "windows_platform_common.hpp"
|
||||
|
||||
#include <errno.h>
|
||||
|
|
|
@ -1181,7 +1181,6 @@ _insert_into_hot_list(_Inout_ ebpf_core_lru_map_t* map, size_t partition, _Inout
|
|||
{
|
||||
ebpf_lru_key_state_t key_state = _get_key_state(map, partition, entry);
|
||||
ebpf_lock_state_t state = 0;
|
||||
bool is_preemptible = ebpf_is_preemptible();
|
||||
|
||||
switch (key_state) {
|
||||
case EBPF_LRU_KEY_UNINITIALIZED:
|
||||
|
@ -1194,11 +1193,7 @@ _insert_into_hot_list(_Inout_ ebpf_core_lru_map_t* map, size_t partition, _Inout
|
|||
return;
|
||||
}
|
||||
|
||||
if (!is_preemptible) {
|
||||
ebpf_lock_lock_at_dispatch(&map->partitions[partition].lock);
|
||||
} else {
|
||||
state = ebpf_lock_lock(&map->partitions[partition].lock);
|
||||
}
|
||||
state = ebpf_lock_lock(&map->partitions[partition].lock);
|
||||
|
||||
key_state = _get_key_state(map, partition, entry);
|
||||
|
||||
|
@ -1226,12 +1221,7 @@ _insert_into_hot_list(_Inout_ ebpf_core_lru_map_t* map, size_t partition, _Inout
|
|||
}
|
||||
|
||||
_merge_hot_into_cold_list_if_needed(map, partition);
|
||||
|
||||
if (!is_preemptible) {
|
||||
ebpf_lock_unlock_at_dispatch(&map->partitions[partition].lock);
|
||||
} else {
|
||||
ebpf_lock_unlock(&map->partitions[partition].lock, state);
|
||||
}
|
||||
ebpf_lock_unlock(&map->partitions[partition].lock, state);
|
||||
}
|
||||
|
||||
/**
|
||||
|
|
|
@ -43,26 +43,28 @@ _Requires_lock_not_held_(*lock) _Acquires_lock_(*lock) _IRQL_requires_max_(DISPA
|
|||
ebpf_lock_state_t
|
||||
ebpf_lock_lock(_Inout_ ebpf_lock_t* lock)
|
||||
{
|
||||
return KeAcquireSpinLockRaiseToDpc(lock);
|
||||
KIRQL old_irql = KeGetCurrentIrql();
|
||||
|
||||
if (old_irql < DISPATCH_LEVEL) {
|
||||
old_irql = KeAcquireSpinLockRaiseToDpc(lock);
|
||||
} else {
|
||||
KeAcquireSpinLockAtDpcLevel(lock);
|
||||
}
|
||||
return old_irql;
|
||||
}
|
||||
|
||||
#pragma warning(push)
|
||||
#pragma warning(disable : 28157) // Prefast is not able to understand that the IRQL is lowered if it was raised.
|
||||
_Requires_lock_held_(*lock) _Releases_lock_(*lock) _IRQL_requires_(DISPATCH_LEVEL) void ebpf_lock_unlock(
|
||||
_Inout_ ebpf_lock_t* lock, _IRQL_restores_ ebpf_lock_state_t state)
|
||||
{
|
||||
KeReleaseSpinLock(lock, state);
|
||||
}
|
||||
|
||||
_Requires_lock_not_held_(*lock) _Acquires_lock_(*lock) _IRQL_requires_max_(DISPATCH_LEVEL)
|
||||
_IRQL_requires_(DISPATCH_LEVEL) void ebpf_lock_lock_at_dispatch(_Inout_ ebpf_lock_t* lock)
|
||||
{
|
||||
KeAcquireSpinLockAtDpcLevel(lock);
|
||||
}
|
||||
|
||||
_Requires_lock_held_(*lock) _Releases_lock_(*lock)
|
||||
_IRQL_requires_(DISPATCH_LEVEL) void ebpf_lock_unlock_at_dispatch(_Inout_ ebpf_lock_t* lock)
|
||||
{
|
||||
KeReleaseSpinLockFromDpcLevel(lock);
|
||||
if (state < DISPATCH_LEVEL) {
|
||||
KeReleaseSpinLock(lock, state);
|
||||
} else {
|
||||
KeReleaseSpinLockFromDpcLevel(lock);
|
||||
}
|
||||
}
|
||||
#pragma warning(pop)
|
||||
|
||||
bool
|
||||
ebpf_is_preemptible()
|
||||
|
|
|
@ -212,6 +212,7 @@ extern "C"
|
|||
* @param[in, out] lock Pointer to memory location that contains the lock.
|
||||
* @returns The previous lock_state required for unlock.
|
||||
*/
|
||||
EBPF_INLINE_HINT
|
||||
_Requires_lock_not_held_(*lock) _Acquires_lock_(*lock) _IRQL_requires_max_(DISPATCH_LEVEL) _IRQL_saves_
|
||||
_IRQL_raises_(DISPATCH_LEVEL) ebpf_lock_state_t ebpf_lock_lock(_Inout_ ebpf_lock_t* lock);
|
||||
|
||||
|
@ -220,25 +221,10 @@ extern "C"
|
|||
* @param[in, out] lock Pointer to memory location that contains the lock.
|
||||
* @param[in] state The state returned from ebpf_lock_lock.
|
||||
*/
|
||||
EBPF_INLINE_HINT
|
||||
_Requires_lock_held_(*lock) _Releases_lock_(*lock) _IRQL_requires_(DISPATCH_LEVEL) void ebpf_lock_unlock(
|
||||
_Inout_ ebpf_lock_t* lock, _IRQL_restores_ ebpf_lock_state_t state);
|
||||
|
||||
/**
|
||||
* @brief Acquire exclusive access to the lock.
|
||||
* @param[in, out] lock Pointer to memory location that contains the lock.
|
||||
* @returns The previous lock_state required for unlock.
|
||||
*/
|
||||
_Requires_lock_not_held_(*lock) _Acquires_lock_(*lock) _IRQL_requires_(DISPATCH_LEVEL)
|
||||
_IRQL_requires_max_(DISPATCH_LEVEL) void ebpf_lock_lock_at_dispatch(_Inout_ ebpf_lock_t* lock);
|
||||
|
||||
/**
|
||||
* @brief Release exclusive access to the lock.
|
||||
* @param[in, out] lock Pointer to memory location that contains the lock.
|
||||
* @param[in] state The state returned from ebpf_lock_lock.
|
||||
*/
|
||||
_Requires_lock_held_(*lock) _Releases_lock_(*lock)
|
||||
_IRQL_requires_(DISPATCH_LEVEL) void ebpf_lock_unlock_at_dispatch(_Inout_ ebpf_lock_t* lock);
|
||||
|
||||
/**
|
||||
* @brief Raise the IRQL to new_irql.
|
||||
*
|
||||
|
|
|
@ -25,17 +25,17 @@ _analyze(raw_program& raw_prog, const char** error_message, uint32_t* error_mess
|
|||
InstructionSeq& prog = std::get<InstructionSeq>(prog_or_error);
|
||||
|
||||
// First try optimized for the success case.
|
||||
ebpf_verifier_options_t options = ebpf_verifier_default_options;
|
||||
ebpf_verifier_options_t options{};
|
||||
ebpf_verifier_stats_t stats;
|
||||
options.check_termination = true;
|
||||
bool res = ebpf_verify_program(std::cout, prog, raw_prog.info, &options, &stats);
|
||||
options.cfg_opts.check_for_termination = true;
|
||||
bool res = ebpf_verify_program(std::cout, prog, raw_prog.info, options, &stats);
|
||||
if (!res) {
|
||||
// On failure, retry to get the more detailed error message.
|
||||
std::ostringstream oss;
|
||||
options.simplify = false;
|
||||
options.cfg_opts.simplify = false;
|
||||
options.print_failures = true;
|
||||
// Until https://github.com/vbpf/ebpf-verifier/issues/643 is fixed, don't set options.assume_assertions to true.
|
||||
(void)ebpf_verify_program(oss, prog, raw_prog.info, &options, &stats);
|
||||
(void)ebpf_verify_program(oss, prog, raw_prog.info, options, &stats);
|
||||
|
||||
*error_message = allocate_string(oss.str(), error_message_size);
|
||||
return EBPF_VERIFICATION_FAILED; // Error;
|
||||
|
|
|
@ -85,7 +85,7 @@
|
|||
<ClCompile>
|
||||
<PreprocessorDefinitions>_DEBUG;_CONSOLE;%(PreprocessorDefinitions)</PreprocessorDefinitions>
|
||||
<ConformanceMode>true</ConformanceMode>
|
||||
<AdditionalIncludeDirectories>$(SolutionDir)include;$(SolutionDir)libs\api;$(SolutionDir)tests\end_to_end;$(SolutionDir)tests\libs\util;$(SolutionDir)tests\libs\common;$(SolutionDir)tests\sample\ext\inc;$(SolutionDir)libs\execution_context;$(SolutionDir)libs\shared;$(SolutionDir)libs\shared\user;$(SolutionDir)libs\runtime;$(SolutionDir)libs\runtime\user;$(SolutionDir)external\usersim\inc;$(SolutionDir)external\usersim\cxplat\inc;$(SolutionDir)external\usersim\cxplat\inc\winuser;$(SolutionDir)libs\thunk;$(SolutionDir)\netebpfext;$(SolutionDir)external\catch2\src;$(SolutionDir)external\catch2\build\generated-includes;$(SolutionDir)external\bpftool;$(SolutionDir)external\ebpf-verifier\src;$(SolutionDir)libs\api_common;$(SolutionDir)undocked\tests\sample\ext\inc;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
|
||||
<AdditionalIncludeDirectories>$(SolutionDir)include;$(SolutionDir)libs\api;$(SolutionDir)tests\end_to_end;$(SolutionDir)tests\libs\util;$(SolutionDir)tests\libs\common;$(SolutionDir)tests\sample\ext\inc;$(SolutionDir)libs\execution_context;$(SolutionDir)libs\shared;$(SolutionDir)libs\shared\user;$(SolutionDir)libs\runtime;$(SolutionDir)libs\runtime\user;$(SolutionDir)external\usersim\inc;$(SolutionDir)external\usersim\cxplat\inc;$(SolutionDir)external\usersim\cxplat\inc\winuser;$(SolutionDir)libs\thunk;$(SolutionDir)\netebpfext;$(SolutionDir)external\catch2\src;$(SolutionDir)external\catch2\build\generated-includes;$(SolutionDir)external\bpftool;$(SolutionDir)external\ebpf-verifier\src;$(SolutionDir)external\ebpf-verifier\build\_deps\gsl-src\include;$(SolutionDir)libs\api_common;$(SolutionDir)undocked\tests\sample\ext\inc;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
|
||||
</ClCompile>
|
||||
<Link>
|
||||
<SubSystem>Console</SubSystem>
|
||||
|
@ -97,7 +97,7 @@
|
|||
<ClCompile>
|
||||
<PreprocessorDefinitions>_DEBUG;_CONSOLE;%(PreprocessorDefinitions)</PreprocessorDefinitions>
|
||||
<ConformanceMode>true</ConformanceMode>
|
||||
<AdditionalIncludeDirectories>$(SolutionDir)include;$(SolutionDir)libs\api;$(SolutionDir)tests\end_to_end;$(SolutionDir)tests\libs\util;$(SolutionDir)tests\libs\common;$(SolutionDir)tests\sample\ext\inc;$(SolutionDir)libs\execution_context;$(SolutionDir)libs\shared;$(SolutionDir)libs\shared\user;$(SolutionDir)libs\runtime;$(SolutionDir)libs\runtime\user;$(SolutionDir)external\usersim\inc;$(SolutionDir)external\usersim\cxplat\inc;$(SolutionDir)external\usersim\cxplat\inc\winuser;$(SolutionDir)libs\thunk;$(SolutionDir)\netebpfext;$(SolutionDir)external\catch2\src;$(SolutionDir)external\catch2\build\generated-includes;$(SolutionDir)external\bpftool;$(SolutionDir)external\ebpf-verifier\src;$(SolutionDir)libs\api_common;$(SolutionDir)undocked\tests\sample\ext\inc;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
|
||||
<AdditionalIncludeDirectories>$(SolutionDir)include;$(SolutionDir)libs\api;$(SolutionDir)tests\end_to_end;$(SolutionDir)tests\libs\util;$(SolutionDir)tests\libs\common;$(SolutionDir)tests\sample\ext\inc;$(SolutionDir)libs\execution_context;$(SolutionDir)libs\shared;$(SolutionDir)libs\shared\user;$(SolutionDir)libs\runtime;$(SolutionDir)libs\runtime\user;$(SolutionDir)external\usersim\inc;$(SolutionDir)external\usersim\cxplat\inc;$(SolutionDir)external\usersim\cxplat\inc\winuser;$(SolutionDir)libs\thunk;$(SolutionDir)\netebpfext;$(SolutionDir)external\catch2\src;$(SolutionDir)external\catch2\build\generated-includes;$(SolutionDir)external\bpftool;$(SolutionDir)external\ebpf-verifier\src;$(SolutionDir)external\ebpf-verifier\build\_deps\gsl-src\include;$(SolutionDir)libs\api_common;$(SolutionDir)undocked\tests\sample\ext\inc;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
|
||||
</ClCompile>
|
||||
<Link>
|
||||
<SubSystem>Console</SubSystem>
|
||||
|
@ -109,7 +109,7 @@
|
|||
<ClCompile>
|
||||
<PreprocessorDefinitions>_DEBUG;_CONSOLE;%(PreprocessorDefinitions)</PreprocessorDefinitions>
|
||||
<ConformanceMode>true</ConformanceMode>
|
||||
<AdditionalIncludeDirectories>$(SolutionDir)include;$(SolutionDir)libs\api;$(SolutionDir)tests\end_to_end;$(SolutionDir)tests\libs\util;$(SolutionDir)tests\libs\common;$(SolutionDir)tests\sample\ext\inc;$(SolutionDir)libs\execution_context;$(SolutionDir)libs\shared;$(SolutionDir)libs\shared\user;$(SolutionDir)libs\runtime;$(SolutionDir)libs\runtime\user;$(SolutionDir)external\usersim\inc;$(SolutionDir)external\usersim\cxplat\inc;$(SolutionDir)external\usersim\cxplat\inc\winuser;$(SolutionDir)libs\thunk;$(SolutionDir)\netebpfext;$(SolutionDir)external\catch2\src;$(SolutionDir)external\catch2\build\generated-includes;$(SolutionDir)external\bpftool;$(SolutionDir)external\ebpf-verifier\src;$(SolutionDir)libs\api_common;$(SolutionDir)undocked\tests\sample\ext\inc;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
|
||||
<AdditionalIncludeDirectories>$(SolutionDir)include;$(SolutionDir)libs\api;$(SolutionDir)tests\end_to_end;$(SolutionDir)tests\libs\util;$(SolutionDir)tests\libs\common;$(SolutionDir)tests\sample\ext\inc;$(SolutionDir)libs\execution_context;$(SolutionDir)libs\shared;$(SolutionDir)libs\shared\user;$(SolutionDir)libs\runtime;$(SolutionDir)libs\runtime\user;$(SolutionDir)external\usersim\inc;$(SolutionDir)external\usersim\cxplat\inc;$(SolutionDir)external\usersim\cxplat\inc\winuser;$(SolutionDir)libs\thunk;$(SolutionDir)\netebpfext;$(SolutionDir)external\catch2\src;$(SolutionDir)external\catch2\build\generated-includes;$(SolutionDir)external\bpftool;$(SolutionDir)external\ebpf-verifier\src;$(SolutionDir)external\ebpf-verifier\build\_deps\gsl-src\include;$(SolutionDir)libs\api_common;$(SolutionDir)undocked\tests\sample\ext\inc;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
|
||||
</ClCompile>
|
||||
<Link>
|
||||
<SubSystem>Console</SubSystem>
|
||||
|
@ -121,7 +121,7 @@
|
|||
<ClCompile>
|
||||
<PreprocessorDefinitions>NDEBUG;_CONSOLE;%(PreprocessorDefinitions)</PreprocessorDefinitions>
|
||||
<ConformanceMode>true</ConformanceMode>
|
||||
<AdditionalIncludeDirectories>$(SolutionDir)include;$(SolutionDir)libs\api;$(SolutionDir)tests\end_to_end;$(SolutionDir)tests\libs\util;$(SolutionDir)tests\libs\common;$(SolutionDir)tests\sample\ext\inc;$(SolutionDir)libs\execution_context;$(SolutionDir)libs\shared;$(SolutionDir)libs\shared\user;$(SolutionDir)libs\runtime;$(SolutionDir)libs\runtime\user;$(SolutionDir)external\usersim\inc;$(SolutionDir)external\usersim\cxplat\inc;$(SolutionDir)external\usersim\cxplat\inc\winuser;$(SolutionDir)libs\thunk;$(SolutionDir)\netebpfext;$(SolutionDir)external\catch2\src;$(SolutionDir)external\catch2\build\generated-includes;$(SolutionDir)external\bpftool;$(SolutionDir)external\ebpf-verifier\src;$(SolutionDir)libs\api_common;$(SolutionDir)undocked\tests\sample\ext\inc;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
|
||||
<AdditionalIncludeDirectories>$(SolutionDir)include;$(SolutionDir)libs\api;$(SolutionDir)tests\end_to_end;$(SolutionDir)tests\libs\util;$(SolutionDir)tests\libs\common;$(SolutionDir)tests\sample\ext\inc;$(SolutionDir)libs\execution_context;$(SolutionDir)libs\shared;$(SolutionDir)libs\shared\user;$(SolutionDir)libs\runtime;$(SolutionDir)libs\runtime\user;$(SolutionDir)external\usersim\inc;$(SolutionDir)external\usersim\cxplat\inc;$(SolutionDir)external\usersim\cxplat\inc\winuser;$(SolutionDir)libs\thunk;$(SolutionDir)\netebpfext;$(SolutionDir)external\catch2\src;$(SolutionDir)external\catch2\build\generated-includes;$(SolutionDir)external\bpftool;$(SolutionDir)external\ebpf-verifier\src;$(SolutionDir)external\ebpf-verifier\build\_deps\gsl-src\include;$(SolutionDir)libs\api_common;$(SolutionDir)undocked\tests\sample\ext\inc;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
|
||||
</ClCompile>
|
||||
<Link>
|
||||
<SubSystem>Console</SubSystem>
|
||||
|
@ -136,7 +136,7 @@
|
|||
<ClCompile>
|
||||
<PreprocessorDefinitions>NDEBUG;_CONSOLE;%(PreprocessorDefinitions)</PreprocessorDefinitions>
|
||||
<ConformanceMode>true</ConformanceMode>
|
||||
<AdditionalIncludeDirectories>$(SolutionDir)include;$(SolutionDir)libs\api;$(SolutionDir)tests\end_to_end;$(SolutionDir)tests\libs\util;$(SolutionDir)tests\libs\common;$(SolutionDir)tests\sample\ext\inc;$(SolutionDir)libs\execution_context;$(SolutionDir)libs\shared;$(SolutionDir)libs\shared\user;$(SolutionDir)libs\runtime;$(SolutionDir)libs\runtime\user;$(SolutionDir)external\usersim\inc;$(SolutionDir)external\usersim\cxplat\inc;$(SolutionDir)external\usersim\cxplat\inc\winuser;$(SolutionDir)libs\thunk;$(SolutionDir)\netebpfext;$(SolutionDir)external\catch2\src;$(SolutionDir)external\catch2\build\generated-includes;$(SolutionDir)external\bpftool;$(SolutionDir)external\ebpf-verifier\src;$(SolutionDir)libs\api_common;$(SolutionDir)undocked\tests\sample\ext\inc;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
|
||||
<AdditionalIncludeDirectories>$(SolutionDir)include;$(SolutionDir)libs\api;$(SolutionDir)tests\end_to_end;$(SolutionDir)tests\libs\util;$(SolutionDir)tests\libs\common;$(SolutionDir)tests\sample\ext\inc;$(SolutionDir)libs\execution_context;$(SolutionDir)libs\shared;$(SolutionDir)libs\shared\user;$(SolutionDir)libs\runtime;$(SolutionDir)libs\runtime\user;$(SolutionDir)external\usersim\inc;$(SolutionDir)external\usersim\cxplat\inc;$(SolutionDir)external\usersim\cxplat\inc\winuser;$(SolutionDir)libs\thunk;$(SolutionDir)\netebpfext;$(SolutionDir)external\catch2\src;$(SolutionDir)external\catch2\build\generated-includes;$(SolutionDir)external\bpftool;$(SolutionDir)external\ebpf-verifier\src;$(SolutionDir)external\ebpf-verifier\build\_deps\gsl-src\include;$(SolutionDir)libs\api_common;$(SolutionDir)undocked\tests\sample\ext\inc;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
|
||||
</ClCompile>
|
||||
<Link>
|
||||
<SubSystem>Console</SubSystem>
|
||||
|
@ -176,4 +176,4 @@
|
|||
<ClInclude Include="rpc_client.h" />
|
||||
</ItemGroup>
|
||||
<Import Project="$(VCTargetsPath)\Microsoft.Cpp.targets" />
|
||||
</Project>
|
||||
</Project>
|
|
@ -48,7 +48,7 @@ _get_maps(_Outptr_result_buffer_maybenull_(*count) map_entry_t** maps, _Out_ siz
|
|||
|
||||
// Forward references for local functions.
|
||||
static uint64_t
|
||||
BindMonitor_Callee(uint64_t r1, uint64_t r2, uint64_t r3, uint64_t r4, uint64_t r5, uint64_t r10);
|
||||
BindMonitor_Callee(uint64_t r1, uint64_t r2, uint64_t r3, uint64_t r4, uint64_t r5, uint64_t r10, void* context);
|
||||
|
||||
static GUID BindMonitor_Caller_program_type_guid = {
|
||||
0x608c517c, 0x6c52, 0x4a26, {0xb6, 0x77, 0xbb, 0x1c, 0x34, 0x42, 0x5a, 0xdf}};
|
||||
|
@ -75,8 +75,6 @@ BindMonitor_Caller(void* context)
|
|||
register uint64_t r4 = 0;
|
||||
#line 27 "sample/bindmonitor_bpf2bpf.c"
|
||||
register uint64_t r5 = 0;
|
||||
#line 27 "sample/bindmonitor_bpf2bpf.c"
|
||||
register uint64_t r6 = 0;
|
||||
#line 27 "sample/bindmonitor_bpf2bpf.c"
|
||||
register uint64_t r10 = 0;
|
||||
|
||||
|
@ -85,57 +83,161 @@ BindMonitor_Caller(void* context)
|
|||
#line 27 "sample/bindmonitor_bpf2bpf.c"
|
||||
r10 = (uintptr_t)((uint8_t*)stack + sizeof(stack));
|
||||
|
||||
// EBPF_OP_MOV64_REG pc=0 dst=r6 src=r1 offset=0 imm=0
|
||||
// EBPF_OP_STXDW pc=0 dst=r10 src=r1 offset=-16 imm=0
|
||||
#line 27 "sample/bindmonitor_bpf2bpf.c"
|
||||
r6 = r1;
|
||||
// EBPF_OP_ADD64_IMM pc=1 dst=r6 src=r0 offset=0 imm=48
|
||||
#line 29 "sample/bindmonitor_bpf2bpf.c"
|
||||
r6 += IMMEDIATE(48);
|
||||
// EBPF_OP_MOV64_REG pc=2 dst=r1 src=r6 offset=0 imm=0
|
||||
#line 30 "sample/bindmonitor_bpf2bpf.c"
|
||||
r1 = r6;
|
||||
// EBPF_OP_CALL pc=3 dst=r0 src=r1 offset=0 imm=10
|
||||
#line 30 "sample/bindmonitor_bpf2bpf.c"
|
||||
r0 = BindMonitor_Callee(r1, r2, r3, r4, r5, r10);
|
||||
// EBPF_OP_MOV64_REG pc=4 dst=r1 src=r0 offset=0 imm=0
|
||||
#line 30 "sample/bindmonitor_bpf2bpf.c"
|
||||
r1 = r0;
|
||||
// EBPF_OP_MOV64_IMM pc=5 dst=r0 src=r0 offset=0 imm=1
|
||||
#line 30 "sample/bindmonitor_bpf2bpf.c"
|
||||
r0 = IMMEDIATE(1);
|
||||
// EBPF_OP_LSH64_IMM pc=6 dst=r1 src=r0 offset=0 imm=32
|
||||
#line 30 "sample/bindmonitor_bpf2bpf.c"
|
||||
r1 <<= (IMMEDIATE(32) & 63);
|
||||
// EBPF_OP_RSH64_IMM pc=7 dst=r1 src=r0 offset=0 imm=32
|
||||
#line 30 "sample/bindmonitor_bpf2bpf.c"
|
||||
r1 >>= (IMMEDIATE(32) & 63);
|
||||
// EBPF_OP_JNE_IMM pc=8 dst=r1 src=r0 offset=4 imm=0
|
||||
#line 30 "sample/bindmonitor_bpf2bpf.c"
|
||||
if (r1 != IMMEDIATE(0)) {
|
||||
#line 30 "sample/bindmonitor_bpf2bpf.c"
|
||||
*(uint64_t*)(uintptr_t)(r10 + OFFSET(-16)) = (uint64_t)r1;
|
||||
// EBPF_OP_MOV64_IMM pc=1 dst=r1 src=r0 offset=0 imm=204
|
||||
#line 27 "sample/bindmonitor_bpf2bpf.c"
|
||||
r1 = IMMEDIATE(204);
|
||||
// EBPF_OP_STXB pc=2 dst=r10 src=r1 offset=-18 imm=0
|
||||
#line 31 "sample/bindmonitor_bpf2bpf.c"
|
||||
*(uint8_t*)(uintptr_t)(r10 + OFFSET(-18)) = (uint8_t)r1;
|
||||
// EBPF_OP_STXB pc=3 dst=r10 src=r1 offset=-17 imm=0
|
||||
#line 32 "sample/bindmonitor_bpf2bpf.c"
|
||||
*(uint8_t*)(uintptr_t)(r10 + OFFSET(-17)) = (uint8_t)r1;
|
||||
// EBPF_OP_LDXDW pc=4 dst=r1 src=r10 offset=-16 imm=0
|
||||
#line 34 "sample/bindmonitor_bpf2bpf.c"
|
||||
r1 = *(uint64_t*)(uintptr_t)(r10 + OFFSET(-16));
|
||||
// EBPF_OP_LDXDW pc=5 dst=r1 src=r1 offset=16 imm=0
|
||||
#line 34 "sample/bindmonitor_bpf2bpf.c"
|
||||
r1 = *(uint64_t*)(uintptr_t)(r1 + OFFSET(16));
|
||||
// EBPF_OP_STXDW pc=6 dst=r10 src=r1 offset=-32 imm=0
|
||||
#line 34 "sample/bindmonitor_bpf2bpf.c"
|
||||
*(uint64_t*)(uintptr_t)(r10 + OFFSET(-32)) = (uint64_t)r1;
|
||||
// EBPF_OP_LDXDW pc=7 dst=r1 src=r10 offset=-16 imm=0
|
||||
#line 35 "sample/bindmonitor_bpf2bpf.c"
|
||||
r1 = *(uint64_t*)(uintptr_t)(r10 + OFFSET(-16));
|
||||
// EBPF_OP_ADD64_IMM pc=8 dst=r1 src=r0 offset=0 imm=16
|
||||
#line 35 "sample/bindmonitor_bpf2bpf.c"
|
||||
r1 += IMMEDIATE(16);
|
||||
// EBPF_OP_CALL pc=9 dst=r0 src=r1 offset=0 imm=35
|
||||
#line 35 "sample/bindmonitor_bpf2bpf.c"
|
||||
r0 = BindMonitor_Callee(r1, r2, r3, r4, r5, r10, context);
|
||||
// EBPF_OP_LSH64_IMM pc=10 dst=r0 src=r0 offset=0 imm=32
|
||||
#line 35 "sample/bindmonitor_bpf2bpf.c"
|
||||
r0 <<= (IMMEDIATE(32) & 63);
|
||||
// EBPF_OP_RSH64_IMM pc=11 dst=r0 src=r0 offset=0 imm=32
|
||||
#line 35 "sample/bindmonitor_bpf2bpf.c"
|
||||
r0 >>= (IMMEDIATE(32) & 63);
|
||||
// EBPF_OP_JNE_IMM pc=12 dst=r0 src=r0 offset=5 imm=1
|
||||
#line 35 "sample/bindmonitor_bpf2bpf.c"
|
||||
if (r0 != IMMEDIATE(1)) {
|
||||
#line 35 "sample/bindmonitor_bpf2bpf.c"
|
||||
goto label_2;
|
||||
#line 30 "sample/bindmonitor_bpf2bpf.c"
|
||||
#line 35 "sample/bindmonitor_bpf2bpf.c"
|
||||
}
|
||||
// EBPF_OP_LDXB pc=9 dst=r1 src=r6 offset=0 imm=0
|
||||
#line 29 "sample/bindmonitor_bpf2bpf.c"
|
||||
r1 = *(uint8_t*)(uintptr_t)(r6 + OFFSET(0));
|
||||
// EBPF_OP_JEQ_IMM pc=10 dst=r1 src=r0 offset=1 imm=1
|
||||
#line 29 "sample/bindmonitor_bpf2bpf.c"
|
||||
if (r1 == IMMEDIATE(1)) {
|
||||
#line 29 "sample/bindmonitor_bpf2bpf.c"
|
||||
goto label_1;
|
||||
#line 29 "sample/bindmonitor_bpf2bpf.c"
|
||||
}
|
||||
// EBPF_OP_MOV64_IMM pc=11 dst=r0 src=r0 offset=0 imm=0
|
||||
#line 29 "sample/bindmonitor_bpf2bpf.c"
|
||||
r0 = IMMEDIATE(0);
|
||||
// EBPF_OP_JA pc=13 dst=r0 src=r0 offset=0 imm=0
|
||||
#line 35 "sample/bindmonitor_bpf2bpf.c"
|
||||
goto label_1;
|
||||
label_1:
|
||||
// EBPF_OP_LSH64_IMM pc=12 dst=r0 src=r0 offset=0 imm=1
|
||||
#line 29 "sample/bindmonitor_bpf2bpf.c"
|
||||
r0 <<= (IMMEDIATE(1) & 63);
|
||||
// EBPF_OP_MOV64_IMM pc=14 dst=r1 src=r0 offset=0 imm=1
|
||||
#line 35 "sample/bindmonitor_bpf2bpf.c"
|
||||
r1 = IMMEDIATE(1);
|
||||
// EBPF_OP_STXW pc=15 dst=r10 src=r1 offset=-4 imm=0
|
||||
#line 36 "sample/bindmonitor_bpf2bpf.c"
|
||||
*(uint32_t*)(uintptr_t)(r10 + OFFSET(-4)) = (uint32_t)r1;
|
||||
// EBPF_OP_STXW pc=16 dst=r10 src=r1 offset=-36 imm=0
|
||||
#line 36 "sample/bindmonitor_bpf2bpf.c"
|
||||
*(uint32_t*)(uintptr_t)(r10 + OFFSET(-36)) = (uint32_t)r1;
|
||||
// EBPF_OP_JA pc=17 dst=r0 src=r0 offset=25 imm=0
|
||||
#line 36 "sample/bindmonitor_bpf2bpf.c"
|
||||
goto label_8;
|
||||
label_2:
|
||||
// EBPF_OP_EXIT pc=13 dst=r0 src=r0 offset=0 imm=0
|
||||
#line 38 "sample/bindmonitor_bpf2bpf.c"
|
||||
// EBPF_OP_LDXB pc=18 dst=r1 src=r10 offset=-18 imm=0
|
||||
#line 40 "sample/bindmonitor_bpf2bpf.c"
|
||||
r1 = *(uint8_t*)(uintptr_t)(r10 + OFFSET(-18));
|
||||
// EBPF_OP_JNE_IMM pc=19 dst=r1 src=r0 offset=4 imm=204
|
||||
#line 40 "sample/bindmonitor_bpf2bpf.c"
|
||||
if (r1 != IMMEDIATE(204)) {
|
||||
#line 40 "sample/bindmonitor_bpf2bpf.c"
|
||||
goto label_4;
|
||||
#line 40 "sample/bindmonitor_bpf2bpf.c"
|
||||
}
|
||||
// EBPF_OP_JA pc=20 dst=r0 src=r0 offset=0 imm=0
|
||||
#line 40 "sample/bindmonitor_bpf2bpf.c"
|
||||
goto label_3;
|
||||
label_3:
|
||||
// EBPF_OP_LDXB pc=21 dst=r1 src=r10 offset=-17 imm=0
|
||||
#line 40 "sample/bindmonitor_bpf2bpf.c"
|
||||
r1 = *(uint8_t*)(uintptr_t)(r10 + OFFSET(-17));
|
||||
// EBPF_OP_JEQ_IMM pc=22 dst=r1 src=r0 offset=7 imm=204
|
||||
#line 40 "sample/bindmonitor_bpf2bpf.c"
|
||||
if (r1 == IMMEDIATE(204)) {
|
||||
#line 40 "sample/bindmonitor_bpf2bpf.c"
|
||||
goto label_5;
|
||||
#line 40 "sample/bindmonitor_bpf2bpf.c"
|
||||
}
|
||||
// EBPF_OP_JA pc=23 dst=r0 src=r0 offset=0 imm=0
|
||||
#line 40 "sample/bindmonitor_bpf2bpf.c"
|
||||
goto label_4;
|
||||
label_4:
|
||||
// EBPF_OP_LDDW pc=24 dst=r1 src=r0 offset=0 imm=-1
|
||||
#line 40 "sample/bindmonitor_bpf2bpf.c"
|
||||
r1 = (uint64_t)4294967295;
|
||||
// EBPF_OP_STXW pc=26 dst=r10 src=r1 offset=-4 imm=0
|
||||
#line 41 "sample/bindmonitor_bpf2bpf.c"
|
||||
*(uint32_t*)(uintptr_t)(r10 + OFFSET(-4)) = (uint32_t)r1;
|
||||
// EBPF_OP_MOV64_IMM pc=27 dst=r1 src=r0 offset=0 imm=1
|
||||
#line 41 "sample/bindmonitor_bpf2bpf.c"
|
||||
r1 = IMMEDIATE(1);
|
||||
// EBPF_OP_STXW pc=28 dst=r10 src=r1 offset=-36 imm=0
|
||||
#line 41 "sample/bindmonitor_bpf2bpf.c"
|
||||
*(uint32_t*)(uintptr_t)(r10 + OFFSET(-36)) = (uint32_t)r1;
|
||||
// EBPF_OP_JA pc=29 dst=r0 src=r0 offset=13 imm=0
|
||||
#line 41 "sample/bindmonitor_bpf2bpf.c"
|
||||
goto label_8;
|
||||
label_5:
|
||||
// EBPF_OP_LDXDW pc=30 dst=r1 src=r10 offset=-32 imm=0
|
||||
#line 44 "sample/bindmonitor_bpf2bpf.c"
|
||||
r1 = *(uint64_t*)(uintptr_t)(r10 + OFFSET(-32));
|
||||
// EBPF_OP_JNE_IMM pc=31 dst=r1 src=r0 offset=6 imm=1
|
||||
#line 44 "sample/bindmonitor_bpf2bpf.c"
|
||||
if (r1 != IMMEDIATE(1)) {
|
||||
#line 44 "sample/bindmonitor_bpf2bpf.c"
|
||||
goto label_7;
|
||||
#line 44 "sample/bindmonitor_bpf2bpf.c"
|
||||
}
|
||||
// EBPF_OP_JA pc=32 dst=r0 src=r0 offset=0 imm=0
|
||||
#line 44 "sample/bindmonitor_bpf2bpf.c"
|
||||
goto label_6;
|
||||
label_6:
|
||||
// EBPF_OP_MOV64_IMM pc=33 dst=r1 src=r0 offset=0 imm=2
|
||||
#line 44 "sample/bindmonitor_bpf2bpf.c"
|
||||
r1 = IMMEDIATE(2);
|
||||
// EBPF_OP_STXW pc=34 dst=r10 src=r1 offset=-4 imm=0
|
||||
#line 46 "sample/bindmonitor_bpf2bpf.c"
|
||||
*(uint32_t*)(uintptr_t)(r10 + OFFSET(-4)) = (uint32_t)r1;
|
||||
// EBPF_OP_MOV64_IMM pc=35 dst=r1 src=r0 offset=0 imm=1
|
||||
#line 46 "sample/bindmonitor_bpf2bpf.c"
|
||||
r1 = IMMEDIATE(1);
|
||||
// EBPF_OP_STXW pc=36 dst=r10 src=r1 offset=-36 imm=0
|
||||
#line 46 "sample/bindmonitor_bpf2bpf.c"
|
||||
*(uint32_t*)(uintptr_t)(r10 + OFFSET(-36)) = (uint32_t)r1;
|
||||
// EBPF_OP_JA pc=37 dst=r0 src=r0 offset=5 imm=0
|
||||
#line 46 "sample/bindmonitor_bpf2bpf.c"
|
||||
goto label_8;
|
||||
label_7:
|
||||
// EBPF_OP_MOV64_IMM pc=38 dst=r1 src=r0 offset=0 imm=0
|
||||
#line 46 "sample/bindmonitor_bpf2bpf.c"
|
||||
r1 = IMMEDIATE(0);
|
||||
// EBPF_OP_STXW pc=39 dst=r10 src=r1 offset=-4 imm=0
|
||||
#line 48 "sample/bindmonitor_bpf2bpf.c"
|
||||
*(uint32_t*)(uintptr_t)(r10 + OFFSET(-4)) = (uint32_t)r1;
|
||||
// EBPF_OP_MOV64_IMM pc=40 dst=r1 src=r0 offset=0 imm=1
|
||||
#line 48 "sample/bindmonitor_bpf2bpf.c"
|
||||
r1 = IMMEDIATE(1);
|
||||
// EBPF_OP_STXW pc=41 dst=r10 src=r1 offset=-36 imm=0
|
||||
#line 48 "sample/bindmonitor_bpf2bpf.c"
|
||||
*(uint32_t*)(uintptr_t)(r10 + OFFSET(-36)) = (uint32_t)r1;
|
||||
// EBPF_OP_JA pc=42 dst=r0 src=r0 offset=0 imm=0
|
||||
#line 48 "sample/bindmonitor_bpf2bpf.c"
|
||||
goto label_8;
|
||||
label_8:
|
||||
// EBPF_OP_LDXW pc=43 dst=r0 src=r10 offset=-4 imm=0
|
||||
#line 49 "sample/bindmonitor_bpf2bpf.c"
|
||||
r0 = *(uint32_t*)(uintptr_t)(r10 + OFFSET(-4));
|
||||
// EBPF_OP_EXIT pc=44 dst=r0 src=r0 offset=0 imm=0
|
||||
#line 49 "sample/bindmonitor_bpf2bpf.c"
|
||||
return r0;
|
||||
#line 27 "sample/bindmonitor_bpf2bpf.c"
|
||||
}
|
||||
|
@ -143,34 +245,49 @@ label_2:
|
|||
#line __LINE__ __FILE__
|
||||
|
||||
static uint64_t
|
||||
BindMonitor_Callee(uint64_t r1, uint64_t r2, uint64_t r3, uint64_t r4, uint64_t r5, uint64_t r10)
|
||||
BindMonitor_Callee(uint64_t r1, uint64_t r2, uint64_t r3, uint64_t r4, uint64_t r5, uint64_t r10, void* context)
|
||||
{
|
||||
register uint64_t r0 = 0;
|
||||
(void)r2;
|
||||
(void)r3;
|
||||
(void)r4;
|
||||
(void)r5;
|
||||
(void)r10;
|
||||
(void)context;
|
||||
|
||||
// EBPF_OP_LDXB pc=0 dst=r1 src=r1 offset=0 imm=0
|
||||
#line 43 "sample/bindmonitor_bpf2bpf.c"
|
||||
r1 = *(uint8_t*)(uintptr_t)(r1 + OFFSET(0));
|
||||
// EBPF_OP_MOV64_IMM pc=1 dst=r0 src=r0 offset=0 imm=1
|
||||
#line 43 "sample/bindmonitor_bpf2bpf.c"
|
||||
// EBPF_OP_STXDW pc=0 dst=r10 src=r1 offset=-8 imm=0
|
||||
#line 51 "sample/bindmonitor_bpf2bpf.c"
|
||||
*(uint64_t*)(uintptr_t)(r10 + OFFSET(-8)) = (uint64_t)r1;
|
||||
// EBPF_OP_MOV64_IMM pc=1 dst=r1 src=r0 offset=0 imm=187
|
||||
#line 51 "sample/bindmonitor_bpf2bpf.c"
|
||||
r1 = IMMEDIATE(187);
|
||||
// EBPF_OP_STXB pc=2 dst=r10 src=r1 offset=-10 imm=0
|
||||
#line 55 "sample/bindmonitor_bpf2bpf.c"
|
||||
*(uint8_t*)(uintptr_t)(r10 + OFFSET(-10)) = (uint8_t)r1;
|
||||
// EBPF_OP_STXB pc=3 dst=r10 src=r1 offset=-9 imm=0
|
||||
#line 56 "sample/bindmonitor_bpf2bpf.c"
|
||||
*(uint8_t*)(uintptr_t)(r10 + OFFSET(-9)) = (uint8_t)r1;
|
||||
// EBPF_OP_LDXDW pc=4 dst=r1 src=r10 offset=-8 imm=0
|
||||
#line 58 "sample/bindmonitor_bpf2bpf.c"
|
||||
r1 = *(uint64_t*)(uintptr_t)(r10 + OFFSET(-8));
|
||||
// EBPF_OP_LDXDW pc=5 dst=r1 src=r1 offset=0 imm=0
|
||||
#line 58 "sample/bindmonitor_bpf2bpf.c"
|
||||
r1 = *(uint64_t*)(uintptr_t)(r1 + OFFSET(0));
|
||||
// EBPF_OP_MOV64_IMM pc=6 dst=r0 src=r0 offset=0 imm=1
|
||||
#line 58 "sample/bindmonitor_bpf2bpf.c"
|
||||
r0 = IMMEDIATE(1);
|
||||
// EBPF_OP_JEQ_IMM pc=2 dst=r1 src=r0 offset=1 imm=0
|
||||
#line 43 "sample/bindmonitor_bpf2bpf.c"
|
||||
// EBPF_OP_JEQ_IMM pc=7 dst=r1 src=r0 offset=1 imm=0
|
||||
#line 58 "sample/bindmonitor_bpf2bpf.c"
|
||||
if (r1 == IMMEDIATE(0)) {
|
||||
#line 43 "sample/bindmonitor_bpf2bpf.c"
|
||||
#line 58 "sample/bindmonitor_bpf2bpf.c"
|
||||
goto label_1;
|
||||
#line 43 "sample/bindmonitor_bpf2bpf.c"
|
||||
#line 58 "sample/bindmonitor_bpf2bpf.c"
|
||||
}
|
||||
// EBPF_OP_MOV64_IMM pc=3 dst=r0 src=r0 offset=0 imm=0
|
||||
#line 43 "sample/bindmonitor_bpf2bpf.c"
|
||||
// EBPF_OP_MOV64_IMM pc=8 dst=r0 src=r0 offset=0 imm=0
|
||||
#line 58 "sample/bindmonitor_bpf2bpf.c"
|
||||
r0 = IMMEDIATE(0);
|
||||
label_1:
|
||||
// EBPF_OP_EXIT pc=4 dst=r0 src=r0 offset=0 imm=0
|
||||
#line 43 "sample/bindmonitor_bpf2bpf.c"
|
||||
// EBPF_OP_EXIT pc=9 dst=r0 src=r0 offset=0 imm=0
|
||||
#line 58 "sample/bindmonitor_bpf2bpf.c"
|
||||
return r0;
|
||||
}
|
||||
#pragma data_seg(push, "programs")
|
||||
|
@ -185,7 +302,7 @@ static program_entry_t _programs[] = {
|
|||
0,
|
||||
NULL,
|
||||
0,
|
||||
14,
|
||||
45,
|
||||
&BindMonitor_Caller_program_type_guid,
|
||||
&BindMonitor_Caller_attach_type_guid,
|
||||
},
|
||||
|
|
|
@ -22,7 +22,7 @@ _get_maps(_Outptr_result_buffer_maybenull_(*count) map_entry_t** maps, _Out_ siz
|
|||
|
||||
// Forward references for local functions.
|
||||
static uint64_t
|
||||
BindMonitor_Callee(uint64_t r1, uint64_t r2, uint64_t r3, uint64_t r4, uint64_t r5, uint64_t r10);
|
||||
BindMonitor_Callee(uint64_t r1, uint64_t r2, uint64_t r3, uint64_t r4, uint64_t r5, uint64_t r10, void* context);
|
||||
|
||||
static GUID BindMonitor_Caller_program_type_guid = {
|
||||
0x608c517c, 0x6c52, 0x4a26, {0xb6, 0x77, 0xbb, 0x1c, 0x34, 0x42, 0x5a, 0xdf}};
|
||||
|
@ -49,8 +49,6 @@ BindMonitor_Caller(void* context)
|
|||
register uint64_t r4 = 0;
|
||||
#line 27 "sample/bindmonitor_bpf2bpf.c"
|
||||
register uint64_t r5 = 0;
|
||||
#line 27 "sample/bindmonitor_bpf2bpf.c"
|
||||
register uint64_t r6 = 0;
|
||||
#line 27 "sample/bindmonitor_bpf2bpf.c"
|
||||
register uint64_t r10 = 0;
|
||||
|
||||
|
@ -59,57 +57,161 @@ BindMonitor_Caller(void* context)
|
|||
#line 27 "sample/bindmonitor_bpf2bpf.c"
|
||||
r10 = (uintptr_t)((uint8_t*)stack + sizeof(stack));
|
||||
|
||||
// EBPF_OP_MOV64_REG pc=0 dst=r6 src=r1 offset=0 imm=0
|
||||
// EBPF_OP_STXDW pc=0 dst=r10 src=r1 offset=-16 imm=0
|
||||
#line 27 "sample/bindmonitor_bpf2bpf.c"
|
||||
r6 = r1;
|
||||
// EBPF_OP_ADD64_IMM pc=1 dst=r6 src=r0 offset=0 imm=48
|
||||
#line 29 "sample/bindmonitor_bpf2bpf.c"
|
||||
r6 += IMMEDIATE(48);
|
||||
// EBPF_OP_MOV64_REG pc=2 dst=r1 src=r6 offset=0 imm=0
|
||||
#line 30 "sample/bindmonitor_bpf2bpf.c"
|
||||
r1 = r6;
|
||||
// EBPF_OP_CALL pc=3 dst=r0 src=r1 offset=0 imm=10
|
||||
#line 30 "sample/bindmonitor_bpf2bpf.c"
|
||||
r0 = BindMonitor_Callee(r1, r2, r3, r4, r5, r10);
|
||||
// EBPF_OP_MOV64_REG pc=4 dst=r1 src=r0 offset=0 imm=0
|
||||
#line 30 "sample/bindmonitor_bpf2bpf.c"
|
||||
r1 = r0;
|
||||
// EBPF_OP_MOV64_IMM pc=5 dst=r0 src=r0 offset=0 imm=1
|
||||
#line 30 "sample/bindmonitor_bpf2bpf.c"
|
||||
r0 = IMMEDIATE(1);
|
||||
// EBPF_OP_LSH64_IMM pc=6 dst=r1 src=r0 offset=0 imm=32
|
||||
#line 30 "sample/bindmonitor_bpf2bpf.c"
|
||||
r1 <<= (IMMEDIATE(32) & 63);
|
||||
// EBPF_OP_RSH64_IMM pc=7 dst=r1 src=r0 offset=0 imm=32
|
||||
#line 30 "sample/bindmonitor_bpf2bpf.c"
|
||||
r1 >>= (IMMEDIATE(32) & 63);
|
||||
// EBPF_OP_JNE_IMM pc=8 dst=r1 src=r0 offset=4 imm=0
|
||||
#line 30 "sample/bindmonitor_bpf2bpf.c"
|
||||
if (r1 != IMMEDIATE(0)) {
|
||||
#line 30 "sample/bindmonitor_bpf2bpf.c"
|
||||
*(uint64_t*)(uintptr_t)(r10 + OFFSET(-16)) = (uint64_t)r1;
|
||||
// EBPF_OP_MOV64_IMM pc=1 dst=r1 src=r0 offset=0 imm=204
|
||||
#line 27 "sample/bindmonitor_bpf2bpf.c"
|
||||
r1 = IMMEDIATE(204);
|
||||
// EBPF_OP_STXB pc=2 dst=r10 src=r1 offset=-18 imm=0
|
||||
#line 31 "sample/bindmonitor_bpf2bpf.c"
|
||||
*(uint8_t*)(uintptr_t)(r10 + OFFSET(-18)) = (uint8_t)r1;
|
||||
// EBPF_OP_STXB pc=3 dst=r10 src=r1 offset=-17 imm=0
|
||||
#line 32 "sample/bindmonitor_bpf2bpf.c"
|
||||
*(uint8_t*)(uintptr_t)(r10 + OFFSET(-17)) = (uint8_t)r1;
|
||||
// EBPF_OP_LDXDW pc=4 dst=r1 src=r10 offset=-16 imm=0
|
||||
#line 34 "sample/bindmonitor_bpf2bpf.c"
|
||||
r1 = *(uint64_t*)(uintptr_t)(r10 + OFFSET(-16));
|
||||
// EBPF_OP_LDXDW pc=5 dst=r1 src=r1 offset=16 imm=0
|
||||
#line 34 "sample/bindmonitor_bpf2bpf.c"
|
||||
r1 = *(uint64_t*)(uintptr_t)(r1 + OFFSET(16));
|
||||
// EBPF_OP_STXDW pc=6 dst=r10 src=r1 offset=-32 imm=0
|
||||
#line 34 "sample/bindmonitor_bpf2bpf.c"
|
||||
*(uint64_t*)(uintptr_t)(r10 + OFFSET(-32)) = (uint64_t)r1;
|
||||
// EBPF_OP_LDXDW pc=7 dst=r1 src=r10 offset=-16 imm=0
|
||||
#line 35 "sample/bindmonitor_bpf2bpf.c"
|
||||
r1 = *(uint64_t*)(uintptr_t)(r10 + OFFSET(-16));
|
||||
// EBPF_OP_ADD64_IMM pc=8 dst=r1 src=r0 offset=0 imm=16
|
||||
#line 35 "sample/bindmonitor_bpf2bpf.c"
|
||||
r1 += IMMEDIATE(16);
|
||||
// EBPF_OP_CALL pc=9 dst=r0 src=r1 offset=0 imm=35
|
||||
#line 35 "sample/bindmonitor_bpf2bpf.c"
|
||||
r0 = BindMonitor_Callee(r1, r2, r3, r4, r5, r10, context);
|
||||
// EBPF_OP_LSH64_IMM pc=10 dst=r0 src=r0 offset=0 imm=32
|
||||
#line 35 "sample/bindmonitor_bpf2bpf.c"
|
||||
r0 <<= (IMMEDIATE(32) & 63);
|
||||
// EBPF_OP_RSH64_IMM pc=11 dst=r0 src=r0 offset=0 imm=32
|
||||
#line 35 "sample/bindmonitor_bpf2bpf.c"
|
||||
r0 >>= (IMMEDIATE(32) & 63);
|
||||
// EBPF_OP_JNE_IMM pc=12 dst=r0 src=r0 offset=5 imm=1
|
||||
#line 35 "sample/bindmonitor_bpf2bpf.c"
|
||||
if (r0 != IMMEDIATE(1)) {
|
||||
#line 35 "sample/bindmonitor_bpf2bpf.c"
|
||||
goto label_2;
|
||||
#line 30 "sample/bindmonitor_bpf2bpf.c"
|
||||
#line 35 "sample/bindmonitor_bpf2bpf.c"
|
||||
}
|
||||
// EBPF_OP_LDXB pc=9 dst=r1 src=r6 offset=0 imm=0
|
||||
#line 29 "sample/bindmonitor_bpf2bpf.c"
|
||||
r1 = *(uint8_t*)(uintptr_t)(r6 + OFFSET(0));
|
||||
// EBPF_OP_JEQ_IMM pc=10 dst=r1 src=r0 offset=1 imm=1
|
||||
#line 29 "sample/bindmonitor_bpf2bpf.c"
|
||||
if (r1 == IMMEDIATE(1)) {
|
||||
#line 29 "sample/bindmonitor_bpf2bpf.c"
|
||||
goto label_1;
|
||||
#line 29 "sample/bindmonitor_bpf2bpf.c"
|
||||
}
|
||||
// EBPF_OP_MOV64_IMM pc=11 dst=r0 src=r0 offset=0 imm=0
|
||||
#line 29 "sample/bindmonitor_bpf2bpf.c"
|
||||
r0 = IMMEDIATE(0);
|
||||
// EBPF_OP_JA pc=13 dst=r0 src=r0 offset=0 imm=0
|
||||
#line 35 "sample/bindmonitor_bpf2bpf.c"
|
||||
goto label_1;
|
||||
label_1:
|
||||
// EBPF_OP_LSH64_IMM pc=12 dst=r0 src=r0 offset=0 imm=1
|
||||
#line 29 "sample/bindmonitor_bpf2bpf.c"
|
||||
r0 <<= (IMMEDIATE(1) & 63);
|
||||
// EBPF_OP_MOV64_IMM pc=14 dst=r1 src=r0 offset=0 imm=1
|
||||
#line 35 "sample/bindmonitor_bpf2bpf.c"
|
||||
r1 = IMMEDIATE(1);
|
||||
// EBPF_OP_STXW pc=15 dst=r10 src=r1 offset=-4 imm=0
|
||||
#line 36 "sample/bindmonitor_bpf2bpf.c"
|
||||
*(uint32_t*)(uintptr_t)(r10 + OFFSET(-4)) = (uint32_t)r1;
|
||||
// EBPF_OP_STXW pc=16 dst=r10 src=r1 offset=-36 imm=0
|
||||
#line 36 "sample/bindmonitor_bpf2bpf.c"
|
||||
*(uint32_t*)(uintptr_t)(r10 + OFFSET(-36)) = (uint32_t)r1;
|
||||
// EBPF_OP_JA pc=17 dst=r0 src=r0 offset=25 imm=0
|
||||
#line 36 "sample/bindmonitor_bpf2bpf.c"
|
||||
goto label_8;
|
||||
label_2:
|
||||
// EBPF_OP_EXIT pc=13 dst=r0 src=r0 offset=0 imm=0
|
||||
#line 38 "sample/bindmonitor_bpf2bpf.c"
|
||||
// EBPF_OP_LDXB pc=18 dst=r1 src=r10 offset=-18 imm=0
|
||||
#line 40 "sample/bindmonitor_bpf2bpf.c"
|
||||
r1 = *(uint8_t*)(uintptr_t)(r10 + OFFSET(-18));
|
||||
// EBPF_OP_JNE_IMM pc=19 dst=r1 src=r0 offset=4 imm=204
|
||||
#line 40 "sample/bindmonitor_bpf2bpf.c"
|
||||
if (r1 != IMMEDIATE(204)) {
|
||||
#line 40 "sample/bindmonitor_bpf2bpf.c"
|
||||
goto label_4;
|
||||
#line 40 "sample/bindmonitor_bpf2bpf.c"
|
||||
}
|
||||
// EBPF_OP_JA pc=20 dst=r0 src=r0 offset=0 imm=0
|
||||
#line 40 "sample/bindmonitor_bpf2bpf.c"
|
||||
goto label_3;
|
||||
label_3:
|
||||
// EBPF_OP_LDXB pc=21 dst=r1 src=r10 offset=-17 imm=0
|
||||
#line 40 "sample/bindmonitor_bpf2bpf.c"
|
||||
r1 = *(uint8_t*)(uintptr_t)(r10 + OFFSET(-17));
|
||||
// EBPF_OP_JEQ_IMM pc=22 dst=r1 src=r0 offset=7 imm=204
|
||||
#line 40 "sample/bindmonitor_bpf2bpf.c"
|
||||
if (r1 == IMMEDIATE(204)) {
|
||||
#line 40 "sample/bindmonitor_bpf2bpf.c"
|
||||
goto label_5;
|
||||
#line 40 "sample/bindmonitor_bpf2bpf.c"
|
||||
}
|
||||
// EBPF_OP_JA pc=23 dst=r0 src=r0 offset=0 imm=0
|
||||
#line 40 "sample/bindmonitor_bpf2bpf.c"
|
||||
goto label_4;
|
||||
label_4:
|
||||
// EBPF_OP_LDDW pc=24 dst=r1 src=r0 offset=0 imm=-1
|
||||
#line 40 "sample/bindmonitor_bpf2bpf.c"
|
||||
r1 = (uint64_t)4294967295;
|
||||
// EBPF_OP_STXW pc=26 dst=r10 src=r1 offset=-4 imm=0
|
||||
#line 41 "sample/bindmonitor_bpf2bpf.c"
|
||||
*(uint32_t*)(uintptr_t)(r10 + OFFSET(-4)) = (uint32_t)r1;
|
||||
// EBPF_OP_MOV64_IMM pc=27 dst=r1 src=r0 offset=0 imm=1
|
||||
#line 41 "sample/bindmonitor_bpf2bpf.c"
|
||||
r1 = IMMEDIATE(1);
|
||||
// EBPF_OP_STXW pc=28 dst=r10 src=r1 offset=-36 imm=0
|
||||
#line 41 "sample/bindmonitor_bpf2bpf.c"
|
||||
*(uint32_t*)(uintptr_t)(r10 + OFFSET(-36)) = (uint32_t)r1;
|
||||
// EBPF_OP_JA pc=29 dst=r0 src=r0 offset=13 imm=0
|
||||
#line 41 "sample/bindmonitor_bpf2bpf.c"
|
||||
goto label_8;
|
||||
label_5:
|
||||
// EBPF_OP_LDXDW pc=30 dst=r1 src=r10 offset=-32 imm=0
|
||||
#line 44 "sample/bindmonitor_bpf2bpf.c"
|
||||
r1 = *(uint64_t*)(uintptr_t)(r10 + OFFSET(-32));
|
||||
// EBPF_OP_JNE_IMM pc=31 dst=r1 src=r0 offset=6 imm=1
|
||||
#line 44 "sample/bindmonitor_bpf2bpf.c"
|
||||
if (r1 != IMMEDIATE(1)) {
|
||||
#line 44 "sample/bindmonitor_bpf2bpf.c"
|
||||
goto label_7;
|
||||
#line 44 "sample/bindmonitor_bpf2bpf.c"
|
||||
}
|
||||
// EBPF_OP_JA pc=32 dst=r0 src=r0 offset=0 imm=0
|
||||
#line 44 "sample/bindmonitor_bpf2bpf.c"
|
||||
goto label_6;
|
||||
label_6:
|
||||
// EBPF_OP_MOV64_IMM pc=33 dst=r1 src=r0 offset=0 imm=2
|
||||
#line 44 "sample/bindmonitor_bpf2bpf.c"
|
||||
r1 = IMMEDIATE(2);
|
||||
// EBPF_OP_STXW pc=34 dst=r10 src=r1 offset=-4 imm=0
|
||||
#line 46 "sample/bindmonitor_bpf2bpf.c"
|
||||
*(uint32_t*)(uintptr_t)(r10 + OFFSET(-4)) = (uint32_t)r1;
|
||||
// EBPF_OP_MOV64_IMM pc=35 dst=r1 src=r0 offset=0 imm=1
|
||||
#line 46 "sample/bindmonitor_bpf2bpf.c"
|
||||
r1 = IMMEDIATE(1);
|
||||
// EBPF_OP_STXW pc=36 dst=r10 src=r1 offset=-36 imm=0
|
||||
#line 46 "sample/bindmonitor_bpf2bpf.c"
|
||||
*(uint32_t*)(uintptr_t)(r10 + OFFSET(-36)) = (uint32_t)r1;
|
||||
// EBPF_OP_JA pc=37 dst=r0 src=r0 offset=5 imm=0
|
||||
#line 46 "sample/bindmonitor_bpf2bpf.c"
|
||||
goto label_8;
|
||||
label_7:
|
||||
// EBPF_OP_MOV64_IMM pc=38 dst=r1 src=r0 offset=0 imm=0
|
||||
#line 46 "sample/bindmonitor_bpf2bpf.c"
|
||||
r1 = IMMEDIATE(0);
|
||||
// EBPF_OP_STXW pc=39 dst=r10 src=r1 offset=-4 imm=0
|
||||
#line 48 "sample/bindmonitor_bpf2bpf.c"
|
||||
*(uint32_t*)(uintptr_t)(r10 + OFFSET(-4)) = (uint32_t)r1;
|
||||
// EBPF_OP_MOV64_IMM pc=40 dst=r1 src=r0 offset=0 imm=1
|
||||
#line 48 "sample/bindmonitor_bpf2bpf.c"
|
||||
r1 = IMMEDIATE(1);
|
||||
// EBPF_OP_STXW pc=41 dst=r10 src=r1 offset=-36 imm=0
|
||||
#line 48 "sample/bindmonitor_bpf2bpf.c"
|
||||
*(uint32_t*)(uintptr_t)(r10 + OFFSET(-36)) = (uint32_t)r1;
|
||||
// EBPF_OP_JA pc=42 dst=r0 src=r0 offset=0 imm=0
|
||||
#line 48 "sample/bindmonitor_bpf2bpf.c"
|
||||
goto label_8;
|
||||
label_8:
|
||||
// EBPF_OP_LDXW pc=43 dst=r0 src=r10 offset=-4 imm=0
|
||||
#line 49 "sample/bindmonitor_bpf2bpf.c"
|
||||
r0 = *(uint32_t*)(uintptr_t)(r10 + OFFSET(-4));
|
||||
// EBPF_OP_EXIT pc=44 dst=r0 src=r0 offset=0 imm=0
|
||||
#line 49 "sample/bindmonitor_bpf2bpf.c"
|
||||
return r0;
|
||||
#line 27 "sample/bindmonitor_bpf2bpf.c"
|
||||
}
|
||||
|
@ -117,34 +219,49 @@ label_2:
|
|||
#line __LINE__ __FILE__
|
||||
|
||||
static uint64_t
|
||||
BindMonitor_Callee(uint64_t r1, uint64_t r2, uint64_t r3, uint64_t r4, uint64_t r5, uint64_t r10)
|
||||
BindMonitor_Callee(uint64_t r1, uint64_t r2, uint64_t r3, uint64_t r4, uint64_t r5, uint64_t r10, void* context)
|
||||
{
|
||||
register uint64_t r0 = 0;
|
||||
(void)r2;
|
||||
(void)r3;
|
||||
(void)r4;
|
||||
(void)r5;
|
||||
(void)r10;
|
||||
(void)context;
|
||||
|
||||
// EBPF_OP_LDXB pc=0 dst=r1 src=r1 offset=0 imm=0
|
||||
#line 43 "sample/bindmonitor_bpf2bpf.c"
|
||||
r1 = *(uint8_t*)(uintptr_t)(r1 + OFFSET(0));
|
||||
// EBPF_OP_MOV64_IMM pc=1 dst=r0 src=r0 offset=0 imm=1
|
||||
#line 43 "sample/bindmonitor_bpf2bpf.c"
|
||||
// EBPF_OP_STXDW pc=0 dst=r10 src=r1 offset=-8 imm=0
|
||||
#line 51 "sample/bindmonitor_bpf2bpf.c"
|
||||
*(uint64_t*)(uintptr_t)(r10 + OFFSET(-8)) = (uint64_t)r1;
|
||||
// EBPF_OP_MOV64_IMM pc=1 dst=r1 src=r0 offset=0 imm=187
|
||||
#line 51 "sample/bindmonitor_bpf2bpf.c"
|
||||
r1 = IMMEDIATE(187);
|
||||
// EBPF_OP_STXB pc=2 dst=r10 src=r1 offset=-10 imm=0
|
||||
#line 55 "sample/bindmonitor_bpf2bpf.c"
|
||||
*(uint8_t*)(uintptr_t)(r10 + OFFSET(-10)) = (uint8_t)r1;
|
||||
// EBPF_OP_STXB pc=3 dst=r10 src=r1 offset=-9 imm=0
|
||||
#line 56 "sample/bindmonitor_bpf2bpf.c"
|
||||
*(uint8_t*)(uintptr_t)(r10 + OFFSET(-9)) = (uint8_t)r1;
|
||||
// EBPF_OP_LDXDW pc=4 dst=r1 src=r10 offset=-8 imm=0
|
||||
#line 58 "sample/bindmonitor_bpf2bpf.c"
|
||||
r1 = *(uint64_t*)(uintptr_t)(r10 + OFFSET(-8));
|
||||
// EBPF_OP_LDXDW pc=5 dst=r1 src=r1 offset=0 imm=0
|
||||
#line 58 "sample/bindmonitor_bpf2bpf.c"
|
||||
r1 = *(uint64_t*)(uintptr_t)(r1 + OFFSET(0));
|
||||
// EBPF_OP_MOV64_IMM pc=6 dst=r0 src=r0 offset=0 imm=1
|
||||
#line 58 "sample/bindmonitor_bpf2bpf.c"
|
||||
r0 = IMMEDIATE(1);
|
||||
// EBPF_OP_JEQ_IMM pc=2 dst=r1 src=r0 offset=1 imm=0
|
||||
#line 43 "sample/bindmonitor_bpf2bpf.c"
|
||||
// EBPF_OP_JEQ_IMM pc=7 dst=r1 src=r0 offset=1 imm=0
|
||||
#line 58 "sample/bindmonitor_bpf2bpf.c"
|
||||
if (r1 == IMMEDIATE(0)) {
|
||||
#line 43 "sample/bindmonitor_bpf2bpf.c"
|
||||
#line 58 "sample/bindmonitor_bpf2bpf.c"
|
||||
goto label_1;
|
||||
#line 43 "sample/bindmonitor_bpf2bpf.c"
|
||||
#line 58 "sample/bindmonitor_bpf2bpf.c"
|
||||
}
|
||||
// EBPF_OP_MOV64_IMM pc=3 dst=r0 src=r0 offset=0 imm=0
|
||||
#line 43 "sample/bindmonitor_bpf2bpf.c"
|
||||
// EBPF_OP_MOV64_IMM pc=8 dst=r0 src=r0 offset=0 imm=0
|
||||
#line 58 "sample/bindmonitor_bpf2bpf.c"
|
||||
r0 = IMMEDIATE(0);
|
||||
label_1:
|
||||
// EBPF_OP_EXIT pc=4 dst=r0 src=r0 offset=0 imm=0
|
||||
#line 43 "sample/bindmonitor_bpf2bpf.c"
|
||||
// EBPF_OP_EXIT pc=9 dst=r0 src=r0 offset=0 imm=0
|
||||
#line 58 "sample/bindmonitor_bpf2bpf.c"
|
||||
return r0;
|
||||
}
|
||||
#pragma data_seg(push, "programs")
|
||||
|
@ -159,7 +276,7 @@ static program_entry_t _programs[] = {
|
|||
0,
|
||||
NULL,
|
||||
0,
|
||||
14,
|
||||
45,
|
||||
&BindMonitor_Caller_program_type_guid,
|
||||
&BindMonitor_Caller_attach_type_guid,
|
||||
},
|
||||
|
|
|
@ -183,7 +183,7 @@ _get_maps(_Outptr_result_buffer_maybenull_(*count) map_entry_t** maps, _Out_ siz
|
|||
|
||||
// Forward references for local functions.
|
||||
static uint64_t
|
||||
BindMonitor_Callee(uint64_t r1, uint64_t r2, uint64_t r3, uint64_t r4, uint64_t r5, uint64_t r10);
|
||||
BindMonitor_Callee(uint64_t r1, uint64_t r2, uint64_t r3, uint64_t r4, uint64_t r5, uint64_t r10, void* context);
|
||||
|
||||
static GUID BindMonitor_Caller_program_type_guid = {
|
||||
0x608c517c, 0x6c52, 0x4a26, {0xb6, 0x77, 0xbb, 0x1c, 0x34, 0x42, 0x5a, 0xdf}};
|
||||
|
@ -210,8 +210,6 @@ BindMonitor_Caller(void* context)
|
|||
register uint64_t r4 = 0;
|
||||
#line 27 "sample/bindmonitor_bpf2bpf.c"
|
||||
register uint64_t r5 = 0;
|
||||
#line 27 "sample/bindmonitor_bpf2bpf.c"
|
||||
register uint64_t r6 = 0;
|
||||
#line 27 "sample/bindmonitor_bpf2bpf.c"
|
||||
register uint64_t r10 = 0;
|
||||
|
||||
|
@ -220,57 +218,161 @@ BindMonitor_Caller(void* context)
|
|||
#line 27 "sample/bindmonitor_bpf2bpf.c"
|
||||
r10 = (uintptr_t)((uint8_t*)stack + sizeof(stack));
|
||||
|
||||
// EBPF_OP_MOV64_REG pc=0 dst=r6 src=r1 offset=0 imm=0
|
||||
// EBPF_OP_STXDW pc=0 dst=r10 src=r1 offset=-16 imm=0
|
||||
#line 27 "sample/bindmonitor_bpf2bpf.c"
|
||||
r6 = r1;
|
||||
// EBPF_OP_ADD64_IMM pc=1 dst=r6 src=r0 offset=0 imm=48
|
||||
#line 29 "sample/bindmonitor_bpf2bpf.c"
|
||||
r6 += IMMEDIATE(48);
|
||||
// EBPF_OP_MOV64_REG pc=2 dst=r1 src=r6 offset=0 imm=0
|
||||
#line 30 "sample/bindmonitor_bpf2bpf.c"
|
||||
r1 = r6;
|
||||
// EBPF_OP_CALL pc=3 dst=r0 src=r1 offset=0 imm=10
|
||||
#line 30 "sample/bindmonitor_bpf2bpf.c"
|
||||
r0 = BindMonitor_Callee(r1, r2, r3, r4, r5, r10);
|
||||
// EBPF_OP_MOV64_REG pc=4 dst=r1 src=r0 offset=0 imm=0
|
||||
#line 30 "sample/bindmonitor_bpf2bpf.c"
|
||||
r1 = r0;
|
||||
// EBPF_OP_MOV64_IMM pc=5 dst=r0 src=r0 offset=0 imm=1
|
||||
#line 30 "sample/bindmonitor_bpf2bpf.c"
|
||||
r0 = IMMEDIATE(1);
|
||||
// EBPF_OP_LSH64_IMM pc=6 dst=r1 src=r0 offset=0 imm=32
|
||||
#line 30 "sample/bindmonitor_bpf2bpf.c"
|
||||
r1 <<= (IMMEDIATE(32) & 63);
|
||||
// EBPF_OP_RSH64_IMM pc=7 dst=r1 src=r0 offset=0 imm=32
|
||||
#line 30 "sample/bindmonitor_bpf2bpf.c"
|
||||
r1 >>= (IMMEDIATE(32) & 63);
|
||||
// EBPF_OP_JNE_IMM pc=8 dst=r1 src=r0 offset=4 imm=0
|
||||
#line 30 "sample/bindmonitor_bpf2bpf.c"
|
||||
if (r1 != IMMEDIATE(0)) {
|
||||
#line 30 "sample/bindmonitor_bpf2bpf.c"
|
||||
*(uint64_t*)(uintptr_t)(r10 + OFFSET(-16)) = (uint64_t)r1;
|
||||
// EBPF_OP_MOV64_IMM pc=1 dst=r1 src=r0 offset=0 imm=204
|
||||
#line 27 "sample/bindmonitor_bpf2bpf.c"
|
||||
r1 = IMMEDIATE(204);
|
||||
// EBPF_OP_STXB pc=2 dst=r10 src=r1 offset=-18 imm=0
|
||||
#line 31 "sample/bindmonitor_bpf2bpf.c"
|
||||
*(uint8_t*)(uintptr_t)(r10 + OFFSET(-18)) = (uint8_t)r1;
|
||||
// EBPF_OP_STXB pc=3 dst=r10 src=r1 offset=-17 imm=0
|
||||
#line 32 "sample/bindmonitor_bpf2bpf.c"
|
||||
*(uint8_t*)(uintptr_t)(r10 + OFFSET(-17)) = (uint8_t)r1;
|
||||
// EBPF_OP_LDXDW pc=4 dst=r1 src=r10 offset=-16 imm=0
|
||||
#line 34 "sample/bindmonitor_bpf2bpf.c"
|
||||
r1 = *(uint64_t*)(uintptr_t)(r10 + OFFSET(-16));
|
||||
// EBPF_OP_LDXDW pc=5 dst=r1 src=r1 offset=16 imm=0
|
||||
#line 34 "sample/bindmonitor_bpf2bpf.c"
|
||||
r1 = *(uint64_t*)(uintptr_t)(r1 + OFFSET(16));
|
||||
// EBPF_OP_STXDW pc=6 dst=r10 src=r1 offset=-32 imm=0
|
||||
#line 34 "sample/bindmonitor_bpf2bpf.c"
|
||||
*(uint64_t*)(uintptr_t)(r10 + OFFSET(-32)) = (uint64_t)r1;
|
||||
// EBPF_OP_LDXDW pc=7 dst=r1 src=r10 offset=-16 imm=0
|
||||
#line 35 "sample/bindmonitor_bpf2bpf.c"
|
||||
r1 = *(uint64_t*)(uintptr_t)(r10 + OFFSET(-16));
|
||||
// EBPF_OP_ADD64_IMM pc=8 dst=r1 src=r0 offset=0 imm=16
|
||||
#line 35 "sample/bindmonitor_bpf2bpf.c"
|
||||
r1 += IMMEDIATE(16);
|
||||
// EBPF_OP_CALL pc=9 dst=r0 src=r1 offset=0 imm=35
|
||||
#line 35 "sample/bindmonitor_bpf2bpf.c"
|
||||
r0 = BindMonitor_Callee(r1, r2, r3, r4, r5, r10, context);
|
||||
// EBPF_OP_LSH64_IMM pc=10 dst=r0 src=r0 offset=0 imm=32
|
||||
#line 35 "sample/bindmonitor_bpf2bpf.c"
|
||||
r0 <<= (IMMEDIATE(32) & 63);
|
||||
// EBPF_OP_RSH64_IMM pc=11 dst=r0 src=r0 offset=0 imm=32
|
||||
#line 35 "sample/bindmonitor_bpf2bpf.c"
|
||||
r0 >>= (IMMEDIATE(32) & 63);
|
||||
// EBPF_OP_JNE_IMM pc=12 dst=r0 src=r0 offset=5 imm=1
|
||||
#line 35 "sample/bindmonitor_bpf2bpf.c"
|
||||
if (r0 != IMMEDIATE(1)) {
|
||||
#line 35 "sample/bindmonitor_bpf2bpf.c"
|
||||
goto label_2;
|
||||
#line 30 "sample/bindmonitor_bpf2bpf.c"
|
||||
#line 35 "sample/bindmonitor_bpf2bpf.c"
|
||||
}
|
||||
// EBPF_OP_LDXB pc=9 dst=r1 src=r6 offset=0 imm=0
|
||||
#line 29 "sample/bindmonitor_bpf2bpf.c"
|
||||
r1 = *(uint8_t*)(uintptr_t)(r6 + OFFSET(0));
|
||||
// EBPF_OP_JEQ_IMM pc=10 dst=r1 src=r0 offset=1 imm=1
|
||||
#line 29 "sample/bindmonitor_bpf2bpf.c"
|
||||
if (r1 == IMMEDIATE(1)) {
|
||||
#line 29 "sample/bindmonitor_bpf2bpf.c"
|
||||
goto label_1;
|
||||
#line 29 "sample/bindmonitor_bpf2bpf.c"
|
||||
}
|
||||
// EBPF_OP_MOV64_IMM pc=11 dst=r0 src=r0 offset=0 imm=0
|
||||
#line 29 "sample/bindmonitor_bpf2bpf.c"
|
||||
r0 = IMMEDIATE(0);
|
||||
// EBPF_OP_JA pc=13 dst=r0 src=r0 offset=0 imm=0
|
||||
#line 35 "sample/bindmonitor_bpf2bpf.c"
|
||||
goto label_1;
|
||||
label_1:
|
||||
// EBPF_OP_LSH64_IMM pc=12 dst=r0 src=r0 offset=0 imm=1
|
||||
#line 29 "sample/bindmonitor_bpf2bpf.c"
|
||||
r0 <<= (IMMEDIATE(1) & 63);
|
||||
// EBPF_OP_MOV64_IMM pc=14 dst=r1 src=r0 offset=0 imm=1
|
||||
#line 35 "sample/bindmonitor_bpf2bpf.c"
|
||||
r1 = IMMEDIATE(1);
|
||||
// EBPF_OP_STXW pc=15 dst=r10 src=r1 offset=-4 imm=0
|
||||
#line 36 "sample/bindmonitor_bpf2bpf.c"
|
||||
*(uint32_t*)(uintptr_t)(r10 + OFFSET(-4)) = (uint32_t)r1;
|
||||
// EBPF_OP_STXW pc=16 dst=r10 src=r1 offset=-36 imm=0
|
||||
#line 36 "sample/bindmonitor_bpf2bpf.c"
|
||||
*(uint32_t*)(uintptr_t)(r10 + OFFSET(-36)) = (uint32_t)r1;
|
||||
// EBPF_OP_JA pc=17 dst=r0 src=r0 offset=25 imm=0
|
||||
#line 36 "sample/bindmonitor_bpf2bpf.c"
|
||||
goto label_8;
|
||||
label_2:
|
||||
// EBPF_OP_EXIT pc=13 dst=r0 src=r0 offset=0 imm=0
|
||||
#line 38 "sample/bindmonitor_bpf2bpf.c"
|
||||
// EBPF_OP_LDXB pc=18 dst=r1 src=r10 offset=-18 imm=0
|
||||
#line 40 "sample/bindmonitor_bpf2bpf.c"
|
||||
r1 = *(uint8_t*)(uintptr_t)(r10 + OFFSET(-18));
|
||||
// EBPF_OP_JNE_IMM pc=19 dst=r1 src=r0 offset=4 imm=204
|
||||
#line 40 "sample/bindmonitor_bpf2bpf.c"
|
||||
if (r1 != IMMEDIATE(204)) {
|
||||
#line 40 "sample/bindmonitor_bpf2bpf.c"
|
||||
goto label_4;
|
||||
#line 40 "sample/bindmonitor_bpf2bpf.c"
|
||||
}
|
||||
// EBPF_OP_JA pc=20 dst=r0 src=r0 offset=0 imm=0
|
||||
#line 40 "sample/bindmonitor_bpf2bpf.c"
|
||||
goto label_3;
|
||||
label_3:
|
||||
// EBPF_OP_LDXB pc=21 dst=r1 src=r10 offset=-17 imm=0
|
||||
#line 40 "sample/bindmonitor_bpf2bpf.c"
|
||||
r1 = *(uint8_t*)(uintptr_t)(r10 + OFFSET(-17));
|
||||
// EBPF_OP_JEQ_IMM pc=22 dst=r1 src=r0 offset=7 imm=204
|
||||
#line 40 "sample/bindmonitor_bpf2bpf.c"
|
||||
if (r1 == IMMEDIATE(204)) {
|
||||
#line 40 "sample/bindmonitor_bpf2bpf.c"
|
||||
goto label_5;
|
||||
#line 40 "sample/bindmonitor_bpf2bpf.c"
|
||||
}
|
||||
// EBPF_OP_JA pc=23 dst=r0 src=r0 offset=0 imm=0
|
||||
#line 40 "sample/bindmonitor_bpf2bpf.c"
|
||||
goto label_4;
|
||||
label_4:
|
||||
// EBPF_OP_LDDW pc=24 dst=r1 src=r0 offset=0 imm=-1
|
||||
#line 40 "sample/bindmonitor_bpf2bpf.c"
|
||||
r1 = (uint64_t)4294967295;
|
||||
// EBPF_OP_STXW pc=26 dst=r10 src=r1 offset=-4 imm=0
|
||||
#line 41 "sample/bindmonitor_bpf2bpf.c"
|
||||
*(uint32_t*)(uintptr_t)(r10 + OFFSET(-4)) = (uint32_t)r1;
|
||||
// EBPF_OP_MOV64_IMM pc=27 dst=r1 src=r0 offset=0 imm=1
|
||||
#line 41 "sample/bindmonitor_bpf2bpf.c"
|
||||
r1 = IMMEDIATE(1);
|
||||
// EBPF_OP_STXW pc=28 dst=r10 src=r1 offset=-36 imm=0
|
||||
#line 41 "sample/bindmonitor_bpf2bpf.c"
|
||||
*(uint32_t*)(uintptr_t)(r10 + OFFSET(-36)) = (uint32_t)r1;
|
||||
// EBPF_OP_JA pc=29 dst=r0 src=r0 offset=13 imm=0
|
||||
#line 41 "sample/bindmonitor_bpf2bpf.c"
|
||||
goto label_8;
|
||||
label_5:
|
||||
// EBPF_OP_LDXDW pc=30 dst=r1 src=r10 offset=-32 imm=0
|
||||
#line 44 "sample/bindmonitor_bpf2bpf.c"
|
||||
r1 = *(uint64_t*)(uintptr_t)(r10 + OFFSET(-32));
|
||||
// EBPF_OP_JNE_IMM pc=31 dst=r1 src=r0 offset=6 imm=1
|
||||
#line 44 "sample/bindmonitor_bpf2bpf.c"
|
||||
if (r1 != IMMEDIATE(1)) {
|
||||
#line 44 "sample/bindmonitor_bpf2bpf.c"
|
||||
goto label_7;
|
||||
#line 44 "sample/bindmonitor_bpf2bpf.c"
|
||||
}
|
||||
// EBPF_OP_JA pc=32 dst=r0 src=r0 offset=0 imm=0
|
||||
#line 44 "sample/bindmonitor_bpf2bpf.c"
|
||||
goto label_6;
|
||||
label_6:
|
||||
// EBPF_OP_MOV64_IMM pc=33 dst=r1 src=r0 offset=0 imm=2
|
||||
#line 44 "sample/bindmonitor_bpf2bpf.c"
|
||||
r1 = IMMEDIATE(2);
|
||||
// EBPF_OP_STXW pc=34 dst=r10 src=r1 offset=-4 imm=0
|
||||
#line 46 "sample/bindmonitor_bpf2bpf.c"
|
||||
*(uint32_t*)(uintptr_t)(r10 + OFFSET(-4)) = (uint32_t)r1;
|
||||
// EBPF_OP_MOV64_IMM pc=35 dst=r1 src=r0 offset=0 imm=1
|
||||
#line 46 "sample/bindmonitor_bpf2bpf.c"
|
||||
r1 = IMMEDIATE(1);
|
||||
// EBPF_OP_STXW pc=36 dst=r10 src=r1 offset=-36 imm=0
|
||||
#line 46 "sample/bindmonitor_bpf2bpf.c"
|
||||
*(uint32_t*)(uintptr_t)(r10 + OFFSET(-36)) = (uint32_t)r1;
|
||||
// EBPF_OP_JA pc=37 dst=r0 src=r0 offset=5 imm=0
|
||||
#line 46 "sample/bindmonitor_bpf2bpf.c"
|
||||
goto label_8;
|
||||
label_7:
|
||||
// EBPF_OP_MOV64_IMM pc=38 dst=r1 src=r0 offset=0 imm=0
|
||||
#line 46 "sample/bindmonitor_bpf2bpf.c"
|
||||
r1 = IMMEDIATE(0);
|
||||
// EBPF_OP_STXW pc=39 dst=r10 src=r1 offset=-4 imm=0
|
||||
#line 48 "sample/bindmonitor_bpf2bpf.c"
|
||||
*(uint32_t*)(uintptr_t)(r10 + OFFSET(-4)) = (uint32_t)r1;
|
||||
// EBPF_OP_MOV64_IMM pc=40 dst=r1 src=r0 offset=0 imm=1
|
||||
#line 48 "sample/bindmonitor_bpf2bpf.c"
|
||||
r1 = IMMEDIATE(1);
|
||||
// EBPF_OP_STXW pc=41 dst=r10 src=r1 offset=-36 imm=0
|
||||
#line 48 "sample/bindmonitor_bpf2bpf.c"
|
||||
*(uint32_t*)(uintptr_t)(r10 + OFFSET(-36)) = (uint32_t)r1;
|
||||
// EBPF_OP_JA pc=42 dst=r0 src=r0 offset=0 imm=0
|
||||
#line 48 "sample/bindmonitor_bpf2bpf.c"
|
||||
goto label_8;
|
||||
label_8:
|
||||
// EBPF_OP_LDXW pc=43 dst=r0 src=r10 offset=-4 imm=0
|
||||
#line 49 "sample/bindmonitor_bpf2bpf.c"
|
||||
r0 = *(uint32_t*)(uintptr_t)(r10 + OFFSET(-4));
|
||||
// EBPF_OP_EXIT pc=44 dst=r0 src=r0 offset=0 imm=0
|
||||
#line 49 "sample/bindmonitor_bpf2bpf.c"
|
||||
return r0;
|
||||
#line 27 "sample/bindmonitor_bpf2bpf.c"
|
||||
}
|
||||
|
@ -278,34 +380,49 @@ label_2:
|
|||
#line __LINE__ __FILE__
|
||||
|
||||
static uint64_t
|
||||
BindMonitor_Callee(uint64_t r1, uint64_t r2, uint64_t r3, uint64_t r4, uint64_t r5, uint64_t r10)
|
||||
BindMonitor_Callee(uint64_t r1, uint64_t r2, uint64_t r3, uint64_t r4, uint64_t r5, uint64_t r10, void* context)
|
||||
{
|
||||
register uint64_t r0 = 0;
|
||||
(void)r2;
|
||||
(void)r3;
|
||||
(void)r4;
|
||||
(void)r5;
|
||||
(void)r10;
|
||||
(void)context;
|
||||
|
||||
// EBPF_OP_LDXB pc=0 dst=r1 src=r1 offset=0 imm=0
|
||||
#line 43 "sample/bindmonitor_bpf2bpf.c"
|
||||
r1 = *(uint8_t*)(uintptr_t)(r1 + OFFSET(0));
|
||||
// EBPF_OP_MOV64_IMM pc=1 dst=r0 src=r0 offset=0 imm=1
|
||||
#line 43 "sample/bindmonitor_bpf2bpf.c"
|
||||
// EBPF_OP_STXDW pc=0 dst=r10 src=r1 offset=-8 imm=0
|
||||
#line 51 "sample/bindmonitor_bpf2bpf.c"
|
||||
*(uint64_t*)(uintptr_t)(r10 + OFFSET(-8)) = (uint64_t)r1;
|
||||
// EBPF_OP_MOV64_IMM pc=1 dst=r1 src=r0 offset=0 imm=187
|
||||
#line 51 "sample/bindmonitor_bpf2bpf.c"
|
||||
r1 = IMMEDIATE(187);
|
||||
// EBPF_OP_STXB pc=2 dst=r10 src=r1 offset=-10 imm=0
|
||||
#line 55 "sample/bindmonitor_bpf2bpf.c"
|
||||
*(uint8_t*)(uintptr_t)(r10 + OFFSET(-10)) = (uint8_t)r1;
|
||||
// EBPF_OP_STXB pc=3 dst=r10 src=r1 offset=-9 imm=0
|
||||
#line 56 "sample/bindmonitor_bpf2bpf.c"
|
||||
*(uint8_t*)(uintptr_t)(r10 + OFFSET(-9)) = (uint8_t)r1;
|
||||
// EBPF_OP_LDXDW pc=4 dst=r1 src=r10 offset=-8 imm=0
|
||||
#line 58 "sample/bindmonitor_bpf2bpf.c"
|
||||
r1 = *(uint64_t*)(uintptr_t)(r10 + OFFSET(-8));
|
||||
// EBPF_OP_LDXDW pc=5 dst=r1 src=r1 offset=0 imm=0
|
||||
#line 58 "sample/bindmonitor_bpf2bpf.c"
|
||||
r1 = *(uint64_t*)(uintptr_t)(r1 + OFFSET(0));
|
||||
// EBPF_OP_MOV64_IMM pc=6 dst=r0 src=r0 offset=0 imm=1
|
||||
#line 58 "sample/bindmonitor_bpf2bpf.c"
|
||||
r0 = IMMEDIATE(1);
|
||||
// EBPF_OP_JEQ_IMM pc=2 dst=r1 src=r0 offset=1 imm=0
|
||||
#line 43 "sample/bindmonitor_bpf2bpf.c"
|
||||
// EBPF_OP_JEQ_IMM pc=7 dst=r1 src=r0 offset=1 imm=0
|
||||
#line 58 "sample/bindmonitor_bpf2bpf.c"
|
||||
if (r1 == IMMEDIATE(0)) {
|
||||
#line 43 "sample/bindmonitor_bpf2bpf.c"
|
||||
#line 58 "sample/bindmonitor_bpf2bpf.c"
|
||||
goto label_1;
|
||||
#line 43 "sample/bindmonitor_bpf2bpf.c"
|
||||
#line 58 "sample/bindmonitor_bpf2bpf.c"
|
||||
}
|
||||
// EBPF_OP_MOV64_IMM pc=3 dst=r0 src=r0 offset=0 imm=0
|
||||
#line 43 "sample/bindmonitor_bpf2bpf.c"
|
||||
// EBPF_OP_MOV64_IMM pc=8 dst=r0 src=r0 offset=0 imm=0
|
||||
#line 58 "sample/bindmonitor_bpf2bpf.c"
|
||||
r0 = IMMEDIATE(0);
|
||||
label_1:
|
||||
// EBPF_OP_EXIT pc=4 dst=r0 src=r0 offset=0 imm=0
|
||||
#line 43 "sample/bindmonitor_bpf2bpf.c"
|
||||
// EBPF_OP_EXIT pc=9 dst=r0 src=r0 offset=0 imm=0
|
||||
#line 58 "sample/bindmonitor_bpf2bpf.c"
|
||||
return r0;
|
||||
}
|
||||
#pragma data_seg(push, "programs")
|
||||
|
@ -320,7 +437,7 @@ static program_entry_t _programs[] = {
|
|||
0,
|
||||
NULL,
|
||||
0,
|
||||
14,
|
||||
45,
|
||||
&BindMonitor_Caller_program_type_guid,
|
||||
&BindMonitor_Caller_attach_type_guid,
|
||||
},
|
||||
|
|
|
@ -204,7 +204,7 @@ TEST_CASE("show sections bpf.o .text", "[netsh][sections]")
|
|||
"load : 0\n"
|
||||
"load_store : 0\n"
|
||||
"map_in_map : 0\n"
|
||||
"other : 2\n"
|
||||
"other : 1\n"
|
||||
"packet_access: 0\n"
|
||||
"reallocate : 0\n"
|
||||
"store : 0\n"
|
||||
|
|
|
@ -73,7 +73,7 @@
|
|||
<ItemDefinitionGroup Condition="'$(Configuration)'=='Debug'">
|
||||
<ClCompile>
|
||||
<PreprocessorDefinitions>_DEBUG;_CONSOLE;NO_CATCH2;%(PreprocessorDefinitions)</PreprocessorDefinitions>
|
||||
<AdditionalIncludeDirectories>$(SolutionDir)tests\libfuzzer\include;$(SolutionDir)include;$(SolutionDir)external\ebpf-verifier\external\bpf_conformance\external\elfio;$(SolutionDir)external\ubpf\vm;$(OutDir);$(SolutionDir)external\ebpf-verifier\src;$(SolutionDir)tools\bpf2c;$(SolutionDir)libs\service;$(SolutionDir)libs\api;$(SolutionDir)libs\api_common;$(SolutionDir)libs\ebpfnetsh;$(SolutionDir)tests\libs\util;$(SolutionDir)tests\libs\common;$(SolutionDir)rpc_interface;$(SolutionDir)external\usersim\inc;$(SolutionDir)libs\execution_context;$(SolutionDir)tests\end_to_end;$(SolutionDir)tests\sample;$(SolutionDir)tests\sample\ext\inc;$(SolutionDir)\tests\xdp;$(SolutionDir)tools\export_program_info;$(SolutionDir)libs\thunk;$(SolutionDir)libs\thunk\mock;$(SolutionDir)\netebpfext;$(SolutionDir)external\catch2\src;$(SolutionDir)external\catch2\build\generated-includes;$(SolutionDir)external\bpftool;$(SolutionDir)external\usersim\cxplat\inc;$(SolutionDir)external\usersim\cxplat\inc\winuser;$(SolutionDir)libs\runtime;$(SolutionDir)libs\runtime\user;$(SolutionDir)libs\shared;$(SolutionDir)libs\shared\user;$(SolutionDir)undocked\tests\sample\ext\inc;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
|
||||
<AdditionalIncludeDirectories>$(SolutionDir)tests\libfuzzer\include;$(SolutionDir)include;$(SolutionDir)external\ebpf-verifier\external\bpf_conformance\external\elfio;$(SolutionDir)external\ubpf\vm;$(OutDir);$(SolutionDir)external\ebpf-verifier\src;$(SolutionDir)external\ebpf-verifier\build\_deps\gsl-src\include;$(SolutionDir)tools\bpf2c;$(SolutionDir)libs\service;$(SolutionDir)libs\api;$(SolutionDir)libs\api_common;$(SolutionDir)libs\ebpfnetsh;$(SolutionDir)tests\libs\util;$(SolutionDir)tests\libs\common;$(SolutionDir)rpc_interface;$(SolutionDir)external\usersim\inc;$(SolutionDir)libs\execution_context;$(SolutionDir)tests\end_to_end;$(SolutionDir)tests\sample;$(SolutionDir)tests\sample\ext\inc;$(SolutionDir)\tests\xdp;$(SolutionDir)tools\export_program_info;$(SolutionDir)libs\thunk;$(SolutionDir)libs\thunk\mock;$(SolutionDir)\netebpfext;$(SolutionDir)external\catch2\src;$(SolutionDir)external\catch2\build\generated-includes;$(SolutionDir)external\bpftool;$(SolutionDir)external\usersim\cxplat\inc;$(SolutionDir)external\usersim\cxplat\inc\winuser;$(SolutionDir)libs\runtime;$(SolutionDir)libs\runtime\user;$(SolutionDir)libs\shared;$(SolutionDir)libs\shared\user;$(SolutionDir)undocked\tests\sample\ext\inc;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
|
||||
</ClCompile>
|
||||
<Link>
|
||||
<SubSystem>Console</SubSystem>
|
||||
|
@ -84,7 +84,7 @@
|
|||
<ItemDefinitionGroup Condition="'$(Configuration)'=='NativeOnlyDebug'">
|
||||
<ClCompile>
|
||||
<PreprocessorDefinitions>_DEBUG;_CONSOLE;NO_CATCH2;%(PreprocessorDefinitions)</PreprocessorDefinitions>
|
||||
<AdditionalIncludeDirectories>$(SolutionDir)tests\libfuzzer\include;$(SolutionDir)include;$(SolutionDir)external\ebpf-verifier\external\bpf_conformance\external\elfio;$(SolutionDir)external\ubpf\vm;$(OutDir);$(SolutionDir)external\ebpf-verifier\src;$(SolutionDir)tools\bpf2c;$(SolutionDir)libs\service;$(SolutionDir)libs\api;$(SolutionDir)libs\api_common;$(SolutionDir)libs\ebpfnetsh;$(SolutionDir)tests\libs\util;$(SolutionDir)tests\libs\common;$(SolutionDir)rpc_interface;$(SolutionDir)external\usersim\inc;$(SolutionDir)libs\execution_context;$(SolutionDir)tests\end_to_end;$(SolutionDir)tests\sample;$(SolutionDir)tests\sample\ext\inc;$(SolutionDir)\tests\xdp;$(SolutionDir)tools\export_program_info;$(SolutionDir)libs\thunk;$(SolutionDir)libs\thunk\mock;$(SolutionDir)\netebpfext;$(SolutionDir)external\catch2\src;$(SolutionDir)external\catch2\build\generated-includes;$(SolutionDir)external\bpftool;$(SolutionDir)external\usersim\cxplat\inc;$(SolutionDir)external\usersim\cxplat\inc\winuser;$(SolutionDir)libs\runtime;$(SolutionDir)libs\runtime\user;$(SolutionDir)libs\shared;$(SolutionDir)libs\shared\user;$(SolutionDir)undocked\tests\sample\ext\inc;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
|
||||
<AdditionalIncludeDirectories>$(SolutionDir)tests\libfuzzer\include;$(SolutionDir)include;$(SolutionDir)external\ebpf-verifier\external\bpf_conformance\external\elfio;$(SolutionDir)external\ubpf\vm;$(OutDir);$(SolutionDir)external\ebpf-verifier\src;$(SolutionDir)external\ebpf-verifier\build\_deps\gsl-src\include;$(SolutionDir)tools\bpf2c;$(SolutionDir)libs\service;$(SolutionDir)libs\api;$(SolutionDir)libs\api_common;$(SolutionDir)libs\ebpfnetsh;$(SolutionDir)tests\libs\util;$(SolutionDir)tests\libs\common;$(SolutionDir)rpc_interface;$(SolutionDir)external\usersim\inc;$(SolutionDir)libs\execution_context;$(SolutionDir)tests\end_to_end;$(SolutionDir)tests\sample;$(SolutionDir)tests\sample\ext\inc;$(SolutionDir)\tests\xdp;$(SolutionDir)tools\export_program_info;$(SolutionDir)libs\thunk;$(SolutionDir)libs\thunk\mock;$(SolutionDir)\netebpfext;$(SolutionDir)external\catch2\src;$(SolutionDir)external\catch2\build\generated-includes;$(SolutionDir)external\bpftool;$(SolutionDir)external\usersim\cxplat\inc;$(SolutionDir)external\usersim\cxplat\inc\winuser;$(SolutionDir)libs\runtime;$(SolutionDir)libs\runtime\user;$(SolutionDir)libs\shared;$(SolutionDir)libs\shared\user;$(SolutionDir)undocked\tests\sample\ext\inc;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
|
||||
</ClCompile>
|
||||
<Link>
|
||||
<SubSystem>Console</SubSystem>
|
||||
|
@ -95,7 +95,7 @@
|
|||
<ItemDefinitionGroup Condition="'$(Configuration)'=='FuzzerDebug'">
|
||||
<ClCompile>
|
||||
<PreprocessorDefinitions>_DEBUG;_CONSOLE;NO_CATCH2;%(PreprocessorDefinitions)</PreprocessorDefinitions>
|
||||
<AdditionalIncludeDirectories>$(SolutionDir)tests\libfuzzer\include;$(SolutionDir)include;$(SolutionDir)external\ebpf-verifier\external\bpf_conformance\external\elfio;$(SolutionDir)external\ubpf\vm;$(OutDir);$(SolutionDir)external\ebpf-verifier\src;$(SolutionDir)tools\bpf2c;$(SolutionDir)libs\service;$(SolutionDir)libs\api;$(SolutionDir)libs\api_common;$(SolutionDir)libs\ebpfnetsh;$(SolutionDir)tests\libs\util;$(SolutionDir)tests\libs\common;$(SolutionDir)rpc_interface;$(SolutionDir)external\usersim\inc;$(SolutionDir)libs\execution_context;$(SolutionDir)tests\end_to_end;$(SolutionDir)tests\sample;$(SolutionDir)tests\sample\ext\inc;$(SolutionDir)\tests\xdp;$(SolutionDir)tools\export_program_info;$(SolutionDir)libs\thunk;$(SolutionDir)libs\thunk\mock;$(SolutionDir)\netebpfext;$(SolutionDir)external\catch2\src;$(SolutionDir)external\catch2\build\generated-includes;$(SolutionDir)external\bpftool;$(SolutionDir)external\usersim\cxplat\inc;$(SolutionDir)external\usersim\cxplat\inc\winuser;$(SolutionDir)libs\runtime;$(SolutionDir)libs\runtime\user;$(SolutionDir)libs\shared;$(SolutionDir)libs\shared\user;$(SolutionDir)undocked\tests\sample\ext\inc;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
|
||||
<AdditionalIncludeDirectories>$(SolutionDir)tests\libfuzzer\include;$(SolutionDir)include;$(SolutionDir)external\ebpf-verifier\external\bpf_conformance\external\elfio;$(SolutionDir)external\ubpf\vm;$(OutDir);$(SolutionDir)external\ebpf-verifier\src;$(SolutionDir)external\ebpf-verifier\build\_deps\gsl-src\include;$(SolutionDir)tools\bpf2c;$(SolutionDir)libs\service;$(SolutionDir)libs\api;$(SolutionDir)libs\api_common;$(SolutionDir)libs\ebpfnetsh;$(SolutionDir)tests\libs\util;$(SolutionDir)tests\libs\common;$(SolutionDir)rpc_interface;$(SolutionDir)external\usersim\inc;$(SolutionDir)libs\execution_context;$(SolutionDir)tests\end_to_end;$(SolutionDir)tests\sample;$(SolutionDir)tests\sample\ext\inc;$(SolutionDir)\tests\xdp;$(SolutionDir)tools\export_program_info;$(SolutionDir)libs\thunk;$(SolutionDir)libs\thunk\mock;$(SolutionDir)\netebpfext;$(SolutionDir)external\catch2\src;$(SolutionDir)external\catch2\build\generated-includes;$(SolutionDir)external\bpftool;$(SolutionDir)external\usersim\cxplat\inc;$(SolutionDir)external\usersim\cxplat\inc\winuser;$(SolutionDir)libs\runtime;$(SolutionDir)libs\runtime\user;$(SolutionDir)libs\shared;$(SolutionDir)libs\shared\user;$(SolutionDir)undocked\tests\sample\ext\inc;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
|
||||
</ClCompile>
|
||||
<Link>
|
||||
<SubSystem>Console</SubSystem>
|
||||
|
@ -106,7 +106,7 @@
|
|||
<ItemDefinitionGroup Condition="'$(Configuration)'=='Release'">
|
||||
<ClCompile>
|
||||
<PreprocessorDefinitions>NDEBUG;_CONSOLE;NO_CATCH;NO_CATCH2;%(PreprocessorDefinitions)</PreprocessorDefinitions>
|
||||
<AdditionalIncludeDirectories>$(SolutionDir)tests\libfuzzer\include;$(SolutionDir)include;$(SolutionDir)external\ebpf-verifier\external\bpf_conformance\external\elfio;$(SolutionDir)external\ubpf\vm;$(OutDir);$(SolutionDir)external\ebpf-verifier\src;$(SolutionDir)tools\bpf2c;$(SolutionDir)libs\service;$(SolutionDir)libs\api;$(SolutionDir)libs\api_common;$(SolutionDir)libs\ebpfnetsh;$(SolutionDir)tests\libs\util;$(SolutionDir)tests\libs\common;$(SolutionDir)rpc_interface;$(SolutionDir)external\usersim\inc;$(SolutionDir)libs\execution_context;$(SolutionDir)tests\end_to_end;$(SolutionDir)tests\sample;$(SolutionDir)tests\sample\ext\inc;$(SolutionDir)\tests\xdp;$(SolutionDir)tools\export_program_info;$(SolutionDir)libs\thunk;$(SolutionDir)libs\thunk\mock;$(SolutionDir)\netebpfext;$(SolutionDir)external\catch2\src;$(SolutionDir)external\catch2\build\generated-includes;$(SolutionDir)external\bpftool;$(SolutionDir)external\usersim\cxplat\inc;$(SolutionDir)external\usersim\cxplat\inc\winuser;$(SolutionDir)libs\runtime;$(SolutionDir)libs\runtime\user;$(SolutionDir)libs\shared;$(SolutionDir)libs\shared\user;$(SolutionDir)undocked\tests\sample\ext\inc;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
|
||||
<AdditionalIncludeDirectories>$(SolutionDir)tests\libfuzzer\include;$(SolutionDir)include;$(SolutionDir)external\ebpf-verifier\external\bpf_conformance\external\elfio;$(SolutionDir)external\ubpf\vm;$(OutDir);$(SolutionDir)external\ebpf-verifier\src;$(SolutionDir)external\ebpf-verifier\build\_deps\gsl-src\include;$(SolutionDir)tools\bpf2c;$(SolutionDir)libs\service;$(SolutionDir)libs\api;$(SolutionDir)libs\api_common;$(SolutionDir)libs\ebpfnetsh;$(SolutionDir)tests\libs\util;$(SolutionDir)tests\libs\common;$(SolutionDir)rpc_interface;$(SolutionDir)external\usersim\inc;$(SolutionDir)libs\execution_context;$(SolutionDir)tests\end_to_end;$(SolutionDir)tests\sample;$(SolutionDir)tests\sample\ext\inc;$(SolutionDir)\tests\xdp;$(SolutionDir)tools\export_program_info;$(SolutionDir)libs\thunk;$(SolutionDir)libs\thunk\mock;$(SolutionDir)\netebpfext;$(SolutionDir)external\catch2\src;$(SolutionDir)external\catch2\build\generated-includes;$(SolutionDir)external\bpftool;$(SolutionDir)external\usersim\cxplat\inc;$(SolutionDir)external\usersim\cxplat\inc\winuser;$(SolutionDir)libs\runtime;$(SolutionDir)libs\runtime\user;$(SolutionDir)libs\shared;$(SolutionDir)libs\shared\user;$(SolutionDir)undocked\tests\sample\ext\inc;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
|
||||
</ClCompile>
|
||||
<Link>
|
||||
<SubSystem>Console</SubSystem>
|
||||
|
@ -118,7 +118,7 @@
|
|||
<ItemDefinitionGroup Condition="'$(Configuration)'=='NativeOnlyRelease'">
|
||||
<ClCompile>
|
||||
<PreprocessorDefinitions>NDEBUG;_CONSOLE;NO_CATCH;NO_CATCH2;%(PreprocessorDefinitions)</PreprocessorDefinitions>
|
||||
<AdditionalIncludeDirectories>$(SolutionDir)tests\libfuzzer\include;$(SolutionDir)include;$(SolutionDir)external\ebpf-verifier\external\bpf_conformance\external\elfio;$(SolutionDir)external\ubpf\vm;$(OutDir);$(SolutionDir)external\ebpf-verifier\src;$(SolutionDir)tools\bpf2c;$(SolutionDir)libs\service;$(SolutionDir)libs\api;$(SolutionDir)libs\api_common;$(SolutionDir)libs\ebpfnetsh;$(SolutionDir)tests\libs\util;$(SolutionDir)tests\libs\common;$(SolutionDir)rpc_interface;$(SolutionDir)external\usersim\inc;$(SolutionDir)libs\execution_context;$(SolutionDir)tests\end_to_end;$(SolutionDir)tests\sample;$(SolutionDir)tests\sample\ext\inc;$(SolutionDir)\tests\xdp;$(SolutionDir)tools\export_program_info;$(SolutionDir)libs\thunk;$(SolutionDir)libs\thunk\mock;$(SolutionDir)\netebpfext;$(SolutionDir)external\catch2\src;$(SolutionDir)external\catch2\build\generated-includes;$(SolutionDir)external\bpftool;$(SolutionDir)external\usersim\cxplat\inc;$(SolutionDir)external\usersim\cxplat\inc\winuser;$(SolutionDir)libs\runtime;$(SolutionDir)libs\runtime\user;$(SolutionDir)libs\shared;$(SolutionDir)libs\shared\user;$(SolutionDir)undocked\tests\sample\ext\inc;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
|
||||
<AdditionalIncludeDirectories>$(SolutionDir)tests\libfuzzer\include;$(SolutionDir)include;$(SolutionDir)external\ebpf-verifier\external\bpf_conformance\external\elfio;$(SolutionDir)external\ubpf\vm;$(OutDir);$(SolutionDir)external\ebpf-verifier\src;$(SolutionDir)external\ebpf-verifier\build\_deps\gsl-src\include;$(SolutionDir)tools\bpf2c;$(SolutionDir)libs\service;$(SolutionDir)libs\api;$(SolutionDir)libs\api_common;$(SolutionDir)libs\ebpfnetsh;$(SolutionDir)tests\libs\util;$(SolutionDir)tests\libs\common;$(SolutionDir)rpc_interface;$(SolutionDir)external\usersim\inc;$(SolutionDir)libs\execution_context;$(SolutionDir)tests\end_to_end;$(SolutionDir)tests\sample;$(SolutionDir)tests\sample\ext\inc;$(SolutionDir)\tests\xdp;$(SolutionDir)tools\export_program_info;$(SolutionDir)libs\thunk;$(SolutionDir)libs\thunk\mock;$(SolutionDir)\netebpfext;$(SolutionDir)external\catch2\src;$(SolutionDir)external\catch2\build\generated-includes;$(SolutionDir)external\bpftool;$(SolutionDir)external\usersim\cxplat\inc;$(SolutionDir)external\usersim\cxplat\inc\winuser;$(SolutionDir)libs\runtime;$(SolutionDir)libs\runtime\user;$(SolutionDir)libs\shared;$(SolutionDir)libs\shared\user;$(SolutionDir)undocked\tests\sample\ext\inc;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
|
||||
</ClCompile>
|
||||
<Link>
|
||||
<SubSystem>Console</SubSystem>
|
||||
|
@ -197,4 +197,4 @@
|
|||
<Import Project="$(VCTargetsPath)\Microsoft.Cpp.targets" />
|
||||
<ImportGroup Label="ExtensionTargets">
|
||||
</ImportGroup>
|
||||
</Project>
|
||||
</Project>
|
|
@ -107,7 +107,7 @@
|
|||
<ClCompile>
|
||||
<PreprocessorDefinitions>_DEBUG;_LIB;%(PreprocessorDefinitions)</PreprocessorDefinitions>
|
||||
<ConformanceMode>true</ConformanceMode>
|
||||
<AdditionalIncludeDirectories>$(SolutionDir)libs\api_common;$(SolutionDir)libs\ebpfnetsh;$(SolutionDir)libs\execution_context;$(SolutionDir)include;$(SolutionDir)libs\shared;$(SolutionDir)libs\shared\user;$(SolutionDir)libs\runtime;$(SolutionDir)libs\runtime\user;$(SolutionDir)external\usersim\inc;$(SolutionDir)external\usersim\cxplat\inc;$(SolutionDir)external\usersim\cxplat\inc\winuser;$(SolutionDir)tests\end_to_end;$(SolutionDir)tests\sample\ext\inc;$(SolutionDir)\netebpfext;$(SolutionDir)libs\thunk;$(OutDir);$(SolutionDir)external\catch2\src;$(SolutionDir)external\catch2\build\generated-includes;$(SolutionDir)tests\sample;$(SolutionDir)external\bpftool;$(SolutionDir)external\ebpf-verifier\src;$(SolutionDir)libs\api;$(SolutionDir)undocked\tests\sample\ext\inc;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
|
||||
<AdditionalIncludeDirectories>$(SolutionDir)libs\api_common;$(SolutionDir)libs\ebpfnetsh;$(SolutionDir)libs\execution_context;$(SolutionDir)include;$(SolutionDir)libs\shared;$(SolutionDir)libs\shared\user;$(SolutionDir)libs\runtime;$(SolutionDir)libs\runtime\user;$(SolutionDir)external\usersim\inc;$(SolutionDir)external\usersim\cxplat\inc;$(SolutionDir)external\usersim\cxplat\inc\winuser;$(SolutionDir)tests\end_to_end;$(SolutionDir)tests\sample\ext\inc;$(SolutionDir)\netebpfext;$(SolutionDir)libs\thunk;$(OutDir);$(SolutionDir)external\catch2\src;$(SolutionDir)external\catch2\build\generated-includes;$(SolutionDir)tests\sample;$(SolutionDir)external\bpftool;$(SolutionDir)external\ebpf-verifier\src;$(SolutionDir)external\ebpf-verifier\build\_deps\gsl-src\include;$(SolutionDir)libs\api;$(SolutionDir)undocked\tests\sample\ext\inc;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
|
||||
</ClCompile>
|
||||
<Link>
|
||||
<SubSystem>
|
||||
|
@ -119,7 +119,7 @@
|
|||
<ClCompile>
|
||||
<PreprocessorDefinitions>_DEBUG;_LIB;%(PreprocessorDefinitions)</PreprocessorDefinitions>
|
||||
<ConformanceMode>true</ConformanceMode>
|
||||
<AdditionalIncludeDirectories>$(SolutionDir)libs\api_common;$(SolutionDir)libs\ebpfnetsh;$(SolutionDir)libs\execution_context;$(SolutionDir)include;$(SolutionDir)libs\shared;$(SolutionDir)libs\shared\user;$(SolutionDir)libs\runtime;$(SolutionDir)libs\runtime\user;$(SolutionDir)external\usersim\inc;$(SolutionDir)external\usersim\cxplat\inc;$(SolutionDir)external\usersim\cxplat\inc\winuser;$(SolutionDir)tests\end_to_end;$(SolutionDir)tests\sample\ext\inc;$(SolutionDir)\netebpfext;$(SolutionDir)libs\thunk;$(OutDir);$(SolutionDir)external\catch2\src;$(SolutionDir)external\catch2\build\generated-includes;$(SolutionDir)tests\sample;$(SolutionDir)external\bpftool;$(SolutionDir)external\ebpf-verifier\src;$(SolutionDir)libs\api;$(SolutionDir)undocked\tests\sample\ext\inc;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
|
||||
<AdditionalIncludeDirectories>$(SolutionDir)libs\api_common;$(SolutionDir)libs\ebpfnetsh;$(SolutionDir)libs\execution_context;$(SolutionDir)include;$(SolutionDir)libs\shared;$(SolutionDir)libs\shared\user;$(SolutionDir)libs\runtime;$(SolutionDir)libs\runtime\user;$(SolutionDir)external\usersim\inc;$(SolutionDir)external\usersim\cxplat\inc;$(SolutionDir)external\usersim\cxplat\inc\winuser;$(SolutionDir)tests\end_to_end;$(SolutionDir)tests\sample\ext\inc;$(SolutionDir)\netebpfext;$(SolutionDir)libs\thunk;$(OutDir);$(SolutionDir)external\catch2\src;$(SolutionDir)external\catch2\build\generated-includes;$(SolutionDir)tests\sample;$(SolutionDir)external\bpftool;$(SolutionDir)external\ebpf-verifier\src;$(SolutionDir)external\ebpf-verifier\build\_deps\gsl-src\include;$(SolutionDir)libs\api;$(SolutionDir)undocked\tests\sample\ext\inc;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
|
||||
</ClCompile>
|
||||
<Link>
|
||||
<SubSystem>
|
||||
|
@ -131,7 +131,7 @@
|
|||
<ClCompile>
|
||||
<PreprocessorDefinitions>_DEBUG;_LIB;%(PreprocessorDefinitions)</PreprocessorDefinitions>
|
||||
<ConformanceMode>true</ConformanceMode>
|
||||
<AdditionalIncludeDirectories>$(SolutionDir)libs\api_common;$(SolutionDir)libs\ebpfnetsh;$(SolutionDir)libs\execution_context;$(SolutionDir)include;$(SolutionDir)libs\shared;$(SolutionDir)libs\shared\user;$(SolutionDir)libs\runtime;$(SolutionDir)libs\runtime\user;$(SolutionDir)external\usersim\inc;$(SolutionDir)external\usersim\cxplat\inc;$(SolutionDir)external\usersim\cxplat\inc\winuser;$(SolutionDir)tests\end_to_end;$(SolutionDir)tests\sample\ext\inc;$(SolutionDir)\netebpfext;$(SolutionDir)libs\thunk;$(OutDir);$(SolutionDir)external\catch2\src;$(SolutionDir)external\catch2\build\generated-includes;$(SolutionDir)tests\sample;$(SolutionDir)external\bpftool;$(SolutionDir)external\ebpf-verifier\src;$(SolutionDir)libs\api;$(SolutionDir)undocked\tests\sample\ext\inc;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
|
||||
<AdditionalIncludeDirectories>$(SolutionDir)libs\api_common;$(SolutionDir)libs\ebpfnetsh;$(SolutionDir)libs\execution_context;$(SolutionDir)include;$(SolutionDir)libs\shared;$(SolutionDir)libs\shared\user;$(SolutionDir)libs\runtime;$(SolutionDir)libs\runtime\user;$(SolutionDir)external\usersim\inc;$(SolutionDir)external\usersim\cxplat\inc;$(SolutionDir)external\usersim\cxplat\inc\winuser;$(SolutionDir)tests\end_to_end;$(SolutionDir)tests\sample\ext\inc;$(SolutionDir)\netebpfext;$(SolutionDir)libs\thunk;$(OutDir);$(SolutionDir)external\catch2\src;$(SolutionDir)external\catch2\build\generated-includes;$(SolutionDir)tests\sample;$(SolutionDir)external\bpftool;$(SolutionDir)external\ebpf-verifier\src;$(SolutionDir)external\ebpf-verifier\build\_deps\gsl-src\include;$(SolutionDir)libs\api;$(SolutionDir)undocked\tests\sample\ext\inc;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
|
||||
</ClCompile>
|
||||
<Link>
|
||||
<SubSystem>
|
||||
|
@ -146,7 +146,7 @@
|
|||
<ClCompile>
|
||||
<PreprocessorDefinitions>NDEBUG;_LIB;%(PreprocessorDefinitions)</PreprocessorDefinitions>
|
||||
<ConformanceMode>true</ConformanceMode>
|
||||
<AdditionalIncludeDirectories>$(SolutionDir)libs\api_common;$(SolutionDir)libs\ebpfnetsh;$(SolutionDir)libs\execution_context;$(SolutionDir)include;$(SolutionDir)libs\shared;$(SolutionDir)libs\shared\user;$(SolutionDir)libs\runtime;$(SolutionDir)libs\runtime\user;$(SolutionDir)external\usersim\inc;$(SolutionDir)external\usersim\cxplat\inc;$(SolutionDir)external\usersim\cxplat\inc\winuser;$(SolutionDir)tests\end_to_end;$(SolutionDir)tests\sample\ext\inc;$(SolutionDir)\netebpfext;$(SolutionDir)libs\thunk;$(OutDir);$(SolutionDir)external\catch2\src;$(SolutionDir)external\catch2\build\generated-includes;$(SolutionDir)tests\sample;$(SolutionDir)external\bpftool;$(SolutionDir)external\ebpf-verifier\src;$(SolutionDir)libs\api;$(SolutionDir)undocked\tests\sample\ext\inc;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
|
||||
<AdditionalIncludeDirectories>$(SolutionDir)libs\api_common;$(SolutionDir)libs\ebpfnetsh;$(SolutionDir)libs\execution_context;$(SolutionDir)include;$(SolutionDir)libs\shared;$(SolutionDir)libs\shared\user;$(SolutionDir)libs\runtime;$(SolutionDir)libs\runtime\user;$(SolutionDir)external\usersim\inc;$(SolutionDir)external\usersim\cxplat\inc;$(SolutionDir)external\usersim\cxplat\inc\winuser;$(SolutionDir)tests\end_to_end;$(SolutionDir)tests\sample\ext\inc;$(SolutionDir)\netebpfext;$(SolutionDir)libs\thunk;$(OutDir);$(SolutionDir)external\catch2\src;$(SolutionDir)external\catch2\build\generated-includes;$(SolutionDir)tests\sample;$(SolutionDir)external\bpftool;$(SolutionDir)external\ebpf-verifier\src;$(SolutionDir)external\ebpf-verifier\build\_deps\gsl-src\include;$(SolutionDir)libs\api;$(SolutionDir)undocked\tests\sample\ext\inc;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
|
||||
</ClCompile>
|
||||
<Link>
|
||||
<SubSystem>
|
||||
|
@ -160,7 +160,7 @@
|
|||
<ClCompile>
|
||||
<PreprocessorDefinitions>NDEBUG;_LIB;%(PreprocessorDefinitions)</PreprocessorDefinitions>
|
||||
<ConformanceMode>true</ConformanceMode>
|
||||
<AdditionalIncludeDirectories>$(SolutionDir)libs\api_common;$(SolutionDir)libs\ebpfnetsh;$(SolutionDir)libs\execution_context;$(SolutionDir)include;$(SolutionDir)libs\shared;$(SolutionDir)libs\shared\user;$(SolutionDir)libs\runtime;$(SolutionDir)libs\runtime\user;$(SolutionDir)external\usersim\inc;$(SolutionDir)external\usersim\cxplat\inc;$(SolutionDir)external\usersim\cxplat\inc\winuser;$(SolutionDir)tests\end_to_end;$(SolutionDir)tests\sample\ext\inc;$(SolutionDir)\netebpfext;$(SolutionDir)libs\thunk;$(OutDir);$(SolutionDir)external\catch2\src;$(SolutionDir)external\catch2\build\generated-includes;$(SolutionDir)tests\sample;$(SolutionDir)external\bpftool;$(SolutionDir)external\ebpf-verifier\src;$(SolutionDir)libs\api;$(SolutionDir)undocked\tests\sample\ext\inc;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
|
||||
<AdditionalIncludeDirectories>$(SolutionDir)libs\api_common;$(SolutionDir)libs\ebpfnetsh;$(SolutionDir)libs\execution_context;$(SolutionDir)include;$(SolutionDir)libs\shared;$(SolutionDir)libs\shared\user;$(SolutionDir)libs\runtime;$(SolutionDir)libs\runtime\user;$(SolutionDir)external\usersim\inc;$(SolutionDir)external\usersim\cxplat\inc;$(SolutionDir)external\usersim\cxplat\inc\winuser;$(SolutionDir)tests\end_to_end;$(SolutionDir)tests\sample\ext\inc;$(SolutionDir)\netebpfext;$(SolutionDir)libs\thunk;$(OutDir);$(SolutionDir)external\catch2\src;$(SolutionDir)external\catch2\build\generated-includes;$(SolutionDir)tests\sample;$(SolutionDir)external\bpftool;$(SolutionDir)external\ebpf-verifier\src;$(SolutionDir)external\ebpf-verifier\build\_deps\gsl-src\include;$(SolutionDir)libs\api;$(SolutionDir)undocked\tests\sample\ext\inc;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
|
||||
</ClCompile>
|
||||
<Link>
|
||||
<SubSystem>
|
||||
|
@ -173,4 +173,4 @@
|
|||
<Import Project="$(VCTargetsPath)\Microsoft.Cpp.targets" />
|
||||
<ImportGroup Label="ExtensionTargets">
|
||||
</ImportGroup>
|
||||
</Project>
|
||||
</Project>
|
|
@ -23,14 +23,24 @@ bind_action_t
|
|||
BindMonitor_Callee(uint64_t* pid);
|
||||
|
||||
SEC("bind")
|
||||
bind_action_t
|
||||
__attribute__((optnone)) bind_action_t
|
||||
BindMonitor_Caller(bind_md_t* ctx)
|
||||
{
|
||||
// Use some stack space.
|
||||
volatile uint8_t outer_cookie[2];
|
||||
outer_cookie[0] = 0xcc;
|
||||
outer_cookie[1] = 0xcc;
|
||||
|
||||
uint64_t pid = ctx->process_id;
|
||||
if (BindMonitor_Callee(&ctx->process_id) == BIND_DENY) {
|
||||
return BIND_DENY;
|
||||
}
|
||||
|
||||
// Verify that the caller's stack space is preserved.
|
||||
if (outer_cookie[0] != 0xcc || outer_cookie[1] != 0xcc) {
|
||||
return -1;
|
||||
}
|
||||
|
||||
if (pid == 1) {
|
||||
// The variable should have been preserved across the call.
|
||||
return BIND_REDIRECT;
|
||||
|
@ -38,8 +48,12 @@ BindMonitor_Caller(bind_md_t* ctx)
|
|||
return BIND_PERMIT;
|
||||
}
|
||||
|
||||
__attribute__((noinline)) bind_action_t
|
||||
BindMonitor_Callee(uint64_t* pid)
|
||||
__attribute__((noinline)) bind_action_t __attribute__((optnone)) BindMonitor_Callee(uint64_t* pid)
|
||||
{
|
||||
// Use some stack space.
|
||||
volatile uint8_t inner_cookie[2];
|
||||
inner_cookie[0] = 0xbb;
|
||||
inner_cookie[1] = 0xbb;
|
||||
|
||||
return (*pid == 0) ? BIND_DENY : BIND_PERMIT;
|
||||
}
|
||||
|
|
|
@ -73,7 +73,7 @@
|
|||
<ClCompile>
|
||||
<PreprocessorDefinitions>_DEBUG;_CONSOLE;%(PreprocessorDefinitions)</PreprocessorDefinitions>
|
||||
<ConformanceMode>true</ConformanceMode>
|
||||
<AdditionalIncludeDirectories>$(SolutionDir)tests\stress;$(SolutionDir)include;$(SolutionDir)libs\api;$(SolutionDir)tests\end_to_end;$(SolutionDir)tests\libs\util;$(SolutionDir)tests\libs\common;$(SolutionDir)tests\sample\ext\inc;$(SolutionDir)tests\socket;$(SolutionDir)libs\execution_context;$(SolutionDir)libs\runtime;$(SolutionDir)libs\runtime\user;$(SolutionDir)libs\shared;$(SolutionDir)libs\shared\user;$(SolutionDir)external\usersim\cxplat\inc;$(SolutionDir)external\usersim\cxplat\inc\winuser;$(SolutionDir)external\usersim\inc;$(SolutionDir)libs\thunk;$(SolutionDir)\netebpfext;$(SolutionDir)external\catch2\src;$(SolutionDir)external\catch2\build\generated-includes;$(SolutionDir)external\bpftool;$(SolutionDir)external\ebpf-verifier\src;$(SolutionDir)libs\api_common;$(SolutionDir)undocked\tests\sample\ext\inc;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
|
||||
<AdditionalIncludeDirectories>$(SolutionDir)tests\stress;$(SolutionDir)include;$(SolutionDir)libs\api;$(SolutionDir)tests\end_to_end;$(SolutionDir)tests\libs\util;$(SolutionDir)tests\libs\common;$(SolutionDir)tests\sample\ext\inc;$(SolutionDir)tests\socket;$(SolutionDir)libs\execution_context;$(SolutionDir)libs\runtime;$(SolutionDir)libs\runtime\user;$(SolutionDir)libs\shared;$(SolutionDir)libs\shared\user;$(SolutionDir)external\usersim\cxplat\inc;$(SolutionDir)external\usersim\cxplat\inc\winuser;$(SolutionDir)external\usersim\inc;$(SolutionDir)libs\thunk;$(SolutionDir)\netebpfext;$(SolutionDir)external\catch2\src;$(SolutionDir)external\catch2\build\generated-includes;$(SolutionDir)external\bpftool;$(SolutionDir)external\ebpf-verifier\src;$(SolutionDir)external\ebpf-verifier\build\_deps\gsl-src\include;$(SolutionDir)libs\api_common;$(SolutionDir)undocked\tests\sample\ext\inc;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
|
||||
</ClCompile>
|
||||
<Link>
|
||||
<SubSystem>Console</SubSystem>
|
||||
|
@ -85,7 +85,7 @@
|
|||
<ClCompile>
|
||||
<PreprocessorDefinitions>_DEBUG;_CONSOLE;%(PreprocessorDefinitions)</PreprocessorDefinitions>
|
||||
<ConformanceMode>true</ConformanceMode>
|
||||
<AdditionalIncludeDirectories>$(SolutionDir)tests\stress;$(SolutionDir)include;$(SolutionDir)libs\api;$(SolutionDir)tests\end_to_end;$(SolutionDir)tests\libs\util;$(SolutionDir)tests\libs\common;$(SolutionDir)tests\sample\ext\inc;$(SolutionDir)tests\socket;$(SolutionDir)libs\execution_context;$(SolutionDir)libs\runtime;$(SolutionDir)libs\runtime\user;$(SolutionDir)libs\shared;$(SolutionDir)libs\shared\user;$(SolutionDir)external\usersim\cxplat\inc;$(SolutionDir)external\usersim\cxplat\inc\winuser;$(SolutionDir)external\usersim\inc;$(SolutionDir)libs\thunk;$(SolutionDir)\netebpfext;$(SolutionDir)external\catch2\src;$(SolutionDir)external\catch2\build\generated-includes;$(SolutionDir)external\bpftool;$(SolutionDir)external\ebpf-verifier\src;$(SolutionDir)libs\api_common;$(SolutionDir)undocked\tests\sample\ext\inc;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
|
||||
<AdditionalIncludeDirectories>$(SolutionDir)tests\stress;$(SolutionDir)include;$(SolutionDir)libs\api;$(SolutionDir)tests\end_to_end;$(SolutionDir)tests\libs\util;$(SolutionDir)tests\libs\common;$(SolutionDir)tests\sample\ext\inc;$(SolutionDir)tests\socket;$(SolutionDir)libs\execution_context;$(SolutionDir)libs\runtime;$(SolutionDir)libs\runtime\user;$(SolutionDir)libs\shared;$(SolutionDir)libs\shared\user;$(SolutionDir)external\usersim\cxplat\inc;$(SolutionDir)external\usersim\cxplat\inc\winuser;$(SolutionDir)external\usersim\inc;$(SolutionDir)libs\thunk;$(SolutionDir)\netebpfext;$(SolutionDir)external\catch2\src;$(SolutionDir)external\catch2\build\generated-includes;$(SolutionDir)external\bpftool;$(SolutionDir)external\ebpf-verifier\src;$(SolutionDir)external\ebpf-verifier\build\_deps\gsl-src\include;$(SolutionDir)libs\api_common;$(SolutionDir)undocked\tests\sample\ext\inc;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
|
||||
</ClCompile>
|
||||
<Link>
|
||||
<SubSystem>Console</SubSystem>
|
||||
|
@ -97,7 +97,7 @@
|
|||
<ClCompile>
|
||||
<PreprocessorDefinitions>NDEBUG;_CONSOLE;%(PreprocessorDefinitions)</PreprocessorDefinitions>
|
||||
<ConformanceMode>true</ConformanceMode>
|
||||
<AdditionalIncludeDirectories>$(SolutionDir)tests\stress;$(SolutionDir)include;$(SolutionDir)libs\api;$(SolutionDir)tests\end_to_end;$(SolutionDir)tests\libs\util;$(SolutionDir)tests\libs\common;$(SolutionDir)tests\sample\ext\inc;$(SolutionDir)tests\socket;$(SolutionDir)libs\execution_context;$(SolutionDir)libs\runtime;$(SolutionDir)libs\runtime\user;$(SolutionDir)libs\shared;$(SolutionDir)libs\shared\user;$(SolutionDir)external\usersim\cxplat\inc;$(SolutionDir)external\usersim\cxplat\inc\winuser;$(SolutionDir)external\usersim\inc;$(SolutionDir)libs\thunk;$(SolutionDir)\netebpfext;$(SolutionDir)external\catch2\src;$(SolutionDir)external\catch2\build\generated-includes;$(SolutionDir)external\bpftool;$(SolutionDir)external\ebpf-verifier\src;$(SolutionDir)libs\api_common;$(SolutionDir)undocked\tests\sample\ext\inc;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
|
||||
<AdditionalIncludeDirectories>$(SolutionDir)tests\stress;$(SolutionDir)include;$(SolutionDir)libs\api;$(SolutionDir)tests\end_to_end;$(SolutionDir)tests\libs\util;$(SolutionDir)tests\libs\common;$(SolutionDir)tests\sample\ext\inc;$(SolutionDir)tests\socket;$(SolutionDir)libs\execution_context;$(SolutionDir)libs\runtime;$(SolutionDir)libs\runtime\user;$(SolutionDir)libs\shared;$(SolutionDir)libs\shared\user;$(SolutionDir)external\usersim\cxplat\inc;$(SolutionDir)external\usersim\cxplat\inc\winuser;$(SolutionDir)external\usersim\inc;$(SolutionDir)libs\thunk;$(SolutionDir)\netebpfext;$(SolutionDir)external\catch2\src;$(SolutionDir)external\catch2\build\generated-includes;$(SolutionDir)external\bpftool;$(SolutionDir)external\ebpf-verifier\src;$(SolutionDir)external\ebpf-verifier\build\_deps\gsl-src\include;$(SolutionDir)libs\api_common;$(SolutionDir)undocked\tests\sample\ext\inc;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
|
||||
</ClCompile>
|
||||
<Link>
|
||||
<SubSystem>Console</SubSystem>
|
||||
|
@ -112,7 +112,7 @@
|
|||
<ClCompile>
|
||||
<PreprocessorDefinitions>NDEBUG;_CONSOLE;%(PreprocessorDefinitions)</PreprocessorDefinitions>
|
||||
<ConformanceMode>true</ConformanceMode>
|
||||
<AdditionalIncludeDirectories>$(SolutionDir)tests\stress;$(SolutionDir)include;$(SolutionDir)libs\api;$(SolutionDir)tests\end_to_end;$(SolutionDir)tests\libs\util;$(SolutionDir)tests\libs\common;$(SolutionDir)tests\sample\ext\inc;$(SolutionDir)tests\socket;$(SolutionDir)libs\execution_context;$(SolutionDir)libs\runtime;$(SolutionDir)libs\runtime\user;$(SolutionDir)libs\shared;$(SolutionDir)libs\shared\user;$(SolutionDir)external\usersim\cxplat\inc;$(SolutionDir)external\usersim\cxplat\inc\winuser;$(SolutionDir)external\usersim\inc;$(SolutionDir)libs\thunk;$(SolutionDir)\netebpfext;$(SolutionDir)external\catch2\src;$(SolutionDir)external\catch2\build\generated-includes;$(SolutionDir)external\bpftool;$(SolutionDir)external\ebpf-verifier\src;$(SolutionDir)libs\api_common;$(SolutionDir)undocked\tests\sample\ext\inc;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
|
||||
<AdditionalIncludeDirectories>$(SolutionDir)tests\stress;$(SolutionDir)include;$(SolutionDir)libs\api;$(SolutionDir)tests\end_to_end;$(SolutionDir)tests\libs\util;$(SolutionDir)tests\libs\common;$(SolutionDir)tests\sample\ext\inc;$(SolutionDir)tests\socket;$(SolutionDir)libs\execution_context;$(SolutionDir)libs\runtime;$(SolutionDir)libs\runtime\user;$(SolutionDir)libs\shared;$(SolutionDir)libs\shared\user;$(SolutionDir)external\usersim\cxplat\inc;$(SolutionDir)external\usersim\cxplat\inc\winuser;$(SolutionDir)external\usersim\inc;$(SolutionDir)libs\thunk;$(SolutionDir)\netebpfext;$(SolutionDir)external\catch2\src;$(SolutionDir)external\catch2\build\generated-includes;$(SolutionDir)external\bpftool;$(SolutionDir)external\ebpf-verifier\src;$(SolutionDir)external\ebpf-verifier\build\_deps\gsl-src\include;$(SolutionDir)libs\api_common;$(SolutionDir)undocked\tests\sample\ext\inc;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
|
||||
</ClCompile>
|
||||
<Link>
|
||||
<SubSystem>Console</SubSystem>
|
||||
|
@ -153,4 +153,4 @@
|
|||
<ClInclude Include="rpc_client.h" />
|
||||
</ItemGroup>
|
||||
<Import Project="$(VCTargetsPath)\Microsoft.Cpp.targets" />
|
||||
</Project>
|
||||
</Project>
|
|
@ -71,7 +71,7 @@
|
|||
<ClCompile>
|
||||
<PreprocessorDefinitions>USER_MODE_TEST;_DEBUG;_CONSOLE;%(PreprocessorDefinitions)</PreprocessorDefinitions>
|
||||
<ConformanceMode>true</ConformanceMode>
|
||||
<AdditionalIncludeDirectories>$(SolutionDir)tests\stress;$(SolutionDir)libs\api_common;$(SolutionDir)include;$(SolutionDir)libs\api;$(SolutionDir)libs\ebpfnetsh;$(SolutionDir)tests\libs\util;$(SolutionDir)tests\libs\common;$(OutDir);$(SolutionDir)external\ebpf-verifier\src;$(SolutionDir)libs\service;$(SolutionDir)rpc_interface;$(SolutionDir)libs\runtime;$(SolutionDir)libs\runtime\user;$(SolutionDir)libs\shared;$(SolutionDir)libs\shared\user;$(SolutionDir)external\usersim\cxplat\inc;$(SolutionDir)external\usersim\cxplat\inc\winuser;$(SolutionDir)external\usersim\inc;$(SolutionDir)libs\execution_context;$(SolutionDir)tests\end_to_end;$(SolutionDir)tests\sample;$(SolutionDir)tests\sample\ext\inc;$(SolutionDir)\tests\xdp;$(SolutionDir)tools\export_program_info;$(SolutionDir)libs\thunk;$(SolutionDir)libs\thunk\mock;$(SolutionDir)\netebpfext;$(SolutionDir)external\catch2\src;$(SolutionDir)external\catch2\build\generated-includes;$(SolutionDir)external\bpftool;$(SolutionDir)include\user;$(SolutionDir)undocked\tests\sample\ext\inc;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
|
||||
<AdditionalIncludeDirectories>$(SolutionDir)tests\stress;$(SolutionDir)libs\api_common;$(SolutionDir)include;$(SolutionDir)libs\api;$(SolutionDir)libs\ebpfnetsh;$(SolutionDir)tests\libs\util;$(SolutionDir)tests\libs\common;$(OutDir);$(SolutionDir)external\ebpf-verifier\src;$(SolutionDir)external\ebpf-verifier\build\_deps\gsl-src\include;$(SolutionDir)libs\service;$(SolutionDir)rpc_interface;$(SolutionDir)libs\runtime;$(SolutionDir)libs\runtime\user;$(SolutionDir)libs\shared;$(SolutionDir)libs\shared\user;$(SolutionDir)external\usersim\cxplat\inc;$(SolutionDir)external\usersim\cxplat\inc\winuser;$(SolutionDir)external\usersim\inc;$(SolutionDir)libs\execution_context;$(SolutionDir)tests\end_to_end;$(SolutionDir)tests\sample;$(SolutionDir)tests\sample\ext\inc;$(SolutionDir)\tests\xdp;$(SolutionDir)tools\export_program_info;$(SolutionDir)libs\thunk;$(SolutionDir)libs\thunk\mock;$(SolutionDir)\netebpfext;$(SolutionDir)external\catch2\src;$(SolutionDir)external\catch2\build\generated-includes;$(SolutionDir)external\bpftool;$(SolutionDir)include\user;$(SolutionDir)undocked\tests\sample\ext\inc;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
|
||||
</ClCompile>
|
||||
<Link>
|
||||
<SubSystem>Console</SubSystem>
|
||||
|
@ -83,7 +83,7 @@
|
|||
<ClCompile>
|
||||
<PreprocessorDefinitions>USER_MODE_TEST;_DEBUG;_CONSOLE;%(PreprocessorDefinitions)</PreprocessorDefinitions>
|
||||
<ConformanceMode>true</ConformanceMode>
|
||||
<AdditionalIncludeDirectories>$(SolutionDir)tests\stress;$(SolutionDir)libs\api_common;$(SolutionDir)include;$(SolutionDir)libs\api;$(SolutionDir)libs\ebpfnetsh;$(SolutionDir)tests\libs\util;$(SolutionDir)tests\libs\common;$(OutDir);$(SolutionDir)external\ebpf-verifier\src;$(SolutionDir)libs\service;$(SolutionDir)rpc_interface;$(SolutionDir)libs\runtime;$(SolutionDir)libs\runtime\user;$(SolutionDir)libs\shared;$(SolutionDir)libs\shared\user;$(SolutionDir)external\usersim\cxplat\inc;$(SolutionDir)external\usersim\cxplat\inc\winuser;$(SolutionDir)external\usersim\inc;$(SolutionDir)libs\execution_context;$(SolutionDir)tests\end_to_end;$(SolutionDir)tests\sample;$(SolutionDir)tests\sample\ext\inc;$(SolutionDir)\tests\xdp;$(SolutionDir)tools\export_program_info;$(SolutionDir)libs\thunk;$(SolutionDir)libs\thunk\mock;$(SolutionDir)\netebpfext;$(SolutionDir)external\catch2\src;$(SolutionDir)external\catch2\build\generated-includes;$(SolutionDir)external\bpftool;$(SolutionDir)include\user;$(SolutionDir)undocked\tests\sample\ext\inc;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
|
||||
<AdditionalIncludeDirectories>$(SolutionDir)tests\stress;$(SolutionDir)libs\api_common;$(SolutionDir)include;$(SolutionDir)libs\api;$(SolutionDir)libs\ebpfnetsh;$(SolutionDir)tests\libs\util;$(SolutionDir)tests\libs\common;$(OutDir);$(SolutionDir)external\ebpf-verifier\src;$(SolutionDir)external\ebpf-verifier\build\_deps\gsl-src\include;$(SolutionDir)libs\service;$(SolutionDir)rpc_interface;$(SolutionDir)libs\runtime;$(SolutionDir)libs\runtime\user;$(SolutionDir)libs\shared;$(SolutionDir)libs\shared\user;$(SolutionDir)external\usersim\cxplat\inc;$(SolutionDir)external\usersim\cxplat\inc\winuser;$(SolutionDir)external\usersim\inc;$(SolutionDir)libs\execution_context;$(SolutionDir)tests\end_to_end;$(SolutionDir)tests\sample;$(SolutionDir)tests\sample\ext\inc;$(SolutionDir)\tests\xdp;$(SolutionDir)tools\export_program_info;$(SolutionDir)libs\thunk;$(SolutionDir)libs\thunk\mock;$(SolutionDir)\netebpfext;$(SolutionDir)external\catch2\src;$(SolutionDir)external\catch2\build\generated-includes;$(SolutionDir)external\bpftool;$(SolutionDir)include\user;$(SolutionDir)undocked\tests\sample\ext\inc;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
|
||||
</ClCompile>
|
||||
<Link>
|
||||
<SubSystem>Console</SubSystem>
|
||||
|
@ -95,7 +95,7 @@
|
|||
<ClCompile>
|
||||
<PreprocessorDefinitions>NDEBUG;_CONSOLE;%(PreprocessorDefinitions)</PreprocessorDefinitions>
|
||||
<ConformanceMode>true</ConformanceMode>
|
||||
<AdditionalIncludeDirectories>$(SolutionDir)tests\stress;$(SolutionDir)libs\api_common;$(SolutionDir)include;$(SolutionDir)libs\api;$(SolutionDir)libs\ebpfnetsh;$(SolutionDir)tests\libs\util;$(SolutionDir)tests\libs\common;$(OutDir);$(SolutionDir)external\ebpf-verifier\src;$(SolutionDir)libs\service;$(SolutionDir)rpc_interface;$(SolutionDir)libs\runtime;$(SolutionDir)libs\runtime\user;$(SolutionDir)libs\shared;$(SolutionDir)libs\shared\user;$(SolutionDir)external\usersim\cxplat\inc;$(SolutionDir)external\usersim\cxplat\inc\winuser;$(SolutionDir)external\usersim\inc;$(SolutionDir)libs\execution_context;$(SolutionDir)tests\end_to_end;$(SolutionDir)tests\sample;$(SolutionDir)tests\sample\ext\inc;$(SolutionDir)\tests\xdp;$(SolutionDir)tools\export_program_info;$(SolutionDir)libs\thunk;$(SolutionDir)libs\thunk\mock;$(SolutionDir)\netebpfext;$(SolutionDir)external\catch2\src;$(SolutionDir)external\catch2\build\generated-includes;$(SolutionDir)external\bpftool;$(SolutionDir)include\user;$(SolutionDir)undocked\tests\sample\ext\inc;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
|
||||
<AdditionalIncludeDirectories>$(SolutionDir)tests\stress;$(SolutionDir)libs\api_common;$(SolutionDir)include;$(SolutionDir)libs\api;$(SolutionDir)libs\ebpfnetsh;$(SolutionDir)tests\libs\util;$(SolutionDir)tests\libs\common;$(OutDir);$(SolutionDir)external\ebpf-verifier\src;$(SolutionDir)external\ebpf-verifier\build\_deps\gsl-src\include;$(SolutionDir)libs\service;$(SolutionDir)rpc_interface;$(SolutionDir)libs\runtime;$(SolutionDir)libs\runtime\user;$(SolutionDir)libs\shared;$(SolutionDir)libs\shared\user;$(SolutionDir)external\usersim\cxplat\inc;$(SolutionDir)external\usersim\cxplat\inc\winuser;$(SolutionDir)external\usersim\inc;$(SolutionDir)libs\execution_context;$(SolutionDir)tests\end_to_end;$(SolutionDir)tests\sample;$(SolutionDir)tests\sample\ext\inc;$(SolutionDir)\tests\xdp;$(SolutionDir)tools\export_program_info;$(SolutionDir)libs\thunk;$(SolutionDir)libs\thunk\mock;$(SolutionDir)\netebpfext;$(SolutionDir)external\catch2\src;$(SolutionDir)external\catch2\build\generated-includes;$(SolutionDir)external\bpftool;$(SolutionDir)include\user;$(SolutionDir)undocked\tests\sample\ext\inc;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
|
||||
</ClCompile>
|
||||
<Link>
|
||||
<SubSystem>Console</SubSystem>
|
||||
|
@ -109,7 +109,7 @@
|
|||
<ClCompile>
|
||||
<PreprocessorDefinitions>NDEBUG;_CONSOLE;%(PreprocessorDefinitions)</PreprocessorDefinitions>
|
||||
<ConformanceMode>true</ConformanceMode>
|
||||
<AdditionalIncludeDirectories>$(SolutionDir)tests\stress;$(SolutionDir)libs\api_common;$(SolutionDir)include;$(SolutionDir)libs\api;$(SolutionDir)libs\ebpfnetsh;$(SolutionDir)tests\libs\util;$(SolutionDir)tests\libs\common;$(OutDir);$(SolutionDir)external\ebpf-verifier\src;$(SolutionDir)libs\service;$(SolutionDir)rpc_interface;$(SolutionDir)libs\runtime;$(SolutionDir)libs\runtime\user;$(SolutionDir)libs\shared;$(SolutionDir)libs\shared\user;$(SolutionDir)external\usersim\cxplat\inc;$(SolutionDir)external\usersim\cxplat\inc\winuser;$(SolutionDir)external\usersim\inc;$(SolutionDir)libs\execution_context;$(SolutionDir)tests\end_to_end;$(SolutionDir)tests\sample;$(SolutionDir)tests\sample\ext\inc;$(SolutionDir)\tests\xdp;$(SolutionDir)tools\export_program_info;$(SolutionDir)libs\thunk;$(SolutionDir)libs\thunk\mock;$(SolutionDir)\netebpfext;$(SolutionDir)external\catch2\src;$(SolutionDir)external\catch2\build\generated-includes;$(SolutionDir)external\bpftool;$(SolutionDir)include\user;$(SolutionDir)undocked\tests\sample\ext\inc;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
|
||||
<AdditionalIncludeDirectories>$(SolutionDir)tests\stress;$(SolutionDir)libs\api_common;$(SolutionDir)include;$(SolutionDir)libs\api;$(SolutionDir)libs\ebpfnetsh;$(SolutionDir)tests\libs\util;$(SolutionDir)tests\libs\common;$(OutDir);$(SolutionDir)external\ebpf-verifier\src;$(SolutionDir)external\ebpf-verifier\build\_deps\gsl-src\include;$(SolutionDir)libs\service;$(SolutionDir)rpc_interface;$(SolutionDir)libs\runtime;$(SolutionDir)libs\runtime\user;$(SolutionDir)libs\shared;$(SolutionDir)libs\shared\user;$(SolutionDir)external\usersim\cxplat\inc;$(SolutionDir)external\usersim\cxplat\inc\winuser;$(SolutionDir)external\usersim\inc;$(SolutionDir)libs\execution_context;$(SolutionDir)tests\end_to_end;$(SolutionDir)tests\sample;$(SolutionDir)tests\sample\ext\inc;$(SolutionDir)\tests\xdp;$(SolutionDir)tools\export_program_info;$(SolutionDir)libs\thunk;$(SolutionDir)libs\thunk\mock;$(SolutionDir)\netebpfext;$(SolutionDir)external\catch2\src;$(SolutionDir)external\catch2\build\generated-includes;$(SolutionDir)external\bpftool;$(SolutionDir)include\user;$(SolutionDir)undocked\tests\sample\ext\inc;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
|
||||
</ClCompile>
|
||||
<Link>
|
||||
<SubSystem>Console</SubSystem>
|
||||
|
@ -188,4 +188,4 @@
|
|||
<ClInclude Include="..\ebpf_mt_stress.h" />
|
||||
</ItemGroup>
|
||||
<Import Project="$(VCTargetsPath)\Microsoft.Cpp.targets" />
|
||||
</Project>
|
||||
</Project>
|
Загрузка…
Ссылка в новой задаче