[<prev] [next>] [thread-next>] [day] [month] [year] [list]
Message-ID: <20240625233717.2769975-1-yang@os.amperecomputing.com>
Date: Tue, 25 Jun 2024 16:37:17 -0700
From: Yang Shi <yang@...amperecomputing.com>
To: muchun.song@...ux.dev,
catalin.marinas@....com,
will@...nel.org,
akpm@...ux-foundation.org
Cc: yang@...amperecomputing.com,
linux-mm@...ck.org,
linux-arm-kernel@...ts.infradead.org,
linux-kernel@...r.kernel.org
Subject: [PATCH] hugetlbfs: add MTE support
MTE can be supported on ram based filesystem. It is supported on tmpfs.
There is use case to use MTE on hugetlbfs as well, adding MTE support.
Signed-off-by: Yang Shi <yang@...amperecomputing.com>
---
fs/hugetlbfs/inode.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/fs/hugetlbfs/inode.c b/fs/hugetlbfs/inode.c
index ecad73a4f713..c34faef62daf 100644
--- a/fs/hugetlbfs/inode.c
+++ b/fs/hugetlbfs/inode.c
@@ -110,7 +110,7 @@ static int hugetlbfs_file_mmap(struct file *file, struct vm_area_struct *vma)
* way when do_mmap unwinds (may be important on powerpc
* and ia64).
*/
- vm_flags_set(vma, VM_HUGETLB | VM_DONTEXPAND);
+ vm_flags_set(vma, VM_HUGETLB | VM_DONTEXPAND | VM_MTE_ALLOWED);
vma->vm_ops = &hugetlb_vm_ops;
ret = seal_check_write(info->seals, vma);
--
2.41.0
Powered by blists - more mailing lists