JustOS/linux-6.13/tools/testing/selftests/bpf/progs/uptr_map_failure.c
justuser 02e73b8cd9 up
2025-01-24 17:00:19 +03:00

28 lines
711 B
C

// SPDX-License-Identifier: GPL-2.0
/* Copyright (c) 2024 Meta Platforms, Inc. and affiliates. */
#include <vmlinux.h>
#include <bpf/bpf_helpers.h>
#include "uptr_test_common.h"
struct {
__uint(type, BPF_MAP_TYPE_TASK_STORAGE);
__uint(map_flags, BPF_F_NO_PREALLOC);
__type(key, int);
__type(value, struct large_uptr);
} large_uptr_map SEC(".maps");
struct {
__uint(type, BPF_MAP_TYPE_TASK_STORAGE);
__uint(map_flags, BPF_F_NO_PREALLOC);
__type(key, int);
__type(value, struct empty_uptr);
} empty_uptr_map SEC(".maps");
struct {
__uint(type, BPF_MAP_TYPE_TASK_STORAGE);
__uint(map_flags, BPF_F_NO_PREALLOC);
__type(key, int);
__type(value, struct kstruct_uptr);
} kstruct_uptr_map SEC(".maps");