| 1 |
|
| 2 | |
| 3 | * This file is subject to the terms and conditions of the GNU General Public
|
| 4 | * License. See the file "COPYING" in the main directory of this archive
|
| 5 | * for more details.
|
| 6 | *
|
| 7 | * Copyright (C) 1995, 1999, 2002 by Ralf Baechle
|
| 8 |
|
| 9 | #ifndef _ASM_MMAN_H
|
| 10 | #define _ASM_MMAN_H
|
| 11 |
|
| 12 | |
| 13 | * Protections are chosen from these bits, OR'd together. The
|
| 14 | * implementation does not necessarily support PROT_EXEC or PROT_WRITE
|
| 15 | * without PROT_READ. The only guarantees are that no writing will be
|
| 16 | * allowed without PROT_WRITE and no access will be allowed for PROT_NONE.
|
| 17 |
|
| 18 | #define PROT_NONE 0x00
|
| 19 | #define PROT_READ 0x01
|
| 20 | #define PROT_WRITE 0x02
|
| 21 | #define PROT_EXEC 0x04
|
| 22 |
|
| 23 | #define PROT_SEM 0x10
|
| 24 | #define PROT_GROWSDOWN 0x01000000
|
| 25 | #define PROT_GROWSUP 0x02000000
|
| 26 |
|
| 27 | |
| 28 | * Flags for mmap
|
| 29 |
|
| 30 |
|
| 31 | #define MAP_TYPE 0x00f
|
| 32 | #define MAP_FIXED 0x010
|
| 33 |
|
| 34 |
|
| 35 | #define MAP_RENAME 0x020
|
| 36 | #define MAP_AUTOGROW 0x040
|
| 37 | #define MAP_LOCAL 0x080
|
| 38 | #define MAP_AUTORSRV 0x100
|
| 39 |
|
| 40 |
|
| 41 | #define MAP_NORESERVE 0x0400
|
| 42 | #define MAP_ANONYMOUS 0x0800
|
| 43 | #define MAP_GROWSDOWN 0x1000
|
| 44 | #define MAP_DENYWRITE 0x2000
|
| 45 | #define MAP_EXECUTABLE 0x4000
|
| 46 | #define MAP_LOCKED 0x8000
|
| 47 | #define MAP_POPULATE 0x10000
|
| 48 | #define MAP_NONBLOCK 0x20000
|
| 49 | #define MAP_STACK 0x40000
|
| 50 | #define MAP_HUGETLB 0x80000
|
| 51 | #define MAP_FIXED_NOREPLACE 0x100000
|
| 52 |
|
| 53 | |
| 54 | * Flags for msync
|
| 55 |
|
| 56 | #define MS_ASYNC 0x0001
|
| 57 | #define MS_INVALIDATE 0x0002
|
| 58 | #define MS_SYNC 0x0004
|
| 59 |
|
| 60 | |
| 61 | * Flags for mlockall
|
| 62 |
|
| 63 | #define MCL_CURRENT 1
|
| 64 | #define MCL_FUTURE 2
|
| 65 | #define MCL_ONFAULT 4
|
| 66 |
|
| 67 | |
| 68 | * Flags for mlock
|
| 69 |
|
| 70 | #define MLOCK_ONFAULT 0x01
|
| 71 |
|
| 72 | #define MADV_NORMAL 0
|
| 73 | #define MADV_RANDOM 1
|
| 74 | #define MADV_SEQUENTIAL 2
|
| 75 | #define MADV_WILLNEED 3
|
| 76 | #define MADV_DONTNEED 4
|
| 77 |
|
| 78 |
|
| 79 | #define MADV_FREE 8
|
| 80 | #define MADV_REMOVE 9
|
| 81 | #define MADV_DONTFORK 10
|
| 82 | #define MADV_DOFORK 11
|
| 83 |
|
| 84 | #define MADV_MERGEABLE 12
|
| 85 | #define MADV_UNMERGEABLE 13
|
| 86 | #define MADV_HWPOISON 100
|
| 87 |
|
| 88 | #define MADV_HUGEPAGE 14
|
| 89 | #define MADV_NOHUGEPAGE 15
|
| 90 |
|
| 91 | #define MADV_DONTDUMP 16 |
| 92 | overrides the coredump filter bits
|
| 93 | #define MADV_DODUMP 17
|
| 94 |
|
| 95 | #define MADV_WIPEONFORK 18
|
| 96 | #define MADV_KEEPONFORK 19
|
| 97 |
|
| 98 | #define MADV_COLD 20
|
| 99 | #define MADV_PAGEOUT 21
|
| 100 |
|
| 101 | #define MADV_POPULATE_READ 22
|
| 102 | #define MADV_POPULATE_WRITE 23
|
| 103 |
|
| 104 | #define MADV_DONTNEED_LOCKED 24
|
| 105 |
|
| 106 | #define MADV_COLLAPSE 25
|
| 107 |
|
| 108 | #define MADV_GUARD_INSTALL 102
|
| 109 | #define MADV_GUARD_REMOVE 103
|
| 110 |
|
| 111 |
|
| 112 | #define MAP_FILE 0
|
| 113 |
|
| 114 | #define PKEY_DISABLE_ACCESS 0x1
|
| 115 | #define PKEY_DISABLE_WRITE 0x2
|
| 116 | #define PKEY_ACCESS_MASK (PKEY_DISABLE_ACCESS |\
|
| 117 | PKEY_DISABLE_WRITE)
|
| 118 |
|
| 119 | #endif
|