LinuxKPI: Add vm_flags_(clear|set) functions

Sponsored by:	Serenity Cyber Security, LLC
Reviewed by:	emaste
MFC after:	1 week
This commit is contained in:
Vladimir Kondratyev 2024-04-08 09:47:42 +03:00
parent 61fb195e8d
commit 06902a4479

View file

@ -324,6 +324,18 @@ vm_get_page_prot(unsigned long vm_flags)
return (vm_flags & VM_PROT_ALL);
}
static inline void
vm_flags_set(struct vm_area_struct *vma, unsigned long flags)
{
vma->vm_flags |= flags;
}
static inline void
vm_flags_clear(struct vm_area_struct *vma, unsigned long flags)
{
vma->vm_flags &= ~flags;
}
static inline struct page *
vmalloc_to_page(const void *addr)
{