vm_util.h
imports <linux/fs.h>C declares a character or byte buffer
SHA-256a4ebc192c805a1bd74c30952dd6188edf090f41ead35265f7cd8ac83d82b5f4d
MaleculeH(Db)Md(In)
Evidence
1/* SPDX-License-Identifier: GPL-2.0 */
2#include <stdint.h>
3#include <stdbool.h>
4#include <sys/mman.h>
5#include <err.h>
6#include <stdarg.h>
7#include <strings.h> /* ffsl() */
8#include <unistd.h> /* _SC_PAGESIZE */
9#include "kselftest.h"
10#include <linux/fs.h>
11
12#define BIT_ULL(nr) (1ULL << (nr))
13#define PM_SOFT_DIRTY BIT_ULL(55)
14#define PM_MMAP_EXCLUSI …
24:16… BIT_ULL(22)
25/*
26 * Ignore the checkpatch warning, we must read from x but don't want to do
27 * anything with it in order to trigger a read page fault. We therefore must use
28 * volatile to stop the compiler from optimising this away.
29 */
30#define FORCE_READ(x) (*(const volatile typeof(x) *)&(x))
31
32extern unsigned int __page …
33:16… int __page_shift;
34
35/*
36 * Represents an open fd and PROCMAP_QUERY state for binary (via ioctl)
37 * /proc/$pid/[s]maps lookup.
38 */
39struct procmap_fd {
40 int fd;
41 struct procm …
73:11… , tests should just detect filesystems known to have such issues and
74 * bail early. But 9pfs has the additional "feature" that it causes fstatfs to
75 * pass through the f_type field from the host filesystem. To avoid having …
⋯6 lines
124
125/* These helpers need to be inline to match the kselftest.h idiom. */
126static char test_name[1024];
127
128static inline void log_test_start(const char *name, ...)
⋯5 lines