git: b4fb139e286b - stable/14 - LinuxKPI: Add vm_flags_(clear|set) functions
- Go to: [ bottom of page ] [ top of archives ] [ this month ]
Date: Thu, 01 Aug 2024 22:27:25 UTC
The branch stable/14 has been updated by wulf: URL: https://cgit.FreeBSD.org/src/commit/?id=b4fb139e286baf742095716e8dabcbc3553eccb4 commit b4fb139e286baf742095716e8dabcbc3553eccb4 Author: Vladimir Kondratyev <wulf@FreeBSD.org> AuthorDate: 2024-04-08 06:47:42 +0000 Commit: Vladimir Kondratyev <wulf@FreeBSD.org> CommitDate: 2024-08-01 21:09:38 +0000 LinuxKPI: Add vm_flags_(clear|set) functions Sponsored by: Serenity Cyber Security, LLC Reviewed by: emaste MFC after: 1 week (cherry picked from commit 06902a447934e855dc8f7eaf95b4235c684b264d) --- 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) {