diff options
Diffstat (limited to 'include/linux/mm.h')
-rw-r--r-- | include/linux/mm.h | 25 |
1 files changed, 11 insertions, 14 deletions
diff --git a/include/linux/mm.h b/include/linux/mm.h index e9caec6a51e9..a92c8d73aeaf 100644 --- a/include/linux/mm.h +++ b/include/linux/mm.h | |||
@@ -1266,29 +1266,25 @@ static inline int fixup_user_fault(struct task_struct *tsk, | |||
1266 | } | 1266 | } |
1267 | #endif | 1267 | #endif |
1268 | 1268 | ||
1269 | extern int access_process_vm(struct task_struct *tsk, unsigned long addr, void *buf, int len, int write); | 1269 | extern int access_process_vm(struct task_struct *tsk, unsigned long addr, void *buf, int len, |
1270 | unsigned int gup_flags); | ||
1270 | extern int access_remote_vm(struct mm_struct *mm, unsigned long addr, | 1271 | extern int access_remote_vm(struct mm_struct *mm, unsigned long addr, |
1271 | void *buf, int len, int write); | 1272 | void *buf, int len, unsigned int gup_flags); |
1272 | 1273 | ||
1273 | long __get_user_pages(struct task_struct *tsk, struct mm_struct *mm, | ||
1274 | unsigned long start, unsigned long nr_pages, | ||
1275 | unsigned int foll_flags, struct page **pages, | ||
1276 | struct vm_area_struct **vmas, int *nonblocking); | ||
1277 | long get_user_pages_remote(struct task_struct *tsk, struct mm_struct *mm, | 1274 | long get_user_pages_remote(struct task_struct *tsk, struct mm_struct *mm, |
1278 | unsigned long start, unsigned long nr_pages, | 1275 | unsigned long start, unsigned long nr_pages, |
1279 | int write, int force, struct page **pages, | 1276 | unsigned int gup_flags, struct page **pages, |
1280 | struct vm_area_struct **vmas); | 1277 | struct vm_area_struct **vmas); |
1281 | long get_user_pages(unsigned long start, unsigned long nr_pages, | 1278 | long get_user_pages(unsigned long start, unsigned long nr_pages, |
1282 | int write, int force, struct page **pages, | 1279 | unsigned int gup_flags, struct page **pages, |
1283 | struct vm_area_struct **vmas); | 1280 | struct vm_area_struct **vmas); |
1284 | long get_user_pages_locked(unsigned long start, unsigned long nr_pages, | 1281 | long get_user_pages_locked(unsigned long start, unsigned long nr_pages, |
1285 | int write, int force, struct page **pages, int *locked); | 1282 | unsigned int gup_flags, struct page **pages, int *locked); |
1286 | long __get_user_pages_unlocked(struct task_struct *tsk, struct mm_struct *mm, | 1283 | long __get_user_pages_unlocked(struct task_struct *tsk, struct mm_struct *mm, |
1287 | unsigned long start, unsigned long nr_pages, | 1284 | unsigned long start, unsigned long nr_pages, |
1288 | int write, int force, struct page **pages, | 1285 | struct page **pages, unsigned int gup_flags); |
1289 | unsigned int gup_flags); | ||
1290 | long get_user_pages_unlocked(unsigned long start, unsigned long nr_pages, | 1286 | long get_user_pages_unlocked(unsigned long start, unsigned long nr_pages, |
1291 | int write, int force, struct page **pages); | 1287 | struct page **pages, unsigned int gup_flags); |
1292 | int get_user_pages_fast(unsigned long start, int nr_pages, int write, | 1288 | int get_user_pages_fast(unsigned long start, int nr_pages, int write, |
1293 | struct page **pages); | 1289 | struct page **pages); |
1294 | 1290 | ||
@@ -1306,7 +1302,7 @@ struct frame_vector { | |||
1306 | struct frame_vector *frame_vector_create(unsigned int nr_frames); | 1302 | struct frame_vector *frame_vector_create(unsigned int nr_frames); |
1307 | void frame_vector_destroy(struct frame_vector *vec); | 1303 | void frame_vector_destroy(struct frame_vector *vec); |
1308 | int get_vaddr_frames(unsigned long start, unsigned int nr_pfns, | 1304 | int get_vaddr_frames(unsigned long start, unsigned int nr_pfns, |
1309 | bool write, bool force, struct frame_vector *vec); | 1305 | unsigned int gup_flags, struct frame_vector *vec); |
1310 | void put_vaddr_frames(struct frame_vector *vec); | 1306 | void put_vaddr_frames(struct frame_vector *vec); |
1311 | int frame_vector_to_pages(struct frame_vector *vec); | 1307 | int frame_vector_to_pages(struct frame_vector *vec); |
1312 | void frame_vector_to_pfns(struct frame_vector *vec); | 1308 | void frame_vector_to_pfns(struct frame_vector *vec); |
@@ -1391,7 +1387,7 @@ static inline int stack_guard_page_end(struct vm_area_struct *vma, | |||
1391 | !vma_growsup(vma->vm_next, addr); | 1387 | !vma_growsup(vma->vm_next, addr); |
1392 | } | 1388 | } |
1393 | 1389 | ||
1394 | int vma_is_stack_for_task(struct vm_area_struct *vma, struct task_struct *t); | 1390 | int vma_is_stack_for_current(struct vm_area_struct *vma); |
1395 | 1391 | ||
1396 | extern unsigned long move_page_tables(struct vm_area_struct *vma, | 1392 | extern unsigned long move_page_tables(struct vm_area_struct *vma, |
1397 | unsigned long old_addr, struct vm_area_struct *new_vma, | 1393 | unsigned long old_addr, struct vm_area_struct *new_vma, |
@@ -2232,6 +2228,7 @@ static inline struct page *follow_page(struct vm_area_struct *vma, | |||
2232 | #define FOLL_TRIED 0x800 /* a retry, previous pass started an IO */ | 2228 | #define FOLL_TRIED 0x800 /* a retry, previous pass started an IO */ |
2233 | #define FOLL_MLOCK 0x1000 /* lock present pages */ | 2229 | #define FOLL_MLOCK 0x1000 /* lock present pages */ |
2234 | #define FOLL_REMOTE 0x2000 /* we are working on non-current tsk/mm */ | 2230 | #define FOLL_REMOTE 0x2000 /* we are working on non-current tsk/mm */ |
2231 | #define FOLL_COW 0x4000 /* internal GUP flag */ | ||
2235 | 2232 | ||
2236 | typedef int (*pte_fn_t)(pte_t *pte, pgtable_t token, unsigned long addr, | 2233 | typedef int (*pte_fn_t)(pte_t *pte, pgtable_t token, unsigned long addr, |
2237 | void *data); | 2234 | void *data); |