The branch main has been updated by wulf: URL: https://cgit.FreeBSD.org/src/commit/?id=06902a447934e855dc8f7eaf95b4235c684b264d
commit 06902a447934e855dc8f7eaf95b4235c684b264d Author: Vladimir Kondratyev <w...@freebsd.org> AuthorDate: 2024-04-08 06:47:42 +0000 Commit: Vladimir Kondratyev <w...@freebsd.org> CommitDate: 2024-04-08 06:47:42 +0000 LinuxKPI: Add vm_flags_(clear|set) functions Sponsored by: Serenity Cyber Security, LLC Reviewed by: emaste MFC after: 1 week --- sys/compat/linuxkpi/common/include/linux/mm.h | 12 ++++++++++++ 1 file changed, 12 insertions(+) diff --git a/sys/compat/linuxkpi/common/include/linux/mm.h b/sys/compat/linuxkpi/common/include/linux/mm.h index 1a7bae27fa8b..0030cc6fb7a9 100644 --- a/sys/compat/linuxkpi/common/include/linux/mm.h +++ b/sys/compat/linuxkpi/common/include/linux/mm.h @@ -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) {