Welcome to mirror list, hosted at ThFree Co, Russian Federation.

test_link_pinning.c « progs « bpf « selftests « testing « tools - github.com/torvalds/linux.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
blob: bbf2a5264dc08b867be5bde94d5875d961f4ca1b (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
// SPDX-License-Identifier: GPL-2.0
/* Copyright (c) 2020 Facebook */

#include <stdbool.h>
#include <linux/bpf.h>
#include <bpf/bpf_helpers.h>

int in = 0;
int out = 0;

SEC("raw_tp/sys_enter")
int raw_tp_prog(const void *ctx)
{
	out = in;
	return 0;
}

SEC("tp_btf/sys_enter")
int tp_btf_prog(const void *ctx)
{
	out = in;
	return 0;
}

char _license[] SEC("license") = "GPL";