Loading...
Note: File does not exist in v6.8.
1// SPDX-License-Identifier: GPL-2.0
2/* Copyright (c) 2024 Meta Platforms, Inc. and affiliates. */
3
4#include "vmlinux.h"
5#include <bpf/bpf_helpers.h>
6
7struct bpf_stack_build_id stack_sleepable[128];
8int res_sleepable;
9
10struct bpf_stack_build_id stack_nofault[128];
11int res_nofault;
12
13SEC("uprobe.multi/./uprobe_multi:uprobe")
14int uprobe_nofault(struct pt_regs *ctx)
15{
16 res_nofault = bpf_get_stack(ctx, stack_nofault, sizeof(stack_nofault),
17 BPF_F_USER_STACK | BPF_F_USER_BUILD_ID);
18
19 return 0;
20}
21
22SEC("uprobe.multi.s/./uprobe_multi:uprobe")
23int uprobe_sleepable(struct pt_regs *ctx)
24{
25 res_sleepable = bpf_get_stack(ctx, stack_sleepable, sizeof(stack_sleepable),
26 BPF_F_USER_STACK | BPF_F_USER_BUILD_ID);
27
28 return 0;
29}
30
31char _license[] SEC("license") = "GPL";