/* This file was automatically generated by seccomp.sh */

#include <stddef.h>
#include <linux/audit.h>
#include <linux/filter.h>
#include <linux/seccomp.h>

#ifndef AUDIT_ARCH_PPC64LE
#define AUDIT_ARCH_PPC64LE (AUDIT_ARCH_PPC64 | __AUDIT_ARCH_LE)
#endif

struct sock_filter filter_pesto[] = {
	/* cppcheck-suppress [badBitmaskCheck, unmatchedSuppression] */
	BPF_STMT(BPF_LD | BPF_W | BPF_ABS,
		 (offsetof(struct seccomp_data, arch))),
	BPF_JUMP(BPF_JMP | BPF_JEQ | BPF_K, AUDIT_ARCH_X86_64, 0, 20),
	/* cppcheck-suppress [badBitmaskCheck, unmatchedSuppression] */
	BPF_STMT(BPF_LD | BPF_W | BPF_ABS,
		 (offsetof(struct seccomp_data, nr))),
	BPF_JUMP(BPF_JMP | BPF_JGE | BPF_K, 0, 1, 0),
	BPF_JUMP(BPF_JMP | BPF_JGE | BPF_K, 0, 4, 1),
	BPF_JUMP(BPF_JMP | BPF_JGE | BPF_K, 41, 11, 7),
	BPF_JUMP(BPF_JMP | BPF_JEQ | BPF_K, 0, 16, 0), /* read */
	BPF_JUMP(BPF_JMP | BPF_JEQ | BPF_K, 0, 15, 0), /* read */
	BPF_JUMP(BPF_JMP | BPF_JEQ | BPF_K, 0, 14, 0), /* read */
	BPF_JUMP(BPF_JMP | BPF_JEQ | BPF_K, 0, 13, 0), /* read */
	BPF_JUMP(BPF_JMP | BPF_JEQ | BPF_K, 0, 12, 0), /* read */
	BPF_JUMP(BPF_JMP | BPF_JEQ | BPF_K, 0, 11, 0), /* read */
	BPF_JUMP(BPF_JMP | BPF_JEQ | BPF_K, 0, 10, 0), /* read */
	BPF_JUMP(BPF_JMP | BPF_JEQ | BPF_K, 0, 9, 0), /* read */
	BPF_JUMP(BPF_JMP | BPF_JEQ | BPF_K, 1, 8, 0), /* write */
	BPF_JUMP(BPF_JMP | BPF_JEQ | BPF_K, 3, 7, 0), /* close */
	BPF_JUMP(BPF_JMP | BPF_JEQ | BPF_K, 5, 6, 0), /* fstat */
	BPF_JUMP(BPF_JMP | BPF_JEQ | BPF_K, 41, 5, 0), /* socket */
	BPF_JUMP(BPF_JMP | BPF_JEQ | BPF_K, 42, 4, 0), /* connect */
	BPF_JUMP(BPF_JMP | BPF_JEQ | BPF_K, 48, 3, 0), /* shutdown */
	BPF_JUMP(BPF_JMP | BPF_JEQ | BPF_K, 231, 2, 0), /* exit_group */
	BPF_JUMP(BPF_JMP | BPF_JEQ | BPF_K, 257, 1, 0), /* openat */
	BPF_STMT(BPF_RET | BPF_K, SECCOMP_RET_KILL_PROCESS),
	BPF_STMT(BPF_RET | BPF_K, SECCOMP_RET_ALLOW),
};
