// SPDX-License-Identifier: GPL-2.0 /* * Seccomp BPF helper functions * * Copyright (c) 2012 The Chromium OS Authors <[email protected]> * Author: Will Drewry <[email protected]> * * The code may be used by anyone for any purpose, * and can serve as a starting point for developing * applications using prctl(PR_ATTACH_SECCOMP_FILTER). */ #include <stdio.h> #include <stdlib.h> #include <string.h> #include "bpf-helper.h" int bpf_resolve_jumps(struct bpf_labels *labels, struct sock_filter *filter, size_t count) { … } /* Simple lookup table for labels. */ __u32 seccomp_bpf_label(struct bpf_labels *labels, const char *label) { … } void seccomp_bpf_print(struct sock_filter *filter, size_t count) { … }