# Copyright 2023 syzkaller project authors. All rights reserved. # Use of this source code is governed by Apache 2 LICENSE that can be found in the LICENSE file. include resource fd_pagemap[fd] syz_open_procfs$pagemap(pid pid, file ptr[in, string["pagemap"]]) fd_pagemap ioctl$PAGEMAP_SCAN(fd fd_pagemap, cmd const[PAGEMAP_SCAN], arg ptr[inout, pagemap_arg]) page_region { start int64 end int64 categories int64 } pagemap_arg { size bytesize[pagemap_arg, int64] flags flags[pm_flags, int64] start vma64 end vma64 walk_end int64 vec ptr64[in, array[page_region]] vec_len len[vec, int64] max_pages int64 category_inverted flags[categories, int64] category_mask flags[categories, int64] category_anyof_mask flags[categories, int64] return_mask flags[categories, int64] } pm_flags = PM_SCAN_WP_MATCHING, PM_SCAN_CHECK_WPASYNC categories = PAGE_IS_WPALLOWED, PAGE_IS_WRITTEN, PAGE_IS_FILE, PAGE_IS_PRESENT, PAGE_IS_SWAPPED, PAGE_IS_PFNZERO, PAGE_IS_HUGE