aboutsummaryrefslogtreecommitdiff
path: root/include/asm-generic/pgtable_uffd.h
blob: 828966d4c28115a0315ed9d19ab7a83269e5244a (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
#ifndef _ASM_GENERIC_PGTABLE_UFFD_H
#define _ASM_GENERIC_PGTABLE_UFFD_H

#ifndef CONFIG_HAVE_ARCH_USERFAULTFD_WP
static __always_inline int pte_uffd_wp(pte_t pte)
{
	return 0;
}

static __always_inline int pmd_uffd_wp(pmd_t pmd)
{
	return 0;
}

static __always_inline pte_t pte_mkuffd_wp(pte_t pte)
{
	return pte;
}

static __always_inline pmd_t pmd_mkuffd_wp(pmd_t pmd)
{
	return pmd;
}

static __always_inline pte_t pte_clear_uffd_wp(pte_t pte)
{
	return pte;
}

static __always_inline pmd_t pmd_clear_uffd_wp(pmd_t pmd)
{
	return pmd;
}

static __always_inline pte_t pte_swp_mkuffd_wp(pte_t pte)
{
	return pte;
}

static __always_inline int pte_swp_uffd_wp(pte_t pte)
{
	return 0;
}

static __always_inline pte_t pte_swp_clear_uffd_wp(pte_t pte)
{
	return pte;
}

static inline pmd_t pmd_swp_mkuffd_wp(pmd_t pmd)
{
	return pmd;
}

static inline int pmd_swp_uffd_wp(pmd_t pmd)
{
	return 0;
}

static inline pmd_t pmd_swp_clear_uffd_wp(pmd_t pmd)
{
	return pmd;
}
#endif /* CONFIG_HAVE_ARCH_USERFAULTFD_WP */

#endif /* _ASM_GENERIC_PGTABLE_UFFD_H */