File Index
Files and directories
Sign in
FILE

bpf_test_utils.h

File preview with syntax highlighting.

linux-6.19.14/tools/testing/selftests/bpf/progs/bpf_test_utils.h C
 1/* SPDX-License-Identifier: GPL-2.0 */
 2#ifndef __BPF_TEST_UTILS_H__
 3#define __BPF_TEST_UTILS_H__
 4
 5#include <bpf/bpf_helpers.h>
 6#include "bpf_misc.h"
 7
 8/* Clobber as many native registers and stack slots as possible. */
 9static __always_inline void clobber_regs_stack(void)
10{
11	char tmp_str[] = "123456789";
12	unsigned long tmp;
13
14	bpf_strtoul(tmp_str, sizeof(tmp_str), 0, &tmp);
15	__sink(tmp);
16}
17
18#endif
~/ Read-only file preview.