Skip site navigation (1)Skip section navigation (2)
Date:      Thu, 1 Aug 2024 22:27:25 GMT
From:      Vladimir Kondratyev <wulf@FreeBSD.org>
To:        src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org
Subject:   git: b4fb139e286b - stable/14 - LinuxKPI: Add vm_flags_(clear|set) functions
Message-ID:  <202408012227.471MRPnu027003@gitrepo.freebsd.org>

next in thread | raw e-mail | index | archive | help
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)
 {



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?202408012227.471MRPnu027003>