Linux kernel mirror (for testing)
git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel
os
linux
1// SPDX-License-Identifier: GPL-2.0
2/* Copyright (c) 2023 Meta Platforms, Inc. and affiliates. */
3
4#include <vmlinux.h>
5#include <bpf/bpf_tracing.h>
6#include <bpf/bpf_helpers.h>
7#include "bpf_misc.h"
8
9#include "nested_trust_common.h"
10
11char _license[] SEC("license") = "GPL";
12
13SEC("tp_btf/task_newtask")
14__success
15int BPF_PROG(test_read_cpumask, struct task_struct *task, u64 clone_flags)
16{
17 bpf_cpumask_test_cpu(0, task->cpus_ptr);
18 return 0;
19}