diff --git a/kernel/tools/cpupowertools/files/patches/aufs6/aufs6-loopback.patch b/kernel/tools/cpupowertools/files/patches/aufs6/aufs6-loopback.patch index 82c527f1..0c0674f4 100644 --- a/kernel/tools/cpupowertools/files/patches/aufs6/aufs6-loopback.patch +++ b/kernel/tools/cpupowertools/files/patches/aufs6/aufs6-loopback.patch @@ -147,10 +147,10 @@ index 479480f25a6c0..ba3477c30e294 100644 static int loop_clr_fd(struct loop_device *lo) diff --git a/fs/aufs/f_op.c b/fs/aufs/f_op.c -index db7e9fcf1056a..6d202136d29af 100644 +index cb5781e56e1e1..93e7a6a369d0a 100644 --- a/fs/aufs/f_op.c +++ b/fs/aufs/f_op.c -@@ -317,7 +317,7 @@ static ssize_t aufs_read_iter(struct kiocb *kio, struct iov_iter *iov_iter) +@@ -326,7 +326,7 @@ static ssize_t aufs_read_iter(struct kiocb *kio, struct iov_iter *iov_iter) if (IS_ERR(h_file)) goto out; @@ -222,7 +222,7 @@ index 9c30cba527421..8161108d0f6d5 100644 /* ---------------------------------------------------------------------- */ diff --git a/include/linux/fs.h b/include/linux/fs.h -index 51b64b2ad82c4..8c3ff295b020b 100644 +index 0ecfff8ca9412..5f996878da9b6 100644 --- a/include/linux/fs.h +++ b/include/linux/fs.h @@ -2248,6 +2248,11 @@ struct super_operations { diff --git a/kernel/tools/cpupowertools/files/patches/aufs6/aufs6-mmap.patch b/kernel/tools/cpupowertools/files/patches/aufs6/aufs6-mmap.patch index 879079c9..e1d9ac10 100644 --- a/kernel/tools/cpupowertools/files/patches/aufs6/aufs6-mmap.patch +++ b/kernel/tools/cpupowertools/files/patches/aufs6/aufs6-mmap.patch @@ -1,452 +1,174 @@ SPDX-License-Identifier: GPL-2.0 aufs6.12 mmap patch +diff --git a/fs/Makefile b/fs/Makefile +index b2539712b80d0..8260694bb133a 100644 +--- a/fs/Makefile ++++ b/fs/Makefile +@@ -16,6 +16,9 @@ obj-y := open.o read_write.o file_table.o super.o \ + stack.o fs_struct.o statfs.o fs_pin.o nsfs.o \ + fs_types.o fs_context.o fs_parser.o fsopen.o init.o \ + kernel_read_file.o mnt_idmapping.o remap_range.o pidfs.o ++ifeq (${CONFIG_AUFS_FS},m) ++obj-y += au_mf.o ++endif + + obj-$(CONFIG_BUFFER_HEAD) += buffer.o mpage.o + obj-$(CONFIG_PROC_FS) += proc_namespace.o +diff --git a/fs/au_mf.c b/fs/au_mf.c +new file mode 100644 +index 0000000000000..ee1ff03778b98 +--- /dev/null ++++ b/fs/au_mf.c +@@ -0,0 +1,60 @@ ++// SPDX-License-Identifier: GPL-2.0 ++/* ++ * Copyright (C) 2025 Junjiro R. Okajima ++ */ ++ ++#include ++#include ++ ++#if IS_MODULE(CONFIG_AUFS_FS) ++/* ++ * This au_mf.c (aufs mmapped files) is for external AUFS module only, ++ * and statically linked to kernel. ++ * See also $srctree/fs/Makefile. ++ * This linking may seem to be tricky. It is due to support the case when AUFS ++ * is configured as an external module, eg. VFS calls a function defined in the ++ * dynamic module. ++ */ ++#else ++BUILD_BUG_ON_MSG(1, "CONFIG_AUFS_FS is disabled."); ++#endif ++ ++const struct path *au_file_user_path(struct file *f) ++{ ++ const struct path *path, ++ *(*func)(struct file *f), ++ *au_do_file_user_path(struct file *f); ++ ++ path = NULL; ++ func = symbol_get(au_do_file_user_path); ++ if (unlikely(!func)) ++ /* "aufs" module is not loaded */ ++ goto out; ++ ++ path = func(f); ++ symbol_put(au_do_file_user_path); ++ ++out: ++ return path; ++} ++EXPORT_SYMBOL_GPL(au_file_user_path); ++ ++const struct inode *au_file_user_inode(struct file *f) ++{ ++ const struct inode *inode, ++ *(*func)(struct file *f), ++ *au_do_file_user_inode(struct file *f); ++ ++ inode = NULL; ++ func = symbol_get(au_do_file_user_inode); ++ if (unlikely(!func)) ++ /* "aufs" module is not loaded */ ++ goto out; ++ ++ inode = func(f); ++ symbol_put(au_do_file_user_inode); ++ ++out: ++ return inode; ++} ++EXPORT_SYMBOL_GPL(au_file_user_inode); diff --git a/fs/proc/base.c b/fs/proc/base.c -index b31283d81c52e..644bd3d84cf76 100644 +index b31283d81c52e..d738243b88746 100644 --- a/fs/proc/base.c +++ b/fs/proc/base.c -@@ -2270,7 +2270,7 @@ static int map_files_get_link(struct dentry *dentry, struct path *path) - rc = -ENOENT; - vma = find_exact_vma(mm, vm_start, vm_end); - if (vma && vma->vm_file) { -- *path = *file_user_path(vma->vm_file); -+ *path = vma_pr_or_file(vma)->f_path; - path_get(path); - rc = 0; - } +@@ -1784,7 +1784,7 @@ static int proc_exe_link(struct dentry *dentry, struct path *exe_path) + exe_file = get_task_exe_file(task); + put_task_struct(task); + if (exe_file) { +- *exe_path = exe_file->f_path; ++ *exe_path = *file_user_path(exe_file); + path_get(&exe_file->f_path); + fput(exe_file); + return 0; diff --git a/fs/proc/nommu.c b/fs/proc/nommu.c -index c6e7ebc637562..d7ccfd9097646 100644 +index c6e7ebc637562..12c340dcdec3d 100644 --- a/fs/proc/nommu.c +++ b/fs/proc/nommu.c -@@ -39,7 +39,10 @@ static int nommu_region_show(struct seq_file *m, struct vm_region *region) +@@ -39,7 +39,7 @@ static int nommu_region_show(struct seq_file *m, struct vm_region *region) file = region->vm_file; if (file) { - struct inode *inode = file_inode(region->vm_file); -+ struct inode *inode; -+ -+ file = vmr_pr_or_file(region); -+ inode = file_inode(file); ++ struct inode *inode = file_user_inode(region->vm_file); dev = inode->i_sb->s_dev; ino = inode->i_ino; } -diff --git a/fs/proc/task_mmu.c b/fs/proc/task_mmu.c -index 7eb010de39fe2..0c576103f7f15 100644 ---- a/fs/proc/task_mmu.c -+++ b/fs/proc/task_mmu.c -@@ -264,7 +264,8 @@ static void get_vma_name(struct vm_area_struct *vma, - *name_fmt = "[anon_shmem:%s]"; - *name = anon_name->name; - } else { -- *path = file_user_path(vma->vm_file); -+ struct file *f = vma_pr_or_file(vma); -+ *path = file_user_path(f); - } - return; - } -@@ -333,7 +334,8 @@ show_map_vma(struct seq_file *m, struct vm_area_struct *vma) - dev_t dev = 0; - - if (vma->vm_file) { -- const struct inode *inode = file_user_inode(vma->vm_file); -+ const struct inode *inode -+ = file_inode(vma_pr_or_file(vma)); - - dev = inode->i_sb->s_dev; - ino = inode->i_ino; -@@ -3008,7 +3010,7 @@ static int show_numa_map(struct seq_file *m, void *v) - struct proc_maps_private *proc_priv = &numa_priv->proc_maps; - struct vm_area_struct *vma = v; - struct numa_maps *md = &numa_priv->md; -- struct file *file = vma->vm_file; -+ struct file *file = vma_pr_or_file(vma); - struct mm_struct *mm = vma->vm_mm; - char buffer[64]; - struct mempolicy *pol; diff --git a/fs/proc/task_nommu.c b/fs/proc/task_nommu.c -index bce6745330003..b12b5a75c799c 100644 +index bce6745330003..dac36cc7a3880 100644 --- a/fs/proc/task_nommu.c +++ b/fs/proc/task_nommu.c -@@ -137,7 +137,10 @@ static int nommu_vma_show(struct seq_file *m, struct vm_area_struct *vma) +@@ -137,7 +137,7 @@ static int nommu_vma_show(struct seq_file *m, struct vm_area_struct *vma) file = vma->vm_file; if (file) { - struct inode *inode = file_inode(vma->vm_file); -+ struct inode *inode; -+ -+ file = vma_pr_or_file(vma); -+ inode = file_inode(file); ++ struct inode *inode = file_user_inode(vma->vm_file); dev = inode->i_sb->s_dev; ino = inode->i_ino; pgoff = (loff_t)vma->vm_pgoff << PAGE_SHIFT; -diff --git a/include/linux/mm.h b/include/linux/mm.h -index 61fff5d34ed53..94b66987b4bb0 100644 ---- a/include/linux/mm.h -+++ b/include/linux/mm.h -@@ -2469,6 +2469,43 @@ static inline void unmap_shared_mapping_range(struct address_space *mapping, - static inline struct vm_area_struct *vma_lookup(struct mm_struct *mm, - unsigned long addr); +diff --git a/include/linux/fs.h b/include/linux/fs.h +index 51b64b2ad82c4..0ecfff8ca9412 100644 +--- a/include/linux/fs.h ++++ b/include/linux/fs.h +@@ -2734,6 +2734,21 @@ struct file *dentry_create(const struct path *path, int flags, umode_t mode, + const struct cred *cred); + struct path *backing_file_user_path(struct file *f); -+#if 1 /* IS_ENABLED(CONFIG_AUFS_FS) */ -+extern void vma_do_file_update_time(struct vm_area_struct *, const char[], int); -+extern struct file *vma_do_pr_or_file(struct vm_area_struct *, const char[], -+ int); -+extern void vma_do_get_file(struct vm_area_struct *, const char[], int); -+extern void vma_do_fput(struct vm_area_struct *, const char[], int); -+ -+#define vma_file_update_time(vma) vma_do_file_update_time(vma, __func__, \ -+ __LINE__) -+#define vma_pr_or_file(vma) vma_do_pr_or_file(vma, __func__, \ -+ __LINE__) -+#define vma_get_file(vma) vma_do_get_file(vma, __func__, __LINE__) -+#define vma_fput(vma) vma_do_fput(vma, __func__, __LINE__) -+ -+#ifndef CONFIG_MMU -+extern struct file *vmr_do_pr_or_file(struct vm_region *, const char[], int); -+extern void vmr_do_fput(struct vm_region *, const char[], int); -+ -+#define vmr_pr_or_file(region) vmr_do_pr_or_file(region, __func__, \ -+ __LINE__) -+#define vmr_fput(region) vmr_do_fput(region, __func__, __LINE__) -+#endif /* !CONFIG_MMU */ -+ ++#if IS_MODULE(CONFIG_AUFS_FS) ++/* fs/au_mf.c */ ++const struct path *au_file_user_path(struct file *f); ++const struct inode *au_file_user_inode(struct file *f); ++#elif IS_BUILTIN(CONFIG_AUFS_FS) ++/* fs/aufs/mf.c */ ++const struct path *au_do_file_user_path(struct file *f); ++const struct inode *au_do_file_user_inode(struct file *f); ++#define au_file_user_path(f) au_do_file_user_path(f) ++#define au_file_user_inode(f) au_do_file_user_inode(f) +#else -+ -+#define vma_file_update_time(vma) file_update_time((vma)->vm_file) -+#define vma_pr_or_file(vma) (vma)->vm_file -+#define vma_get_file(vma) get_file((vma)->vm_file) -+#define vma_fput(vma) fput((vma)->vm_file) -+ -+#ifndef CONFIG_MMU -+#define vmr_pr_or_file(region) (region)->vm_file -+#define vmr_fput(region) fput((region)->vm_file) -+#endif /* !CONFIG_MMU */ -+ -+#endif /* CONFIG_AUFS_FS */ -+ - extern int access_process_vm(struct task_struct *tsk, unsigned long addr, - void *buf, int len, unsigned int gup_flags); - extern int access_remote_vm(struct mm_struct *mm, unsigned long addr, -diff --git a/include/linux/mm_types.h b/include/linux/mm_types.h -index 6e3bdf8e38bca..c70247dc71022 100644 ---- a/include/linux/mm_types.h -+++ b/include/linux/mm_types.h -@@ -572,6 +572,9 @@ struct vm_region { - unsigned long vm_top; /* region allocated to here */ - unsigned long vm_pgoff; /* the offset in vm_file corresponding to vm_start */ - struct file *vm_file; /* the backing file or NULL */ -+#if 1 /* IS_ENABLED(CONFIG_AUFS_FS) */ -+ struct file *vm_prfile; /* the virtual backing file or NULL */ -+#endif - - int vm_usage; /* region usage count (access under nommu_region_sem) */ - bool vm_icache_flushed : 1; /* true if the icache has been flushed for -@@ -747,6 +750,9 @@ struct vm_area_struct { - unsigned long vm_pgoff; /* Offset (within vm_file) in PAGE_SIZE - units */ - struct file * vm_file; /* File we map to (can be NULL). */ -+#if 1 /* IS_ENABLED(CONFIG_AUFS_FS) */ -+ struct file *vm_prfile; /* shadow of vm_file */ -+#endif - void * vm_private_data; /* was vm_pte (shared mem) */ - - #ifdef CONFIG_ANON_VMA_NAME -diff --git a/kernel/fork.c b/kernel/fork.c -index 22f43721d031d..03abd72b3353d 100644 ---- a/kernel/fork.c -+++ b/kernel/fork.c -@@ -730,7 +730,7 @@ static __latent_entropy int dup_mmap(struct mm_struct *mm, - if (file) { - struct address_space *mapping = file->f_mapping; - -- get_file(file); -+ vma_get_file(tmp); - i_mmap_lock_write(mapping); - if (vma_is_shared_maywrite(tmp)) - mapping_allow_writable(mapping); -diff --git a/mm/Makefile b/mm/Makefile -index d5639b0361663..bb57f616f0325 100644 ---- a/mm/Makefile -+++ b/mm/Makefile -@@ -145,3 +145,4 @@ obj-$(CONFIG_GENERIC_IOREMAP) += ioremap.o - obj-$(CONFIG_SHRINKER_DEBUG) += shrinker_debug.o - obj-$(CONFIG_EXECMEM) += execmem.o - obj-$(CONFIG_TMPFS_QUOTA) += shmem_quota.o -+obj-y += prfile.o -diff --git a/mm/filemap.c b/mm/filemap.c -index 56fa431c52af7..d55fe4e7bcfd1 100644 ---- a/mm/filemap.c -+++ b/mm/filemap.c -@@ -3707,7 +3707,7 @@ vm_fault_t filemap_page_mkwrite(struct vm_fault *vmf) - vm_fault_t ret = VM_FAULT_LOCKED; - - sb_start_pagefault(mapping->host->i_sb); -- file_update_time(vmf->vma->vm_file); -+ vma_file_update_time(vmf->vma); - folio_lock(folio); - if (folio->mapping != mapping) { - folio_unlock(folio); -diff --git a/mm/mmap.c b/mm/mmap.c -index 79d541f1502b2..2dc64f6dc0181 100644 ---- a/mm/mmap.c -+++ b/mm/mmap.c -@@ -1484,7 +1484,7 @@ static unsigned long __mmap_region(struct file *file, unsigned long addr, - * and cause general protection fault - * ultimately. - */ -- fput(vma->vm_file); -+ vma_fput(vma); - vm_area_free(vma); - vma = merge; - /* Update vm_flags to pick up the change. */ -@@ -1654,6 +1654,7 @@ SYSCALL_DEFINE5(remap_file_pages, unsigned long, start, unsigned long, size, - unsigned long ret = -EINVAL; - struct file *file; - vm_flags_t vm_flags; -+ struct file *prfile = NULL; /* aufs */ - - pr_warn_once("%s (%d) uses deprecated remap_file_pages() syscall. See Documentation/mm/remap_file_pages.rst.\n", - current->comm, current->pid); -@@ -1696,14 +1697,18 @@ SYSCALL_DEFINE5(remap_file_pages, unsigned long, start, unsigned long, size, - - /* Save vm_flags used to calculate prot and flags, and recheck later. */ - vm_flags = vma->vm_flags; -- file = get_file(vma->vm_file); -+ vma_get_file(vma); -+ file = vma->vm_file; -+#if 1 /* IS_ENABLED(CONFIG_AUFS_FS) */ -+ prfile = vma->vm_prfile; -+#endif - - mmap_read_unlock(mm); - - /* Call outside mmap_lock to be consistent with other callers. */ - ret = security_mmap_file(file, prot, flags); - if (ret) { -- fput(file); -+ vma_fput(vma); - return ret; - } - -@@ -1711,7 +1716,7 @@ SYSCALL_DEFINE5(remap_file_pages, unsigned long, start, unsigned long, size, - - /* OK security check passed, take write lock + let it rip. */ - if (mmap_write_lock_killable(mm)) { -- fput(file); -+ vma_fput(vma); - return -EINTR; - } - -@@ -1753,9 +1758,27 @@ SYSCALL_DEFINE5(remap_file_pages, unsigned long, start, unsigned long, size, - - ret = do_mmap(vma->vm_file, start, size, - prot, flags, 0, pgoff, &populate, NULL); -+#if 1 /* IS_ENABLED(CONFIG_AUFS_FS) */ -+ if (!IS_ERR_VALUE(ret) && file && prfile) { -+ struct vm_area_struct *new_vma; -+ -+ new_vma = find_vma(mm, ret); -+ if (!new_vma->vm_prfile) -+ new_vma->vm_prfile = prfile; -+ if (prfile) -+ get_file(prfile); -+ } ++#define au_file_user_path(f) NULL ++#define au_file_user_inode(f) NULL +#endif + - out: - mmap_write_unlock(mm); -+ /* -+ * two fput()s instead of vma_fput(vma), -+ * coz vma may not be available anymore. -+ */ - fput(file); -+ if (prfile) -+ fput(prfile); - if (populate) - mm_populate(ret, populate); - if (!IS_ERR_VALUE(ret)) -diff --git a/mm/nommu.c b/mm/nommu.c -index 9cb6e99215e2b..5add36afa9786 100644 ---- a/mm/nommu.c -+++ b/mm/nommu.c -@@ -512,7 +512,7 @@ static void __put_nommu_region(struct vm_region *region) - up_write(&nommu_region_sem); - - if (region->vm_file) -- fput(region->vm_file); -+ vmr_fput(region); - - /* IO memory and memory shared directly out of the pagecache - * from ramfs/tmpfs mustn't be released here */ -@@ -591,7 +591,7 @@ static void delete_vma(struct mm_struct *mm, struct vm_area_struct *vma) + /* + * When mmapping a file on a stackable filesystem (e.g., overlayfs), the file + * stored in ->vm_file is a backing file whose f_inode is on the underlying +@@ -2746,15 +2761,25 @@ struct path *backing_file_user_path(struct file *f); + /* Get the path to display in /proc//maps */ + static inline const struct path *file_user_path(struct file *f) { - vma_close(vma); - if (vma->vm_file) -- fput(vma->vm_file); -+ vma_fput(vma); - put_nommu_region(vma->vm_region); - vm_area_free(vma); ++ const struct path *path; ++ + if (unlikely(f->f_mode & FMODE_BACKING)) + return backing_file_user_path(f); ++ path = au_file_user_path(f); ++ if (path) ++ return path; + return &f->f_path; + } + /* Get the inode whose inode number to display in /proc//maps */ + static inline const struct inode *file_user_inode(struct file *f) + { ++ const struct inode *inode; ++ + if (unlikely(f->f_mode & FMODE_BACKING)) + return d_inode(backing_file_user_path(f)->dentry); ++ inode = au_file_user_inode(f); ++ if (inode) ++ return inode; + return file_inode(f); } -@@ -1123,7 +1123,7 @@ unsigned long do_mmap(struct file *file, - goto error_just_free; - } - } -- fput(region->vm_file); -+ vmr_fput(region); - kmem_cache_free(vm_region_jar, region); - region = pregion; - result = start; -@@ -1209,10 +1209,10 @@ unsigned long do_mmap(struct file *file, - error: - vma_iter_free(&vmi); - if (region->vm_file) -- fput(region->vm_file); -+ vmr_fput(region); - kmem_cache_free(vm_region_jar, region); - if (vma->vm_file) -- fput(vma->vm_file); -+ vma_fput(vma); - vm_area_free(vma); - return ret; -diff --git a/mm/prfile.c b/mm/prfile.c -new file mode 100644 -index 0000000000000..b034d160a18f4 ---- /dev/null -+++ b/mm/prfile.c -@@ -0,0 +1,86 @@ -+// SPDX-License-Identifier: GPL-2.0 -+/* -+ * Mainly for aufs which mmap(2) different file and wants to print different -+ * path in /proc/PID/maps. -+ * Call these functions via macros defined in linux/mm.h. -+ * -+ * See Documentation/filesystems/aufs/design/06mmap.txt -+ * -+ * Copyright (c) 2014-2025 Junjro R. Okajima -+ * Copyright (c) 2014 Ian Campbell -+ */ -+ -+#include -+#include -+#include -+ -+/* #define PRFILE_TRACE */ -+static inline void prfile_trace(struct file *f, struct file *pr, -+ const char func[], int line, const char func2[]) -+{ -+#ifdef PRFILE_TRACE -+ if (pr) -+ pr_info("%s:%d: %s, %pD2\n", func, line, func2, f); -+#endif -+} -+ -+void vma_do_file_update_time(struct vm_area_struct *vma, const char func[], -+ int line) -+{ -+ struct file *f = vma->vm_file, *pr = vma->vm_prfile; -+ -+ prfile_trace(f, pr, func, line, __func__); -+ file_update_time(f); -+ if (f && pr) -+ file_update_time(pr); -+} -+ -+struct file *vma_do_pr_or_file(struct vm_area_struct *vma, const char func[], -+ int line) -+{ -+ struct file *f = vma->vm_file, *pr = vma->vm_prfile; -+ -+ prfile_trace(f, pr, func, line, __func__); -+ return (f && pr) ? pr : f; -+} -+ -+void vma_do_get_file(struct vm_area_struct *vma, const char func[], int line) -+{ -+ struct file *f = vma->vm_file, *pr = vma->vm_prfile; -+ -+ prfile_trace(f, pr, func, line, __func__); -+ get_file(f); -+ if (f && pr) -+ get_file(pr); -+} -+ -+void vma_do_fput(struct vm_area_struct *vma, const char func[], int line) -+{ -+ struct file *f = vma->vm_file, *pr = vma->vm_prfile; -+ -+ prfile_trace(f, pr, func, line, __func__); -+ fput(f); -+ if (f && pr) -+ fput(pr); -+} -+ -+#ifndef CONFIG_MMU -+struct file *vmr_do_pr_or_file(struct vm_region *region, const char func[], -+ int line) -+{ -+ struct file *f = region->vm_file, *pr = region->vm_prfile; -+ -+ prfile_trace(f, pr, func, line, __func__); -+ return (f && pr) ? pr : f; -+} -+ -+void vmr_do_fput(struct vm_region *region, const char func[], int line) -+{ -+ struct file *f = region->vm_file, *pr = region->vm_prfile; -+ -+ prfile_trace(f, pr, func, line, __func__); -+ fput(f); -+ if (f && pr) -+ fput(pr); -+} -+#endif /* !CONFIG_MMU */ -diff --git a/mm/vma.c b/mm/vma.c -index 7621384d64cf5..3bb41fe6ac48e 100644 ---- a/mm/vma.c -+++ b/mm/vma.c -@@ -248,7 +248,7 @@ static void vma_complete(struct vma_prepare *vp, struct vma_iterator *vmi, - if (vp->file) { - uprobe_munmap(vp->remove, vp->remove->vm_start, - vp->remove->vm_end); -- fput(vp->file); -+ vma_fput(vp->vma); - } - if (vp->remove->anon_vma) - anon_vma_merge(vp->vma, vp->remove); -@@ -328,7 +328,7 @@ void remove_vma(struct vm_area_struct *vma, bool unreachable) - might_sleep(); - vma_close(vma); - if (vma->vm_file) -- fput(vma->vm_file); -+ vma_fput(vma); - mpol_put(vma_policy(vma)); - if (unreachable) - __vm_area_free(vma); -@@ -405,7 +405,7 @@ static int __split_vma(struct vma_iterator *vmi, struct vm_area_struct *vma, - goto out_free_mpol; - - if (new->vm_file) -- get_file(new->vm_file); -+ vma_get_file(new); - - if (new->vm_ops && new->vm_ops->open) - new->vm_ops->open(new); -@@ -1671,7 +1671,7 @@ struct vm_area_struct *copy_vma(struct vm_area_struct **vmap, - if (anon_vma_clone(new_vma, vma)) - goto out_free_mempol; - if (new_vma->vm_file) -- get_file(new_vma->vm_file); -+ vma_get_file(new_vma); - if (new_vma->vm_ops && new_vma->vm_ops->open) - new_vma->vm_ops->open(new_vma); - if (vma_link(mm, new_vma)) -@@ -1684,7 +1684,7 @@ struct vm_area_struct *copy_vma(struct vm_area_struct **vmap, - vma_close(new_vma); - - if (new_vma->vm_file) -- fput(new_vma->vm_file); -+ vma_fput(new_vma); - - unlink_anon_vmas(new_vma); - out_free_mempol: diff --git a/kernel/tools/cpupowertools/files/patches/aufs6/aufs6.12-20250414.patch b/kernel/tools/cpupowertools/files/patches/aufs6/aufs6.12-20251110.patch similarity index 98% rename from kernel/tools/cpupowertools/files/patches/aufs6/aufs6.12-20250414.patch rename to kernel/tools/cpupowertools/files/patches/aufs6/aufs6.12-20251110.patch index d0af9e96..5730cddb 100644 --- a/kernel/tools/cpupowertools/files/patches/aufs6/aufs6.12-20250414.patch +++ b/kernel/tools/cpupowertools/files/patches/aufs6/aufs6.12-20251110.patch @@ -1,6 +1,6 @@ -diff -Naur null/Documentation/ABI/testing/debugfs-aufs linux-6.12.30/Documentation/ABI/testing/debugfs-aufs +diff -Naur null/Documentation/ABI/testing/debugfs-aufs linux-6.12.29/Documentation/ABI/testing/debugfs-aufs --- /dev/null -+++ linux-6.12.30/Documentation/ABI/testing/debugfs-aufs 2025-05-27 19:28:00.097257513 +0300 ++++ linux-6.12.29/Documentation/ABI/testing/debugfs-aufs 2025-12-15 21:34:57.602338389 +0300 @@ -0,0 +1,55 @@ +What: /debug/aufs/si_/ +Date: March 2009 @@ -57,9 +57,9 @@ diff -Naur null/Documentation/ABI/testing/debugfs-aufs linux-6.12.30/Documentati + be created. + When the aufs mount option 'noxino' is specified, it + will be empty. About XINO files, see the aufs manual. -diff -Naur null/Documentation/ABI/testing/sysfs-aufs linux-6.12.30/Documentation/ABI/testing/sysfs-aufs +diff -Naur null/Documentation/ABI/testing/sysfs-aufs linux-6.12.29/Documentation/ABI/testing/sysfs-aufs --- /dev/null -+++ linux-6.12.30/Documentation/ABI/testing/sysfs-aufs 2025-05-27 19:28:00.097257513 +0300 ++++ linux-6.12.29/Documentation/ABI/testing/sysfs-aufs 2025-12-15 21:34:57.602338389 +0300 @@ -0,0 +1,31 @@ +What: /sys/fs/aufs/si_/ +Date: March 2009 @@ -92,9 +92,9 @@ diff -Naur null/Documentation/ABI/testing/sysfs-aufs linux-6.12.30/Documentation + even if it is the default path. + When the aufs mount option 'noxino' is specified, it + will be empty. About XINO files, see the aufs manual. -diff -Naur null/Documentation/filesystems/aufs/design/01intro.txt linux-6.12.30/Documentation/filesystems/aufs/design/01intro.txt +diff -Naur null/Documentation/filesystems/aufs/design/01intro.txt linux-6.12.29/Documentation/filesystems/aufs/design/01intro.txt --- /dev/null -+++ linux-6.12.30/Documentation/filesystems/aufs/design/01intro.txt 2025-05-27 19:28:00.097257513 +0300 ++++ linux-6.12.29/Documentation/filesystems/aufs/design/01intro.txt 2025-12-15 21:34:57.602338389 +0300 @@ -0,0 +1,171 @@ + +# Copyright (C) 2005-2025 Junjiro R. Okajima @@ -267,9 +267,9 @@ diff -Naur null/Documentation/filesystems/aufs/design/01intro.txt linux-6.12.30/ +Some people may think it is better to pass such work to user space +helper, instead of doing in kernel space. Actually I am still thinking +about it. But currently I have implemented it in kernel space. -diff -Naur null/Documentation/filesystems/aufs/design/02struct.txt linux-6.12.30/Documentation/filesystems/aufs/design/02struct.txt +diff -Naur null/Documentation/filesystems/aufs/design/02struct.txt linux-6.12.29/Documentation/filesystems/aufs/design/02struct.txt --- /dev/null -+++ linux-6.12.30/Documentation/filesystems/aufs/design/02struct.txt 2025-05-27 19:28:00.097257513 +0300 ++++ linux-6.12.29/Documentation/filesystems/aufs/design/02struct.txt 2025-12-15 21:34:57.602338389 +0300 @@ -0,0 +1,258 @@ + +# Copyright (C) 2005-2025 Junjiro R. Okajima @@ -529,9 +529,9 @@ diff -Naur null/Documentation/filesystems/aufs/design/02struct.txt linux-6.12.30 +- etc. + +For this purpose, use "aumvdown" command in aufs-util.git. -diff -Naur null/Documentation/filesystems/aufs/design/03atomic_open.txt linux-6.12.30/Documentation/filesystems/aufs/design/03atomic_open.txt +diff -Naur null/Documentation/filesystems/aufs/design/03atomic_open.txt linux-6.12.29/Documentation/filesystems/aufs/design/03atomic_open.txt --- /dev/null -+++ linux-6.12.30/Documentation/filesystems/aufs/design/03atomic_open.txt 2025-05-27 19:28:00.097257513 +0300 ++++ linux-6.12.29/Documentation/filesystems/aufs/design/03atomic_open.txt 2025-12-15 21:34:57.602338389 +0300 @@ -0,0 +1,85 @@ + +# Copyright (C) 2015-2025 Junjiro R. Okajima @@ -618,9 +618,9 @@ diff -Naur null/Documentation/filesystems/aufs/design/03atomic_open.txt linux-6. + ->atomic_open() are lost. in the ordinary case, the checks are + done by VFS:do_last(), lookup_open() and atomic_open(). some can + be implemented in aufs, but not all I am afraid. -diff -Naur null/Documentation/filesystems/aufs/design/03lookup.txt linux-6.12.30/Documentation/filesystems/aufs/design/03lookup.txt +diff -Naur null/Documentation/filesystems/aufs/design/03lookup.txt linux-6.12.29/Documentation/filesystems/aufs/design/03lookup.txt --- /dev/null -+++ linux-6.12.30/Documentation/filesystems/aufs/design/03lookup.txt 2025-05-27 19:28:00.097257513 +0300 ++++ linux-6.12.29/Documentation/filesystems/aufs/design/03lookup.txt 2025-12-15 21:34:57.602338389 +0300 @@ -0,0 +1,113 @@ + +# Copyright (C) 2005-2025 Junjiro R. Okajima @@ -735,9 +735,9 @@ diff -Naur null/Documentation/filesystems/aufs/design/03lookup.txt linux-6.12.30 + test, and skip the revalidation in step 4. It is useful and improves + aufs performance when system surely hide the aufs branches from user, + by over-mounting something (or another method). -diff -Naur null/Documentation/filesystems/aufs/design/04branch.txt linux-6.12.30/Documentation/filesystems/aufs/design/04branch.txt +diff -Naur null/Documentation/filesystems/aufs/design/04branch.txt linux-6.12.29/Documentation/filesystems/aufs/design/04branch.txt --- /dev/null -+++ linux-6.12.30/Documentation/filesystems/aufs/design/04branch.txt 2025-05-27 19:28:00.098257501 +0300 ++++ linux-6.12.29/Documentation/filesystems/aufs/design/04branch.txt 2025-12-15 21:34:57.602338389 +0300 @@ -0,0 +1,74 @@ + +# Copyright (C) 2005-2025 Junjiro R. Okajima @@ -813,9 +813,9 @@ diff -Naur null/Documentation/filesystems/aufs/design/04branch.txt linux-6.12.30 + - a file on the branch is mmap-ed. + - a regular file on the branch is opened for write and there is no + same named entry on the upper branch. -diff -Naur null/Documentation/filesystems/aufs/design/05wbr_policy.txt linux-6.12.30/Documentation/filesystems/aufs/design/05wbr_policy.txt +diff -Naur null/Documentation/filesystems/aufs/design/05wbr_policy.txt linux-6.12.29/Documentation/filesystems/aufs/design/05wbr_policy.txt --- /dev/null -+++ linux-6.12.30/Documentation/filesystems/aufs/design/05wbr_policy.txt 2025-05-27 19:28:00.098257501 +0300 ++++ linux-6.12.29/Documentation/filesystems/aufs/design/05wbr_policy.txt 2025-12-15 21:34:57.603338376 +0300 @@ -0,0 +1,64 @@ + +# Copyright (C) 2005-2025 Junjiro R. Okajima @@ -881,9 +881,9 @@ diff -Naur null/Documentation/filesystems/aufs/design/05wbr_policy.txt linux-6.1 + where the source and the target exists and selects the higher + one. If the selected branch is readonly, then aufs follows the + copyup policy. -diff -Naur null/Documentation/filesystems/aufs/design/06dirren.dot linux-6.12.30/Documentation/filesystems/aufs/design/06dirren.dot +diff -Naur null/Documentation/filesystems/aufs/design/06dirren.dot linux-6.12.29/Documentation/filesystems/aufs/design/06dirren.dot --- /dev/null -+++ linux-6.12.30/Documentation/filesystems/aufs/design/06dirren.dot 2025-05-27 19:28:00.098257501 +0300 ++++ linux-6.12.29/Documentation/filesystems/aufs/design/06dirren.dot 2025-12-15 21:34:57.603338376 +0300 @@ -0,0 +1,44 @@ + +// to view this graph, run dot(1) command in GRAPHVIZ. @@ -929,9 +929,9 @@ diff -Naur null/Documentation/filesystems/aufs/design/06dirren.dot linux-6.12.30 + +aufs_lookup -> whinfo [label="load/remove"]; +} -diff -Naur null/Documentation/filesystems/aufs/design/06dirren.txt linux-6.12.30/Documentation/filesystems/aufs/design/06dirren.txt +diff -Naur null/Documentation/filesystems/aufs/design/06dirren.txt linux-6.12.29/Documentation/filesystems/aufs/design/06dirren.txt --- /dev/null -+++ linux-6.12.30/Documentation/filesystems/aufs/design/06dirren.txt 2025-05-27 19:28:00.098257501 +0300 ++++ linux-6.12.29/Documentation/filesystems/aufs/design/06dirren.txt 2025-12-15 21:34:57.603338376 +0300 @@ -0,0 +1,102 @@ + +# Copyright (C) 2017-2025 Junjiro R. Okajima @@ -1035,9 +1035,9 @@ diff -Naur null/Documentation/filesystems/aufs/design/06dirren.txt linux-6.12.30 +contains two names, before- and after-rename, the name comparision in +UDBA handler may not work correctly. In this case, the behaviour will be +equivalen to udba=reval case. -diff -Naur null/Documentation/filesystems/aufs/design/06fhsm.txt linux-6.12.30/Documentation/filesystems/aufs/design/06fhsm.txt +diff -Naur null/Documentation/filesystems/aufs/design/06fhsm.txt linux-6.12.29/Documentation/filesystems/aufs/design/06fhsm.txt --- /dev/null -+++ linux-6.12.30/Documentation/filesystems/aufs/design/06fhsm.txt 2025-05-27 19:28:00.098257501 +0300 ++++ linux-6.12.29/Documentation/filesystems/aufs/design/06fhsm.txt 2025-12-15 21:34:57.603338376 +0300 @@ -0,0 +1,118 @@ + +# Copyright (C) 2011-2025 Junjiro R. Okajima @@ -1157,10 +1157,10 @@ diff -Naur null/Documentation/filesystems/aufs/design/06fhsm.txt linux-6.12.30/D + +And of course, in every step, an error may happen. So the operation +should restore the original file state after an error happens. -diff -Naur null/Documentation/filesystems/aufs/design/06mmap.txt linux-6.12.30/Documentation/filesystems/aufs/design/06mmap.txt +diff -Naur null/Documentation/filesystems/aufs/design/06mmap.txt linux-6.12.29/Documentation/filesystems/aufs/design/06mmap.txt --- /dev/null -+++ linux-6.12.30/Documentation/filesystems/aufs/design/06mmap.txt 2025-05-27 19:28:00.098257501 +0300 -@@ -0,0 +1,72 @@ ++++ linux-6.12.29/Documentation/filesystems/aufs/design/06mmap.txt 2025-12-15 21:34:57.603338376 +0300 +@@ -0,0 +1,40 @@ + +# Copyright (C) 2005-2025 Junjiro R. Okajima +# @@ -1186,56 +1186,24 @@ diff -Naur null/Documentation/filesystems/aufs/design/06mmap.txt linux-6.12.30/D +Under /proc, several entries show the mmapped files by its path (with +device and inode number), and the printed path will be the path on the +branch fs's instead of virtual aufs's. -+This is not a problem in most cases, but some utilities lsof(1) (and its -+user) may expect the path on aufs. ++This is not a problem in most cases, but some utilities such like ++lsof(1) (and its user) may expect the path on aufs. + -+To address this issue, aufs adds a new member called vm_prfile in struct -+vm_area_struct (and struct vm_region). The original vm_file points to -+the file on the branch fs in order to handle everything correctly as -+usual. The new vm_prfile points to a virtual file in aufs, and the -+show-functions in procfs refers to vm_prfile if it is set. -+Also we need to maintain several other places where touching vm_file -+such like -+- fork()/clone() copies vma and the reference count of vm_file is -+ incremented. -+- merging vma maintains the ref count too. ++To address this issue, aufs used to take an approach to add a new ++member 'vm_prfile' into struct vm_area_struct (and struct ++vm_region). It was not an ideal solution but worked well for a long ++time. One big disadvantage is that it requires to follow every changes ++around 'vm_file' in every mainline releases. + -+This is not a good approach. It just fakes the printed path. But it -+leaves all behaviour around f_mapping unchanged. This is surely an -+advantage. -+Actually aufs had adopted another complicated approach which calls -+generic_file_mmap() and handles struct vm_operations_struct. In this -+approach, aufs met a hard problem and I could not solve it without -+switching the approach. -+ -+There may be one more another approach which is -+- bind-mount the branch-root onto the aufs-root internally -+- grab the new vfsmount (ie. struct mount) -+- lazy-umount the branch-root internally -+- in open(2) the aufs-file, open the branch-file with the hidden -+ vfsmount (instead of the original branch's vfsmount) -+- ideally this "bind-mount and lazy-umount" should be done atomically, -+ but it may be possible from userspace by the mount helper. -+ -+Adding the internal hidden vfsmount and using it in opening a file, the -+file path under /proc will be printed correctly. This approach looks -+smarter, but is not possible I am afraid. -+- aufs-root may be bind-mount later. when it happens, another hidden -+ vfsmount will be required. -+- it is hard to get the chance to bind-mount and lazy-umount -+ + in kernel-space, FS can have vfsmount in open(2) via -+ file->f_path, and aufs can know its vfsmount. But several locks are -+ already acquired, and if aufs tries to bind-mount and lazy-umount -+ here, then it may cause a deadlock. -+ + in user-space, bind-mount doesn't invoke the mount helper. -+- since /proc shows dev and ino, aufs has to give vma these info. it -+ means a new member vm_prinode will be necessary. this is essentially -+ equivalent to vm_prfile described above. -+ -+I have to give up this "looks-smater" approach. -diff -Naur null/Documentation/filesystems/aufs/design/06xattr.txt linux-6.12.30/Documentation/filesystems/aufs/design/06xattr.txt ++In linux-v6.7 (and v6.8), VFS internal functions file_user_path() and ++file_user_inode() were introduced for FMODE_BACKING and Overlayfs. ++They are good customization points and aufs gave up 'vm_prfile' ++approach and switched to modifiying file_user_{path,inode}() since ++aufs6.12. It also requires to changes to 'vm_file' in mainline, but it ++will be much smaller than the approach aufs used to take. +diff -Naur null/Documentation/filesystems/aufs/design/06xattr.txt linux-6.12.29/Documentation/filesystems/aufs/design/06xattr.txt --- /dev/null -+++ linux-6.12.30/Documentation/filesystems/aufs/design/06xattr.txt 2025-05-27 19:28:00.098257501 +0300 ++++ linux-6.12.29/Documentation/filesystems/aufs/design/06xattr.txt 2025-12-15 21:34:57.603338376 +0300 @@ -0,0 +1,94 @@ + +# Copyright (C) 2014-2025 Junjiro R. Okajima @@ -1331,9 +1299,9 @@ diff -Naur null/Documentation/filesystems/aufs/design/06xattr.txt linux-6.12.30/ +Some contradiction may happen I am afraid. +Do we need another attribute to stop copying XATTR? I am unsure. For +now, aufs implements the branch attributes to ignore the error. -diff -Naur null/Documentation/filesystems/aufs/design/07export.txt linux-6.12.30/Documentation/filesystems/aufs/design/07export.txt +diff -Naur null/Documentation/filesystems/aufs/design/07export.txt linux-6.12.29/Documentation/filesystems/aufs/design/07export.txt --- /dev/null -+++ linux-6.12.30/Documentation/filesystems/aufs/design/07export.txt 2025-05-27 19:28:00.098257501 +0300 ++++ linux-6.12.29/Documentation/filesystems/aufs/design/07export.txt 2025-12-15 21:34:57.603338376 +0300 @@ -0,0 +1,58 @@ + +# Copyright (C) 2005-2025 Junjiro R. Okajima @@ -1393,9 +1361,9 @@ diff -Naur null/Documentation/filesystems/aufs/design/07export.txt linux-6.12.30 + convert it into ESTALE for NFSD. +- readdir(): call lockdep_on/off() because filldir in NFSD calls + lookup_one_len(), vfs_getattr(), encode_fh() and others. -diff -Naur null/Documentation/filesystems/aufs/design/08shwh.txt linux-6.12.30/Documentation/filesystems/aufs/design/08shwh.txt +diff -Naur null/Documentation/filesystems/aufs/design/08shwh.txt linux-6.12.29/Documentation/filesystems/aufs/design/08shwh.txt --- /dev/null -+++ linux-6.12.30/Documentation/filesystems/aufs/design/08shwh.txt 2025-05-27 19:28:00.098257501 +0300 ++++ linux-6.12.29/Documentation/filesystems/aufs/design/08shwh.txt 2025-12-15 21:34:57.603338376 +0300 @@ -0,0 +1,52 @@ + +# Copyright (C) 2005-2025 Junjiro R. Okajima @@ -1449,9 +1417,9 @@ diff -Naur null/Documentation/filesystems/aufs/design/08shwh.txt linux-6.12.30/D + +This new squashfs archive can be stored on the boot device and the +initramfs will use it to replace the old one at the next boot. -diff -Naur null/Documentation/filesystems/aufs/design/10dynop.txt linux-6.12.30/Documentation/filesystems/aufs/design/10dynop.txt +diff -Naur null/Documentation/filesystems/aufs/design/10dynop.txt linux-6.12.29/Documentation/filesystems/aufs/design/10dynop.txt --- /dev/null -+++ linux-6.12.30/Documentation/filesystems/aufs/design/10dynop.txt 2025-05-27 19:28:00.098257501 +0300 ++++ linux-6.12.29/Documentation/filesystems/aufs/design/10dynop.txt 2025-12-15 21:34:57.603338376 +0300 @@ -0,0 +1,47 @@ + +# Copyright (C) 2010-2025 Junjiro R. Okajima @@ -1500,9 +1468,9 @@ diff -Naur null/Documentation/filesystems/aufs/design/10dynop.txt linux-6.12.30/ +XIP (DAX) mainly. +Currently this approach is applied to address_space_operations for +regular files only. -diff -Naur null/Documentation/filesystems/aufs/README linux-6.12.30/Documentation/filesystems/aufs/README +diff -Naur null/Documentation/filesystems/aufs/README linux-6.12.29/Documentation/filesystems/aufs/README --- /dev/null -+++ linux-6.12.30/Documentation/filesystems/aufs/README 2025-05-27 19:28:00.097257513 +0300 ++++ linux-6.12.29/Documentation/filesystems/aufs/README 2025-12-15 21:34:57.602338389 +0300 @@ -0,0 +1,409 @@ + +Aufs6 -- advanced multi layered unification filesystem version 6.x @@ -1886,7 +1854,7 @@ diff -Naur null/Documentation/filesystems/aufs/README linux-6.12.30/Documentatio +The Parted Magic Project made a donation (2013/9 and 11). +Pavel Barta made a donation (2013/10). +Nikolay Pertsev made a donation (2014/5). -+James B made a donation (2014/7, 2015/7, and 2021/12). ++James B made a donation (2014/7, 2015/7, 2021/12, and 2025/9). +Stefano Di Biase made a donation (2014/8). +Daniel Epellei made a donation (2015/1). +OmegaPhil made a donation (2016/1, 2018/4). @@ -1913,9 +1881,9 @@ diff -Naur null/Documentation/filesystems/aufs/README linux-6.12.30/Documentatio +# Local variables: ; +# mode: text; +# End: ; -diff -Naur null/fs/aufs/aufs.h linux-6.12.30/fs/aufs/aufs.h +diff -Naur null/fs/aufs/aufs.h linux-6.12.29/fs/aufs/aufs.h --- /dev/null -+++ linux-6.12.30/fs/aufs/aufs.h 2025-05-27 19:28:00.099257488 +0300 ++++ linux-6.12.29/fs/aufs/aufs.h 2025-12-15 21:34:57.604338363 +0300 @@ -0,0 +1,62 @@ +/* SPDX-License-Identifier: GPL-2.0 */ +/* @@ -1979,9 +1947,9 @@ diff -Naur null/fs/aufs/aufs.h linux-6.12.30/fs/aufs/aufs.h + +#endif /* __KERNEL__ */ +#endif /* __AUFS_H__ */ -diff -Naur null/fs/aufs/branch.c linux-6.12.30/fs/aufs/branch.c +diff -Naur null/fs/aufs/branch.c linux-6.12.29/fs/aufs/branch.c --- /dev/null -+++ linux-6.12.30/fs/aufs/branch.c 2025-05-27 19:28:00.100257476 +0300 ++++ linux-6.12.29/fs/aufs/branch.c 2025-12-15 21:34:57.604338363 +0300 @@ -0,0 +1,1427 @@ +// SPDX-License-Identifier: GPL-2.0 +/* @@ -3410,9 +3378,9 @@ diff -Naur null/fs/aufs/branch.c linux-6.12.30/fs/aufs/branch.c + + return err; +} -diff -Naur null/fs/aufs/branch.h linux-6.12.30/fs/aufs/branch.h +diff -Naur null/fs/aufs/branch.h linux-6.12.29/fs/aufs/branch.h --- /dev/null -+++ linux-6.12.30/fs/aufs/branch.h 2025-05-27 19:28:00.100257476 +0300 ++++ linux-6.12.29/fs/aufs/branch.h 2025-12-15 21:34:57.605338351 +0300 @@ -0,0 +1,375 @@ +/* SPDX-License-Identifier: GPL-2.0 */ +/* @@ -3789,9 +3757,9 @@ diff -Naur null/fs/aufs/branch.h linux-6.12.30/fs/aufs/branch.h + +#endif /* __KERNEL__ */ +#endif /* __AUFS_BRANCH_H__ */ -diff -Naur null/fs/aufs/conf.mk linux-6.12.30/fs/aufs/conf.mk +diff -Naur null/fs/aufs/conf.mk linux-6.12.29/fs/aufs/conf.mk --- /dev/null -+++ linux-6.12.30/fs/aufs/conf.mk 2025-05-27 19:28:00.100257476 +0300 ++++ linux-6.12.29/fs/aufs/conf.mk 2025-12-15 21:34:57.605338351 +0300 @@ -0,0 +1,40 @@ +# SPDX-License-Identifier: GPL-2.0 + @@ -3833,9 +3801,9 @@ diff -Naur null/fs/aufs/conf.mk linux-6.12.30/fs/aufs/conf.mk +${obj}/sysfs.o: ${AuConfName} + +-include ${srctree}/${src}/conf_priv.mk -diff -Naur null/fs/aufs/cpup.c linux-6.12.30/fs/aufs/cpup.c +diff -Naur null/fs/aufs/cpup.c linux-6.12.29/fs/aufs/cpup.c --- /dev/null -+++ linux-6.12.30/fs/aufs/cpup.c 2025-05-27 19:28:00.100257476 +0300 ++++ linux-6.12.29/fs/aufs/cpup.c 2025-12-15 21:34:57.605338351 +0300 @@ -0,0 +1,1458 @@ +// SPDX-License-Identifier: GPL-2.0 +/* @@ -5295,9 +5263,9 @@ diff -Naur null/fs/aufs/cpup.c linux-6.12.30/fs/aufs/cpup.c + dput(parent); + return err; +} -diff -Naur null/fs/aufs/cpup.h linux-6.12.30/fs/aufs/cpup.h +diff -Naur null/fs/aufs/cpup.h linux-6.12.29/fs/aufs/cpup.h --- /dev/null -+++ linux-6.12.30/fs/aufs/cpup.h 2025-05-27 19:28:00.100257476 +0300 ++++ linux-6.12.29/fs/aufs/cpup.h 2025-12-15 21:34:57.605338351 +0300 @@ -0,0 +1,101 @@ +/* SPDX-License-Identifier: GPL-2.0 */ +/* @@ -5400,9 +5368,9 @@ diff -Naur null/fs/aufs/cpup.h linux-6.12.30/fs/aufs/cpup.h + +#endif /* __KERNEL__ */ +#endif /* __AUFS_CPUP_H__ */ -diff -Naur null/fs/aufs/dbgaufs.c linux-6.12.30/fs/aufs/dbgaufs.c +diff -Naur null/fs/aufs/dbgaufs.c linux-6.12.29/fs/aufs/dbgaufs.c --- /dev/null -+++ linux-6.12.30/fs/aufs/dbgaufs.c 2025-05-27 19:28:00.100257476 +0300 ++++ linux-6.12.29/fs/aufs/dbgaufs.c 2025-12-15 21:34:57.605338351 +0300 @@ -0,0 +1,526 @@ +// SPDX-License-Identifier: GPL-2.0 +/* @@ -5930,9 +5898,9 @@ diff -Naur null/fs/aufs/dbgaufs.c linux-6.12.30/fs/aufs/dbgaufs.c + err = 0; + return err; +} -diff -Naur null/fs/aufs/dbgaufs.h linux-6.12.30/fs/aufs/dbgaufs.h +diff -Naur null/fs/aufs/dbgaufs.h linux-6.12.29/fs/aufs/dbgaufs.h --- /dev/null -+++ linux-6.12.30/fs/aufs/dbgaufs.h 2025-05-27 19:28:00.100257476 +0300 ++++ linux-6.12.29/fs/aufs/dbgaufs.h 2025-12-15 21:34:57.605338351 +0300 @@ -0,0 +1,53 @@ +/* SPDX-License-Identifier: GPL-2.0 */ +/* @@ -5987,9 +5955,9 @@ diff -Naur null/fs/aufs/dbgaufs.h linux-6.12.30/fs/aufs/dbgaufs.h + +#endif /* __KERNEL__ */ +#endif /* __DBGAUFS_H__ */ -diff -Naur null/fs/aufs/dcsub.c linux-6.12.30/fs/aufs/dcsub.c +diff -Naur null/fs/aufs/dcsub.c linux-6.12.29/fs/aufs/dcsub.c --- /dev/null -+++ linux-6.12.30/fs/aufs/dcsub.c 2025-05-27 19:28:00.100257476 +0300 ++++ linux-6.12.29/fs/aufs/dcsub.c 2025-12-15 21:34:57.605338351 +0300 @@ -0,0 +1,225 @@ +// SPDX-License-Identifier: GPL-2.0 +/* @@ -6216,9 +6184,9 @@ diff -Naur null/fs/aufs/dcsub.c linux-6.12.30/fs/aufs/dcsub.c + + return path_is_under(path + 0, path + 1); +} -diff -Naur null/fs/aufs/dcsub.h linux-6.12.30/fs/aufs/dcsub.h +diff -Naur null/fs/aufs/dcsub.h linux-6.12.29/fs/aufs/dcsub.h --- /dev/null -+++ linux-6.12.30/fs/aufs/dcsub.h 2025-05-27 19:28:00.100257476 +0300 ++++ linux-6.12.29/fs/aufs/dcsub.h 2025-12-15 21:34:57.605338351 +0300 @@ -0,0 +1,139 @@ +/* SPDX-License-Identifier: GPL-2.0 */ +/* @@ -6359,9 +6327,9 @@ diff -Naur null/fs/aufs/dcsub.h linux-6.12.30/fs/aufs/dcsub.h + +#endif /* __KERNEL__ */ +#endif /* __AUFS_DCSUB_H__ */ -diff -Naur null/fs/aufs/debug.c linux-6.12.30/fs/aufs/debug.c +diff -Naur null/fs/aufs/debug.c linux-6.12.29/fs/aufs/debug.c --- /dev/null -+++ linux-6.12.30/fs/aufs/debug.c 2025-05-27 19:28:00.101257463 +0300 ++++ linux-6.12.29/fs/aufs/debug.c 2025-12-15 21:34:57.605338351 +0300 @@ -0,0 +1,448 @@ +// SPDX-License-Identifier: GPL-2.0 +/* @@ -6811,9 +6779,9 @@ diff -Naur null/fs/aufs/debug.c linux-6.12.30/fs/aufs/debug.c + + return 0; +} -diff -Naur null/fs/aufs/debug.h linux-6.12.30/fs/aufs/debug.h +diff -Naur null/fs/aufs/debug.h linux-6.12.29/fs/aufs/debug.h --- /dev/null -+++ linux-6.12.30/fs/aufs/debug.h 2025-05-27 19:28:00.101257463 +0300 ++++ linux-6.12.29/fs/aufs/debug.h 2025-12-15 21:34:57.605338351 +0300 @@ -0,0 +1,226 @@ +/* SPDX-License-Identifier: GPL-2.0 */ +/* @@ -7041,9 +7009,9 @@ diff -Naur null/fs/aufs/debug.h linux-6.12.30/fs/aufs/debug.h + +#endif /* __KERNEL__ */ +#endif /* __AUFS_DEBUG_H__ */ -diff -Naur null/fs/aufs/dentry.c linux-6.12.30/fs/aufs/dentry.c +diff -Naur null/fs/aufs/dentry.c linux-6.12.29/fs/aufs/dentry.c --- /dev/null -+++ linux-6.12.30/fs/aufs/dentry.c 2025-05-27 19:28:00.101257463 +0300 ++++ linux-6.12.29/fs/aufs/dentry.c 2025-12-15 21:34:57.606338338 +0300 @@ -0,0 +1,1176 @@ +// SPDX-License-Identifier: GPL-2.0 +/* @@ -8221,9 +8189,9 @@ diff -Naur null/fs/aufs/dentry.c linux-6.12.30/fs/aufs/dentry.c +const struct dentry_operations aufs_dop_noreval = { + .d_release = aufs_d_release +}; -diff -Naur null/fs/aufs/dentry.h linux-6.12.30/fs/aufs/dentry.h +diff -Naur null/fs/aufs/dentry.h linux-6.12.29/fs/aufs/dentry.h --- /dev/null -+++ linux-6.12.30/fs/aufs/dentry.h 2025-05-27 19:28:00.101257463 +0300 ++++ linux-6.12.29/fs/aufs/dentry.h 2025-12-15 21:34:57.606338338 +0300 @@ -0,0 +1,270 @@ +/* SPDX-License-Identifier: GPL-2.0 */ +/* @@ -8495,9 +8463,9 @@ diff -Naur null/fs/aufs/dentry.h linux-6.12.30/fs/aufs/dentry.h + +#endif /* __KERNEL__ */ +#endif /* __AUFS_DENTRY_H__ */ -diff -Naur null/fs/aufs/dinfo.c linux-6.12.30/fs/aufs/dinfo.c +diff -Naur null/fs/aufs/dinfo.c linux-6.12.29/fs/aufs/dinfo.c --- /dev/null -+++ linux-6.12.30/fs/aufs/dinfo.c 2025-05-27 19:28:00.101257463 +0300 ++++ linux-6.12.29/fs/aufs/dinfo.c 2025-12-15 21:34:57.606338338 +0300 @@ -0,0 +1,555 @@ +// SPDX-License-Identifier: GPL-2.0 +/* @@ -9054,9 +9022,9 @@ diff -Naur null/fs/aufs/dinfo.c linux-6.12.30/fs/aufs/dinfo.c + return bindex; + return -1; +} -diff -Naur null/fs/aufs/dir.c linux-6.12.30/fs/aufs/dir.c +diff -Naur null/fs/aufs/dir.c linux-6.12.29/fs/aufs/dir.c --- /dev/null -+++ linux-6.12.30/fs/aufs/dir.c 2025-05-27 19:28:00.101257463 +0300 ++++ linux-6.12.29/fs/aufs/dir.c 2025-12-15 21:34:57.606338338 +0300 @@ -0,0 +1,765 @@ +// SPDX-License-Identifier: GPL-2.0 +/* @@ -9823,9 +9791,9 @@ diff -Naur null/fs/aufs/dir.c linux-6.12.30/fs/aufs/dir.c + .flush = aufs_flush_dir, + .fsync = aufs_fsync_dir +}; -diff -Naur null/fs/aufs/dir.h linux-6.12.30/fs/aufs/dir.h +diff -Naur null/fs/aufs/dir.h linux-6.12.29/fs/aufs/dir.h --- /dev/null -+++ linux-6.12.30/fs/aufs/dir.h 2025-05-27 19:28:00.101257463 +0300 ++++ linux-6.12.29/fs/aufs/dir.h 2025-12-15 21:34:57.606338338 +0300 @@ -0,0 +1,134 @@ +/* SPDX-License-Identifier: GPL-2.0 */ +/* @@ -9961,9 +9929,9 @@ diff -Naur null/fs/aufs/dir.h linux-6.12.30/fs/aufs/dir.h + +#endif /* __KERNEL__ */ +#endif /* __AUFS_DIR_H__ */ -diff -Naur null/fs/aufs/dirren.c linux-6.12.30/fs/aufs/dirren.c +diff -Naur null/fs/aufs/dirren.c linux-6.12.29/fs/aufs/dirren.c --- /dev/null -+++ linux-6.12.30/fs/aufs/dirren.c 2025-05-27 19:28:00.101257463 +0300 ++++ linux-6.12.29/fs/aufs/dirren.c 2025-12-15 21:34:57.606338338 +0300 @@ -0,0 +1,1315 @@ +// SPDX-License-Identifier: GPL-2.0 +/* @@ -11280,9 +11248,9 @@ diff -Naur null/fs/aufs/dirren.c linux-6.12.30/fs/aufs/dirren.c +out: + return err; +} -diff -Naur null/fs/aufs/dirren.h linux-6.12.30/fs/aufs/dirren.h +diff -Naur null/fs/aufs/dirren.h linux-6.12.29/fs/aufs/dirren.h --- /dev/null -+++ linux-6.12.30/fs/aufs/dirren.h 2025-05-27 19:28:00.102257451 +0300 ++++ linux-6.12.29/fs/aufs/dirren.h 2025-12-15 21:34:57.606338338 +0300 @@ -0,0 +1,140 @@ +/* SPDX-License-Identifier: GPL-2.0 */ +/* @@ -11424,9 +11392,9 @@ diff -Naur null/fs/aufs/dirren.h linux-6.12.30/fs/aufs/dirren.h + +#endif /* __KERNEL__ */ +#endif /* __AUFS_DIRREN_H__ */ -diff -Naur null/fs/aufs/dynop.c linux-6.12.30/fs/aufs/dynop.c +diff -Naur null/fs/aufs/dynop.c linux-6.12.29/fs/aufs/dynop.c --- /dev/null -+++ linux-6.12.30/fs/aufs/dynop.c 2025-05-27 19:28:00.102257451 +0300 ++++ linux-6.12.29/fs/aufs/dynop.c 2025-12-15 21:34:57.606338338 +0300 @@ -0,0 +1,365 @@ +// SPDX-License-Identifier: GPL-2.0 +/* @@ -11793,9 +11761,9 @@ diff -Naur null/fs/aufs/dynop.c linux-6.12.30/fs/aufs/dynop.c + for (i = 0; i < AuDyLast; i++) + WARN_ON(!hlist_bl_empty(dynop + i)); +} -diff -Naur null/fs/aufs/dynop.h linux-6.12.30/fs/aufs/dynop.h +diff -Naur null/fs/aufs/dynop.h linux-6.12.29/fs/aufs/dynop.h --- /dev/null -+++ linux-6.12.30/fs/aufs/dynop.h 2025-05-27 19:28:00.102257451 +0300 ++++ linux-6.12.29/fs/aufs/dynop.h 2025-12-15 21:34:57.607338326 +0300 @@ -0,0 +1,77 @@ +/* SPDX-License-Identifier: GPL-2.0 */ +/* @@ -11874,9 +11842,9 @@ diff -Naur null/fs/aufs/dynop.h linux-6.12.30/fs/aufs/dynop.h + +#endif /* __KERNEL__ */ +#endif /* __AUFS_DYNOP_H__ */ -diff -Naur null/fs/aufs/export.c linux-6.12.30/fs/aufs/export.c +diff -Naur null/fs/aufs/export.c linux-6.12.29/fs/aufs/export.c --- /dev/null -+++ linux-6.12.30/fs/aufs/export.c 2025-05-27 19:28:00.102257451 +0300 ++++ linux-6.12.29/fs/aufs/export.c 2025-12-15 21:34:57.607338326 +0300 @@ -0,0 +1,846 @@ +// SPDX-License-Identifier: GPL-2.0 +/* @@ -12724,9 +12692,9 @@ diff -Naur null/fs/aufs/export.c linux-6.12.30/fs/aufs/export.c + BUILD_BUG_ON(sizeof(u) != sizeof(int)); + atomic_set(&sbinfo->si_xigen_next, u); +} -diff -Naur null/fs/aufs/fhsm.c linux-6.12.30/fs/aufs/fhsm.c +diff -Naur null/fs/aufs/fhsm.c linux-6.12.29/fs/aufs/fhsm.c --- /dev/null -+++ linux-6.12.30/fs/aufs/fhsm.c 2025-05-27 19:28:00.102257451 +0300 ++++ linux-6.12.29/fs/aufs/fhsm.c 2025-12-15 21:34:57.607338326 +0300 @@ -0,0 +1,426 @@ +// SPDX-License-Identifier: GPL-2.0 +/* @@ -13154,9 +13122,9 @@ diff -Naur null/fs/aufs/fhsm.c linux-6.12.30/fs/aufs/fhsm.c + if (u != AUFS_FHSM_CACHE_DEF_SEC) + seq_printf(seq, ",fhsm_sec=%u", u); +} -diff -Naur null/fs/aufs/file.c linux-6.12.30/fs/aufs/file.c +diff -Naur null/fs/aufs/file.c linux-6.12.29/fs/aufs/file.c --- /dev/null -+++ linux-6.12.30/fs/aufs/file.c 2025-05-27 19:28:00.102257451 +0300 ++++ linux-6.12.29/fs/aufs/file.c 2025-12-15 21:34:57.607338326 +0300 @@ -0,0 +1,858 @@ +// SPDX-License-Identifier: GPL-2.0 +/* @@ -14016,10 +13984,10 @@ diff -Naur null/fs/aufs/file.c linux-6.12.30/fs/aufs/file.c + .swap_rw = aufs_swap_rw +#endif /* CONFIG_AUFS_DEBUG */ +}; -diff -Naur null/fs/aufs/file.h linux-6.12.30/fs/aufs/file.h +diff -Naur null/fs/aufs/file.h linux-6.12.29/fs/aufs/file.h --- /dev/null -+++ linux-6.12.30/fs/aufs/file.h 2025-05-27 19:28:00.102257451 +0300 -@@ -0,0 +1,342 @@ ++++ linux-6.12.29/fs/aufs/file.h 2025-12-15 21:34:57.607338326 +0300 +@@ -0,0 +1,327 @@ +/* SPDX-License-Identifier: GPL-2.0 */ +/* + * Copyright (C) 2005-2025 Junjiro R. Okajima @@ -14083,6 +14051,7 @@ diff -Naur null/fs/aufs/file.h linux-6.12.30/fs/aufs/file.h + struct { /* for non-dir */ + struct au_hfile fi_htop; + atomic_t fi_mmapped; ++ struct hlist_bl_node fi_mf; + }; + struct au_fidir *fi_hdir; /* for dir only */ + @@ -14138,6 +14107,16 @@ diff -Naur null/fs/aufs/file.h linux-6.12.30/fs/aufs/file.h +int aufs_release_nondir(struct inode *inode __maybe_unused, struct file *file); +struct file *au_read_pre(struct file *file, int keep_fi, unsigned int lsc); + ++/* mf.c */ ++void au_mf_add(struct file *h_file, struct file *file); ++void au_mf_del(struct file *h_file, struct file *file); ++#if IS_MODULE(CONFIG_AUFS_FS) ++const struct path *au_do_file_user_path(struct file *h_file); ++const struct inode *au_do_file_user_inode(struct file *h_file); ++#elif IS_BUILTIN(CONFIG_AUFS_FS) ++/* declared in include/linux/fs.h */ ++#endif ++ +/* finfo.c */ +void au_hfput(struct au_hfile *hf, int execed); +void au_set_h_fptr(struct file *file, aufs_bindex_t bindex, @@ -14311,25 +14290,13 @@ diff -Naur null/fs/aufs/file.h linux-6.12.30/fs/aufs/file.h +} + +/* customize vma->vm_file */ -+ -+static inline void au_do_vm_file_reset(struct vm_area_struct *vma, -+ struct file *file) -+{ -+ struct file *f; -+ -+ f = vma->vm_file; -+ get_file(file); -+ vma->vm_file = file; -+ fput(f); -+} -+ +#ifdef CONFIG_MMU +AuStubVoid(AuDbgVmRegion, struct file *file, struct vm_area_struct *vma) + +static inline void au_vm_file_reset(struct vm_area_struct *vma, + struct file *file) +{ -+ au_do_vm_file_reset(vma, file); ++ vma_set_file(vma, file); +} +#else +#define AuDbgVmRegion(file, vma) \ @@ -14338,34 +14305,20 @@ diff -Naur null/fs/aufs/file.h linux-6.12.30/fs/aufs/file.h +static inline void au_vm_file_reset(struct vm_area_struct *vma, + struct file *file) +{ -+ struct file *f; ++ vma_set_file(vma, file); + -+ au_do_vm_file_reset(vma, file); -+ f = vma->vm_region->vm_file; + get_file(file); -+ vma->vm_region->vm_file = file; -+ fput(f); ++ swap(vma->vm_region->vm_file, file); ++ fput(file); +} +#endif /* CONFIG_MMU */ + -+/* handle vma->vm_prfile */ -+static inline void au_vm_prfile_set(struct vm_area_struct *vma, -+ struct file *file) -+{ -+ get_file(file); -+ vma->vm_prfile = file; -+#ifndef CONFIG_MMU -+ get_file(file); -+ vma->vm_region->vm_prfile = file; -+#endif -+} -+ +#endif /* __KERNEL__ */ +#endif /* __AUFS_FILE_H__ */ -diff -Naur null/fs/aufs/finfo.c linux-6.12.30/fs/aufs/finfo.c +diff -Naur null/fs/aufs/finfo.c linux-6.12.29/fs/aufs/finfo.c --- /dev/null -+++ linux-6.12.30/fs/aufs/finfo.c 2025-05-27 19:28:00.102257451 +0300 -@@ -0,0 +1,147 @@ ++++ linux-6.12.29/fs/aufs/finfo.c 2025-12-15 21:34:57.607338326 +0300 +@@ -0,0 +1,148 @@ +// SPDX-License-Identifier: GPL-2.0 +/* + * Copyright (C) 2005-2025 Junjiro R. Okajima @@ -14504,6 +14457,7 @@ diff -Naur null/fs/aufs/finfo.c linux-6.12.30/fs/aufs/finfo.c + au_lcnt_inc(&au_sbi(dentry->d_sb)->si_nfiles); + au_rw_write_lock(&finfo->fi_rwsem); + finfo->fi_btop = -1; ++ INIT_HLIST_BL_NODE(&finfo->fi_mf); + finfo->fi_hdir = fidir; + atomic_set(&finfo->fi_generation, au_digen(dentry)); + /* smp_mb(); */ /* atomic_set */ @@ -14513,10 +14467,10 @@ diff -Naur null/fs/aufs/finfo.c linux-6.12.30/fs/aufs/finfo.c +out: + return err; +} -diff -Naur null/fs/aufs/f_op.c linux-6.12.30/fs/aufs/f_op.c +diff -Naur null/fs/aufs/f_op.c linux-6.12.29/fs/aufs/f_op.c --- /dev/null -+++ linux-6.12.30/fs/aufs/f_op.c 2025-05-27 19:28:00.102257451 +0300 -@@ -0,0 +1,782 @@ ++++ linux-6.12.29/fs/aufs/f_op.c 2025-12-15 21:34:57.607338326 +0300 +@@ -0,0 +1,791 @@ +// SPDX-License-Identifier: GPL-2.0 +/* + * Copyright (C) 2005-2025 Junjiro R. Okajima @@ -14626,13 +14580,21 @@ diff -Naur null/fs/aufs/f_op.c linux-6.12.30/fs/aufs/f_op.c +{ + struct au_finfo *finfo; + aufs_bindex_t bindex; ++ struct file *h_file; + + finfo = au_fi(file); + au_hbl_del(&finfo->fi_hlist, + &au_sbi(file->f_path.dentry->d_sb)->si_files); + bindex = finfo->fi_btop; -+ if (bindex >= 0) ++ if (bindex >= 0) { ++ if (au_test_mmapped(file)) { ++ /* h_file = au_hf_top(file); */ ++ h_file = finfo->fi_htop.hf_file; ++ if (h_file) ++ au_mf_del(h_file, file); ++ } + au_set_h_fptr(file, bindex, NULL); ++ } + + au_finfo_fin(file); + return 0; @@ -14743,7 +14705,8 @@ diff -Naur null/fs/aufs/f_op.c linux-6.12.30/fs/aufs/f_op.c + if (do_ready) + au_unpin(&pin); + di_read_unlock(dentry, /*flags*/0); -+ vfsub_file_start_write(h_file); ++ if (do_ready) ++ vfsub_file_start_write(h_file); + +out_fi: + fi_write_unlock(file); @@ -15147,7 +15110,7 @@ diff -Naur null/fs/aufs/f_op.c linux-6.12.30/fs/aufs/f_op.c + lockdep_off(); + si_read_lock(sb, AuLock_NOPLMW); + -+ h_file = au_write_pre(file, wlock, /*wpre*/NULL); ++ h_file = au_write_pre(file, /*do_ready*/wlock, /*wpre*/NULL); + lockdep_on(); + err = PTR_ERR(h_file); + if (IS_ERR(h_file)) @@ -15166,7 +15129,7 @@ diff -Naur null/fs/aufs/f_op.c linux-6.12.30/fs/aufs/f_op.c + if (!err) + err = call_mmap(h_file, vma); + if (!err) { -+ au_vm_prfile_set(vma, file); ++ au_mf_add(h_file, file); + fsstack_copy_attr_atime(inode, file_inode(h_file)); + goto out_fput; /* success */ + } @@ -15299,9 +15262,9 @@ diff -Naur null/fs/aufs/f_op.c linux-6.12.30/fs/aufs/f_op.c + .fallocate = aufs_fallocate, + .copy_file_range = aufs_copy_file_range +}; -diff -Naur null/fs/aufs/fsctx.c linux-6.12.30/fs/aufs/fsctx.c +diff -Naur null/fs/aufs/fsctx.c linux-6.12.29/fs/aufs/fsctx.c --- /dev/null -+++ linux-6.12.30/fs/aufs/fsctx.c 2025-05-27 19:28:00.103257438 +0300 ++++ linux-6.12.29/fs/aufs/fsctx.c 2025-12-15 21:34:57.607338326 +0300 @@ -0,0 +1,1244 @@ +// SPDX-License-Identifier: GPL-2.0 +/* @@ -16547,9 +16510,9 @@ diff -Naur null/fs/aufs/fsctx.c linux-6.12.30/fs/aufs/fsctx.c + AuTraceErr(err); + return err; +} -diff -Naur null/fs/aufs/fstype.h linux-6.12.30/fs/aufs/fstype.h +diff -Naur null/fs/aufs/fstype.h linux-6.12.29/fs/aufs/fstype.h --- /dev/null -+++ linux-6.12.30/fs/aufs/fstype.h 2025-05-27 19:28:00.103257438 +0300 ++++ linux-6.12.29/fs/aufs/fstype.h 2025-12-15 21:34:57.610338288 +0300 @@ -0,0 +1,419 @@ +/* SPDX-License-Identifier: GPL-2.0 */ +/* @@ -16970,9 +16933,9 @@ diff -Naur null/fs/aufs/fstype.h linux-6.12.30/fs/aufs/fstype.h + +#endif /* __KERNEL__ */ +#endif /* __AUFS_FSTYPE_H__ */ -diff -Naur null/fs/aufs/hbl.h linux-6.12.30/fs/aufs/hbl.h +diff -Naur null/fs/aufs/hbl.h linux-6.12.29/fs/aufs/hbl.h --- /dev/null -+++ linux-6.12.30/fs/aufs/hbl.h 2025-05-27 19:28:00.103257438 +0300 ++++ linux-6.12.29/fs/aufs/hbl.h 2025-12-15 21:34:57.610338288 +0300 @@ -0,0 +1,65 @@ +/* SPDX-License-Identifier: GPL-2.0 */ +/* @@ -17039,9 +17002,9 @@ diff -Naur null/fs/aufs/hbl.h linux-6.12.30/fs/aufs/hbl.h + +#endif /* __KERNEL__ */ +#endif /* __AUFS_HBL_H__ */ -diff -Naur null/fs/aufs/hfsnotify.c linux-6.12.30/fs/aufs/hfsnotify.c +diff -Naur null/fs/aufs/hfsnotify.c linux-6.12.29/fs/aufs/hfsnotify.c --- /dev/null -+++ linux-6.12.30/fs/aufs/hfsnotify.c 2025-05-27 19:28:00.103257438 +0300 ++++ linux-6.12.29/fs/aufs/hfsnotify.c 2025-12-15 21:34:57.611338276 +0300 @@ -0,0 +1,290 @@ +// SPDX-License-Identifier: GPL-2.0 +/* @@ -17333,9 +17296,9 @@ diff -Naur null/fs/aufs/hfsnotify.c linux-6.12.30/fs/aufs/hfsnotify.c + .fin_br = au_hfsn_fin_br, + .init_br = au_hfsn_init_br +}; -diff -Naur null/fs/aufs/hfsplus.c linux-6.12.30/fs/aufs/hfsplus.c +diff -Naur null/fs/aufs/hfsplus.c linux-6.12.29/fs/aufs/hfsplus.c --- /dev/null -+++ linux-6.12.30/fs/aufs/hfsplus.c 2025-05-27 19:28:00.103257438 +0300 ++++ linux-6.12.29/fs/aufs/hfsplus.c 2025-12-15 21:34:57.611338276 +0300 @@ -0,0 +1,60 @@ +// SPDX-License-Identifier: GPL-2.0 +/* @@ -17397,9 +17360,9 @@ diff -Naur null/fs/aufs/hfsplus.c linux-6.12.30/fs/aufs/hfsplus.c + au_lcnt_dec(&br->br_nfiles); + } +} -diff -Naur null/fs/aufs/hnotify.c linux-6.12.30/fs/aufs/hnotify.c +diff -Naur null/fs/aufs/hnotify.c linux-6.12.29/fs/aufs/hnotify.c --- /dev/null -+++ linux-6.12.30/fs/aufs/hnotify.c 2025-05-27 19:28:00.103257438 +0300 ++++ linux-6.12.29/fs/aufs/hnotify.c 2025-12-15 21:34:57.611338276 +0300 @@ -0,0 +1,715 @@ +// SPDX-License-Identifier: GPL-2.0 +/* @@ -18116,9 +18079,9 @@ diff -Naur null/fs/aufs/hnotify.c linux-6.12.30/fs/aufs/hnotify.c + if (au_cache[AuCache_HNOTIFY]) + au_hn_destroy_cache(); +} -diff -Naur null/fs/aufs/iinfo.c linux-6.12.30/fs/aufs/iinfo.c +diff -Naur null/fs/aufs/iinfo.c linux-6.12.29/fs/aufs/iinfo.c --- /dev/null -+++ linux-6.12.30/fs/aufs/iinfo.c 2025-05-27 19:28:00.104257426 +0300 ++++ linux-6.12.29/fs/aufs/iinfo.c 2025-12-15 21:34:57.612338263 +0300 @@ -0,0 +1,287 @@ +// SPDX-License-Identifier: GPL-2.0 +/* @@ -18407,9 +18370,9 @@ diff -Naur null/fs/aufs/iinfo.c linux-6.12.30/fs/aufs/iinfo.c + au_kfree_rcu(iinfo->ii_hinode); + AuRwDestroy(&iinfo->ii_rwsem); +} -diff -Naur null/fs/aufs/inode.c linux-6.12.30/fs/aufs/inode.c +diff -Naur null/fs/aufs/inode.c linux-6.12.29/fs/aufs/inode.c --- /dev/null -+++ linux-6.12.30/fs/aufs/inode.c 2025-05-27 19:28:00.104257426 +0300 ++++ linux-6.12.29/fs/aufs/inode.c 2025-12-15 21:34:57.612338263 +0300 @@ -0,0 +1,532 @@ +// SPDX-License-Identifier: GPL-2.0 +/* @@ -18943,9 +18906,9 @@ diff -Naur null/fs/aufs/inode.c linux-6.12.30/fs/aufs/inode.c + mask |= MAY_READ; /* force permission check */ + return au_test_h_perm(h_idmap, h_inode, mask); +} -diff -Naur null/fs/aufs/inode.h linux-6.12.30/fs/aufs/inode.h +diff -Naur null/fs/aufs/inode.h linux-6.12.29/fs/aufs/inode.h --- /dev/null -+++ linux-6.12.30/fs/aufs/inode.h 2025-05-27 19:28:00.105257413 +0300 ++++ linux-6.12.29/fs/aufs/inode.h 2025-12-15 21:34:57.612338263 +0300 @@ -0,0 +1,727 @@ +/* SPDX-License-Identifier: GPL-2.0 */ +/* @@ -19674,9 +19637,9 @@ diff -Naur null/fs/aufs/inode.h linux-6.12.30/fs/aufs/inode.h + +#endif /* __KERNEL__ */ +#endif /* __AUFS_INODE_H__ */ -diff -Naur null/fs/aufs/ioctl.c linux-6.12.30/fs/aufs/ioctl.c +diff -Naur null/fs/aufs/ioctl.c linux-6.12.29/fs/aufs/ioctl.c --- /dev/null -+++ linux-6.12.30/fs/aufs/ioctl.c 2025-05-27 19:28:00.105257413 +0300 ++++ linux-6.12.29/fs/aufs/ioctl.c 2025-12-15 21:34:57.612338263 +0300 @@ -0,0 +1,220 @@ +// SPDX-License-Identifier: GPL-2.0 +/* @@ -19898,9 +19861,9 @@ diff -Naur null/fs/aufs/ioctl.c linux-6.12.30/fs/aufs/ioctl.c + return aufs_ioctl_nondir(file, cmd, (unsigned long)compat_ptr(arg)); +} +#endif -diff -Naur null/fs/aufs/i_op_add.c linux-6.12.30/fs/aufs/i_op_add.c +diff -Naur null/fs/aufs/i_op_add.c linux-6.12.29/fs/aufs/i_op_add.c --- /dev/null -+++ linux-6.12.30/fs/aufs/i_op_add.c 2025-05-27 19:28:00.104257426 +0300 ++++ linux-6.12.29/fs/aufs/i_op_add.c 2025-12-15 21:34:57.611338276 +0300 @@ -0,0 +1,971 @@ +// SPDX-License-Identifier: GPL-2.0 +/* @@ -20873,9 +20836,9 @@ diff -Naur null/fs/aufs/i_op_add.c linux-6.12.30/fs/aufs/i_op_add.c +out: + return err; +} -diff -Naur null/fs/aufs/i_op.c linux-6.12.30/fs/aufs/i_op.c +diff -Naur null/fs/aufs/i_op.c linux-6.12.29/fs/aufs/i_op.c --- /dev/null -+++ linux-6.12.30/fs/aufs/i_op.c 2025-05-27 19:28:00.104257426 +0300 ++++ linux-6.12.29/fs/aufs/i_op.c 2025-12-15 21:34:57.611338276 +0300 @@ -0,0 +1,1526 @@ +// SPDX-License-Identifier: GPL-2.0 +/* @@ -22403,9 +22366,9 @@ diff -Naur null/fs/aufs/i_op.c linux-6.12.30/fs/aufs/i_op.c + .update_time = aufs_update_time + } +}; -diff -Naur null/fs/aufs/i_op_del.c linux-6.12.30/fs/aufs/i_op_del.c +diff -Naur null/fs/aufs/i_op_del.c linux-6.12.29/fs/aufs/i_op_del.c --- /dev/null -+++ linux-6.12.30/fs/aufs/i_op_del.c 2025-05-27 19:28:00.104257426 +0300 ++++ linux-6.12.29/fs/aufs/i_op_del.c 2025-12-15 21:34:57.611338276 +0300 @@ -0,0 +1,523 @@ +// SPDX-License-Identifier: GPL-2.0 +/* @@ -22930,9 +22893,9 @@ diff -Naur null/fs/aufs/i_op_del.c linux-6.12.30/fs/aufs/i_op_del.c + AuTraceErr(err); + return err; +} -diff -Naur null/fs/aufs/i_op_ren.c linux-6.12.30/fs/aufs/i_op_ren.c +diff -Naur null/fs/aufs/i_op_ren.c linux-6.12.29/fs/aufs/i_op_ren.c --- /dev/null -+++ linux-6.12.30/fs/aufs/i_op_ren.c 2025-05-27 19:28:00.104257426 +0300 ++++ linux-6.12.29/fs/aufs/i_op_ren.c 2025-12-15 21:34:57.612338263 +0300 @@ -0,0 +1,1264 @@ +// SPDX-License-Identifier: GPL-2.0 +/* @@ -24198,9 +24161,9 @@ diff -Naur null/fs/aufs/i_op_ren.c linux-6.12.30/fs/aufs/i_op_ren.c + AuTraceErr(err); + return err; +} -diff -Naur null/fs/aufs/Kconfig linux-6.12.30/fs/aufs/Kconfig +diff -Naur null/fs/aufs/Kconfig linux-6.12.29/fs/aufs/Kconfig --- /dev/null -+++ linux-6.12.30/fs/aufs/Kconfig 2025-05-27 19:28:00.099257488 +0300 ++++ linux-6.12.29/fs/aufs/Kconfig 2025-12-15 21:34:57.604338363 +0300 @@ -0,0 +1,201 @@ +# SPDX-License-Identifier: GPL-2.0 +config AUFS_FS @@ -24403,9 +24366,9 @@ diff -Naur null/fs/aufs/Kconfig linux-6.12.30/fs/aufs/Kconfig + Automatic configuration for internal use. + When aufs supports Magic SysRq, enabled automatically. +endif -diff -Naur null/fs/aufs/lcnt.h linux-6.12.30/fs/aufs/lcnt.h +diff -Naur null/fs/aufs/lcnt.h linux-6.12.29/fs/aufs/lcnt.h --- /dev/null -+++ linux-6.12.30/fs/aufs/lcnt.h 2025-05-27 19:28:00.105257413 +0300 ++++ linux-6.12.29/fs/aufs/lcnt.h 2025-12-15 21:34:57.612338263 +0300 @@ -0,0 +1,186 @@ +/* SPDX-License-Identifier: GPL-2.0 */ +/* @@ -24593,9 +24556,9 @@ diff -Naur null/fs/aufs/lcnt.h linux-6.12.30/fs/aufs/lcnt.h + +#endif /* __KERNEL__ */ +#endif /* __AUFS_LCNT_H__ */ -diff -Naur null/fs/aufs/loop.c linux-6.12.30/fs/aufs/loop.c +diff -Naur null/fs/aufs/loop.c linux-6.12.29/fs/aufs/loop.c --- /dev/null -+++ linux-6.12.30/fs/aufs/loop.c 2025-05-27 19:28:00.105257413 +0300 ++++ linux-6.12.29/fs/aufs/loop.c 2025-12-15 21:34:57.612338263 +0300 @@ -0,0 +1,148 @@ +// SPDX-License-Identifier: GPL-2.0 +/* @@ -24745,9 +24708,9 @@ diff -Naur null/fs/aufs/loop.c linux-6.12.30/fs/aufs/loop.c + symbol_put(loop_backing_file); + au_kfree_try_rcu(au_warn_loopback_array); +} -diff -Naur null/fs/aufs/loop.h linux-6.12.30/fs/aufs/loop.h +diff -Naur null/fs/aufs/loop.h linux-6.12.29/fs/aufs/loop.h --- /dev/null -+++ linux-6.12.30/fs/aufs/loop.h 2025-05-27 19:28:00.105257413 +0300 ++++ linux-6.12.29/fs/aufs/loop.h 2025-12-15 21:34:57.612338263 +0300 @@ -0,0 +1,55 @@ +/* SPDX-License-Identifier: GPL-2.0 */ +/* @@ -24804,9 +24767,9 @@ diff -Naur null/fs/aufs/loop.h linux-6.12.30/fs/aufs/loop.h + +#endif /* __KERNEL__ */ +#endif /* __AUFS_LOOP_H__ */ -diff -Naur null/fs/aufs/magic.mk linux-6.12.30/fs/aufs/magic.mk +diff -Naur null/fs/aufs/magic.mk linux-6.12.29/fs/aufs/magic.mk --- /dev/null -+++ linux-6.12.30/fs/aufs/magic.mk 2025-05-27 19:28:00.105257413 +0300 ++++ linux-6.12.29/fs/aufs/magic.mk 2025-12-15 21:34:57.612338263 +0300 @@ -0,0 +1,31 @@ +# SPDX-License-Identifier: GPL-2.0 + @@ -24839,9 +24802,9 @@ diff -Naur null/fs/aufs/magic.mk linux-6.12.30/fs/aufs/magic.mk +ifdef CONFIG_HFSPLUS_FS +ccflags-y += -DHFSPLUS_SUPER_MAGIC=0x482b +endif -diff -Naur null/fs/aufs/Makefile linux-6.12.30/fs/aufs/Makefile +diff -Naur null/fs/aufs/Makefile linux-6.12.29/fs/aufs/Makefile --- /dev/null -+++ linux-6.12.30/fs/aufs/Makefile 2025-05-27 19:28:00.099257488 +0300 ++++ linux-6.12.29/fs/aufs/Makefile 2025-12-15 21:34:57.604338363 +0300 @@ -0,0 +1,46 @@ +# SPDX-License-Identifier: GPL-2.0 + @@ -24867,7 +24830,7 @@ diff -Naur null/fs/aufs/Makefile linux-6.12.30/fs/aufs/Makefile + cpup.o whout.o wbr_policy.o \ + dinfo.o dentry.o \ + dynop.o \ -+ finfo.o file.o f_op.o \ ++ finfo.o file.o f_op.o mf.o \ + dir.o vdir.o \ + iinfo.o inode.o i_op.o i_op_add.o i_op_del.o i_op_ren.o \ + mvdown.o ioctl.o @@ -24889,9 +24852,132 @@ diff -Naur null/fs/aufs/Makefile linux-6.12.30/fs/aufs/Makefile +aufs-$(CONFIG_AUFS_BR_HFSPLUS) += hfsplus.o +aufs-$(CONFIG_AUFS_DEBUG) += debug.o +aufs-$(CONFIG_AUFS_MAGIC_SYSRQ) += sysrq.o -diff -Naur null/fs/aufs/module.c linux-6.12.30/fs/aufs/module.c +diff -Naur null/fs/aufs/mf.c linux-6.12.29/fs/aufs/mf.c --- /dev/null -+++ linux-6.12.30/fs/aufs/module.c 2025-05-27 19:28:00.105257413 +0300 ++++ linux-6.12.29/fs/aufs/mf.c 2025-12-15 21:34:57.613338251 +0300 +@@ -0,0 +1,119 @@ ++// SPDX-License-Identifier: GPL-2.0 ++/* ++ * Copyright (C) 2025 Junjiro R. Okajima ++ */ ++ ++/* ++ * mmapped files. ++ */ ++ ++#include "aufs.h" ++ ++/* ++ * File hashtable. ++ * It identifies aufs file by branch's file as a key. ++ * Used by customized file_user_path() and file_user_inode() in ++ * include/linux/fs.h. ++ * This table doesn't make get/put call for the elements. ++ * ++ * INIT_HLIST_BL_HEAD() sets NULL to its member, so we can skip it since this is ++ * 'static'. ++ */ ++#define N 0x0ff ++static struct hlist_bl_head au_mmapped_finfo[N + 1]; ++ ++static unsigned int au_mf_hash(struct file *h_file) ++{ ++ uintptr_t ptr; ++ ++ BUILD_BUG_ON(sizeof(ptr) < sizeof(h_file)); ++ ptr = (uintptr_t)h_file; ++ return (ptr >> 8) & N; ++} ++ ++void au_mf_add(struct file *h_file, struct file *file) ++{ ++ struct au_finfo *finfo; ++ unsigned int hash; ++ struct hlist_bl_head *hbl_head; ++ ++ finfo = au_fi(file); ++ AuDebugOn(!au_test_mmapped(file)); ++ if (atomic_read(&finfo->fi_mmapped) == 1) { ++ hash = au_mf_hash(h_file); ++ hbl_head = au_mmapped_finfo + hash; ++ au_hbl_add(&finfo->fi_mf, hbl_head); ++ } ++} ++ ++void au_mf_del(struct file *h_file, struct file *file) ++{ ++ struct au_finfo *finfo; ++ unsigned int hash; ++ struct hlist_bl_head *hbl_head; ++ ++ finfo = au_fi(file); ++ hash = au_mf_hash(h_file); ++ hbl_head = au_mmapped_finfo + hash; ++ au_hbl_del(&finfo->fi_mf, hbl_head); ++} ++ ++static struct file *au_mf_find(struct file *h_file) ++{ ++ struct file *found; ++ unsigned int hash; ++ struct hlist_bl_head *hbl_head; ++ struct hlist_bl_node *hbl_node; ++ struct au_finfo *finfo; ++ struct au_hfile *hfile; ++ ++ found = NULL; ++ hash = au_mf_hash(h_file); ++ hbl_head = au_mmapped_finfo + hash; ++ hlist_bl_lock(hbl_head); ++ au_hbl_for_each(hbl_node, hbl_head) { ++ if (!hbl_node) ++ continue; ++ ++ finfo = container_of(hbl_node, struct au_finfo, fi_mf); ++ hfile = &finfo->fi_htop; ++ if (hfile->hf_file == h_file) { ++ found = finfo->fi_file; ++ break; ++ } ++ } ++ hlist_bl_unlock(hbl_head); ++ ++ return found; ++} ++ ++/* ---------------------------------------------------------------------- */ ++/* declared in include/linux/fs.h */ ++ ++const struct path *au_do_file_user_path(struct file *h_file) ++{ ++ struct path *path; ++ struct file *file; ++ ++ path = NULL; ++ file = au_mf_find(h_file); ++ if (file) ++ path = &file->f_path; ++ ++ return path; ++} ++EXPORT_SYMBOL_GPL(au_do_file_user_path); ++ ++const struct inode *au_do_file_user_inode(struct file *h_file) ++{ ++ struct inode *inode; ++ struct file *file; ++ ++ inode = NULL; ++ file = au_mf_find(h_file); ++ if (file) ++ inode = file->f_inode; ++ ++ return inode; ++} ++EXPORT_SYMBOL_GPL(au_do_file_user_inode); +diff -Naur null/fs/aufs/module.c linux-6.12.29/fs/aufs/module.c +--- /dev/null ++++ linux-6.12.29/fs/aufs/module.c 2025-12-15 21:34:57.613338251 +0300 @@ -0,0 +1,275 @@ +// SPDX-License-Identifier: GPL-2.0 +/* @@ -25168,9 +25254,9 @@ diff -Naur null/fs/aufs/module.c linux-6.12.30/fs/aufs/module.c + +module_init(aufs_init); +module_exit(aufs_exit); -diff -Naur null/fs/aufs/module.h linux-6.12.30/fs/aufs/module.h +diff -Naur null/fs/aufs/module.h linux-6.12.29/fs/aufs/module.h --- /dev/null -+++ linux-6.12.30/fs/aufs/module.h 2025-05-27 19:28:00.105257413 +0300 ++++ linux-6.12.29/fs/aufs/module.h 2025-12-15 21:34:57.613338251 +0300 @@ -0,0 +1,180 @@ +/* SPDX-License-Identifier: GPL-2.0 */ +/* @@ -25352,9 +25438,9 @@ diff -Naur null/fs/aufs/module.h linux-6.12.30/fs/aufs/module.h + +#endif /* __KERNEL__ */ +#endif /* __AUFS_MODULE_H__ */ -diff -Naur null/fs/aufs/mvdown.c linux-6.12.30/fs/aufs/mvdown.c +diff -Naur null/fs/aufs/mvdown.c linux-6.12.29/fs/aufs/mvdown.c --- /dev/null -+++ linux-6.12.30/fs/aufs/mvdown.c 2025-05-27 19:28:00.105257413 +0300 ++++ linux-6.12.29/fs/aufs/mvdown.c 2025-12-15 21:34:57.613338251 +0300 @@ -0,0 +1,714 @@ +// SPDX-License-Identifier: GPL-2.0 +/* @@ -26070,9 +26156,9 @@ diff -Naur null/fs/aufs/mvdown.c linux-6.12.30/fs/aufs/mvdown.c + AuTraceErr(err); + return err; +} -diff -Naur null/fs/aufs/opts.c linux-6.12.30/fs/aufs/opts.c +diff -Naur null/fs/aufs/opts.c linux-6.12.29/fs/aufs/opts.c --- /dev/null -+++ linux-6.12.30/fs/aufs/opts.c 2025-05-27 19:28:00.105257413 +0300 ++++ linux-6.12.29/fs/aufs/opts.c 2025-12-15 21:34:57.613338251 +0300 @@ -0,0 +1,1030 @@ +// SPDX-License-Identifier: GPL-2.0 +/* @@ -27104,9 +27190,9 @@ diff -Naur null/fs/aufs/opts.c linux-6.12.30/fs/aufs/opts.c +{ + return au_mntflags(sb) & AuOptMask_UDBA; +} -diff -Naur null/fs/aufs/opts.h linux-6.12.30/fs/aufs/opts.h +diff -Naur null/fs/aufs/opts.h linux-6.12.29/fs/aufs/opts.h --- /dev/null -+++ linux-6.12.30/fs/aufs/opts.h 2025-05-27 19:28:00.105257413 +0300 ++++ linux-6.12.29/fs/aufs/opts.h 2025-12-15 21:34:57.613338251 +0300 @@ -0,0 +1,264 @@ +/* SPDX-License-Identifier: GPL-2.0 */ +/* @@ -27372,9 +27458,9 @@ diff -Naur null/fs/aufs/opts.h linux-6.12.30/fs/aufs/opts.h + +#endif /* __KERNEL__ */ +#endif /* __AUFS_OPTS_H__ */ -diff -Naur null/fs/aufs/plink.c linux-6.12.30/fs/aufs/plink.c +diff -Naur null/fs/aufs/plink.c linux-6.12.29/fs/aufs/plink.c --- /dev/null -+++ linux-6.12.30/fs/aufs/plink.c 2025-05-27 19:28:00.106257401 +0300 ++++ linux-6.12.29/fs/aufs/plink.c 2025-12-15 21:34:57.613338251 +0300 @@ -0,0 +1,516 @@ +// SPDX-License-Identifier: GPL-2.0 +/* @@ -27892,9 +27978,9 @@ diff -Naur null/fs/aufs/plink.c linux-6.12.30/fs/aufs/plink.c + } + } +} -diff -Naur null/fs/aufs/poll.c linux-6.12.30/fs/aufs/poll.c +diff -Naur null/fs/aufs/poll.c linux-6.12.29/fs/aufs/poll.c --- /dev/null -+++ linux-6.12.30/fs/aufs/poll.c 2025-05-27 19:28:00.106257401 +0300 ++++ linux-6.12.29/fs/aufs/poll.c 2025-12-15 21:34:57.614338238 +0300 @@ -0,0 +1,51 @@ +// SPDX-License-Identifier: GPL-2.0 +/* @@ -27947,9 +28033,9 @@ diff -Naur null/fs/aufs/poll.c linux-6.12.30/fs/aufs/poll.c + AuDbg("mask 0x%x\n", mask); + return mask; +} -diff -Naur null/fs/aufs/posix_acl.c linux-6.12.30/fs/aufs/posix_acl.c +diff -Naur null/fs/aufs/posix_acl.c linux-6.12.29/fs/aufs/posix_acl.c --- /dev/null -+++ linux-6.12.30/fs/aufs/posix_acl.c 2025-05-27 19:28:00.106257401 +0300 ++++ linux-6.12.29/fs/aufs/posix_acl.c 2025-12-15 21:34:57.614338238 +0300 @@ -0,0 +1,108 @@ +// SPDX-License-Identifier: GPL-2.0 +/* @@ -28059,9 +28145,9 @@ diff -Naur null/fs/aufs/posix_acl.c linux-6.12.30/fs/aufs/posix_acl.c + + return err; +} -diff -Naur null/fs/aufs/procfs.c linux-6.12.30/fs/aufs/procfs.c +diff -Naur null/fs/aufs/procfs.c linux-6.12.29/fs/aufs/procfs.c --- /dev/null -+++ linux-6.12.30/fs/aufs/procfs.c 2025-05-27 19:28:00.106257401 +0300 ++++ linux-6.12.29/fs/aufs/procfs.c 2025-12-15 21:34:57.614338238 +0300 @@ -0,0 +1,168 @@ +// SPDX-License-Identifier: GPL-2.0 +/* @@ -28231,9 +28317,9 @@ diff -Naur null/fs/aufs/procfs.c linux-6.12.30/fs/aufs/procfs.c +out: + return err; +} -diff -Naur null/fs/aufs/rdu.c linux-6.12.30/fs/aufs/rdu.c +diff -Naur null/fs/aufs/rdu.c linux-6.12.29/fs/aufs/rdu.c --- /dev/null -+++ linux-6.12.30/fs/aufs/rdu.c 2025-05-27 19:28:00.106257401 +0300 ++++ linux-6.12.29/fs/aufs/rdu.c 2025-12-15 21:34:57.614338238 +0300 @@ -0,0 +1,384 @@ +// SPDX-License-Identifier: GPL-2.0 +/* @@ -28619,9 +28705,9 @@ diff -Naur null/fs/aufs/rdu.c linux-6.12.30/fs/aufs/rdu.c + return err; +} +#endif -diff -Naur null/fs/aufs/rwsem.h linux-6.12.30/fs/aufs/rwsem.h +diff -Naur null/fs/aufs/rwsem.h linux-6.12.29/fs/aufs/rwsem.h --- /dev/null -+++ linux-6.12.30/fs/aufs/rwsem.h 2025-05-27 19:28:00.106257401 +0300 ++++ linux-6.12.29/fs/aufs/rwsem.h 2025-12-15 21:34:57.614338238 +0300 @@ -0,0 +1,89 @@ +/* SPDX-License-Identifier: GPL-2.0 */ +/* @@ -28712,9 +28798,9 @@ diff -Naur null/fs/aufs/rwsem.h linux-6.12.30/fs/aufs/rwsem.h + +#endif /* __KERNEL__ */ +#endif /* __AUFS_RWSEM_H__ */ -diff -Naur null/fs/aufs/sbinfo.c linux-6.12.30/fs/aufs/sbinfo.c +diff -Naur null/fs/aufs/sbinfo.c linux-6.12.29/fs/aufs/sbinfo.c --- /dev/null -+++ linux-6.12.30/fs/aufs/sbinfo.c 2025-05-27 19:28:00.106257401 +0300 ++++ linux-6.12.29/fs/aufs/sbinfo.c 2025-12-15 21:34:57.614338238 +0300 @@ -0,0 +1,316 @@ +// SPDX-License-Identifier: GPL-2.0 +/* @@ -29032,9 +29118,9 @@ diff -Naur null/fs/aufs/sbinfo.c linux-6.12.30/fs/aufs/sbinfo.c + di_write_unlock2(d1, d2); + si_read_unlock(d1->d_sb); +} -diff -Naur null/fs/aufs/super.c linux-6.12.30/fs/aufs/super.c +diff -Naur null/fs/aufs/super.c linux-6.12.29/fs/aufs/super.c --- /dev/null -+++ linux-6.12.30/fs/aufs/super.c 2025-05-27 19:28:00.106257401 +0300 ++++ linux-6.12.29/fs/aufs/super.c 2025-12-15 21:34:57.614338238 +0300 @@ -0,0 +1,871 @@ +// SPDX-License-Identifier: GPL-2.0 +/* @@ -29907,9 +29993,9 @@ diff -Naur null/fs/aufs/super.c linux-6.12.30/fs/aufs/super.c + /* no need to __module_get() and module_put(). */ + .owner = THIS_MODULE, +}; -diff -Naur null/fs/aufs/super.h linux-6.12.30/fs/aufs/super.h +diff -Naur null/fs/aufs/super.h linux-6.12.29/fs/aufs/super.h --- /dev/null -+++ linux-6.12.30/fs/aufs/super.h 2025-05-27 19:28:00.106257401 +0300 ++++ linux-6.12.29/fs/aufs/super.h 2025-12-15 21:34:57.614338238 +0300 @@ -0,0 +1,618 @@ +/* SPDX-License-Identifier: GPL-2.0 */ +/* @@ -30529,9 +30615,9 @@ diff -Naur null/fs/aufs/super.h linux-6.12.30/fs/aufs/super.h + +#endif /* __KERNEL__ */ +#endif /* __AUFS_SUPER_H__ */ -diff -Naur null/fs/aufs/sysaufs.c linux-6.12.30/fs/aufs/sysaufs.c +diff -Naur null/fs/aufs/sysaufs.c linux-6.12.29/fs/aufs/sysaufs.c --- /dev/null -+++ linux-6.12.30/fs/aufs/sysaufs.c 2025-05-27 19:28:00.106257401 +0300 ++++ linux-6.12.29/fs/aufs/sysaufs.c 2025-12-15 21:34:57.614338238 +0300 @@ -0,0 +1,94 @@ +// SPDX-License-Identifier: GPL-2.0 +/* @@ -30627,9 +30713,9 @@ diff -Naur null/fs/aufs/sysaufs.c linux-6.12.30/fs/aufs/sysaufs.c +out: + return err; +} -diff -Naur null/fs/aufs/sysaufs.h linux-6.12.30/fs/aufs/sysaufs.h +diff -Naur null/fs/aufs/sysaufs.h linux-6.12.29/fs/aufs/sysaufs.h --- /dev/null -+++ linux-6.12.30/fs/aufs/sysaufs.h 2025-05-27 19:28:00.106257401 +0300 ++++ linux-6.12.29/fs/aufs/sysaufs.h 2025-12-15 21:34:57.614338238 +0300 @@ -0,0 +1,102 @@ +/* SPDX-License-Identifier: GPL-2.0 */ +/* @@ -30733,9 +30819,9 @@ diff -Naur null/fs/aufs/sysaufs.h linux-6.12.30/fs/aufs/sysaufs.h + +#endif /* __KERNEL__ */ +#endif /* __SYSAUFS_H__ */ -diff -Naur null/fs/aufs/sysfs.c linux-6.12.30/fs/aufs/sysfs.c +diff -Naur null/fs/aufs/sysfs.c linux-6.12.29/fs/aufs/sysfs.c --- /dev/null -+++ linux-6.12.30/fs/aufs/sysfs.c 2025-05-27 19:28:00.106257401 +0300 ++++ linux-6.12.29/fs/aufs/sysfs.c 2025-12-15 21:34:57.615338226 +0300 @@ -0,0 +1,374 @@ +// SPDX-License-Identifier: GPL-2.0 +/* @@ -31111,9 +31197,9 @@ diff -Naur null/fs/aufs/sysfs.c linux-6.12.30/fs/aufs/sysfs.c + } + } +} -diff -Naur null/fs/aufs/sysrq.c linux-6.12.30/fs/aufs/sysrq.c +diff -Naur null/fs/aufs/sysrq.c linux-6.12.29/fs/aufs/sysrq.c --- /dev/null -+++ linux-6.12.30/fs/aufs/sysrq.c 2025-05-27 19:28:00.106257401 +0300 ++++ linux-6.12.29/fs/aufs/sysrq.c 2025-12-15 21:34:57.615338226 +0300 @@ -0,0 +1,157 @@ +// SPDX-License-Identifier: GPL-2.0 +/* @@ -31272,9 +31358,9 @@ diff -Naur null/fs/aufs/sysrq.c linux-6.12.30/fs/aufs/sysrq.c + if (unlikely(err)) + pr_err("err %d (ignored)\n", err); +} -diff -Naur null/fs/aufs/vdir.c linux-6.12.30/fs/aufs/vdir.c +diff -Naur null/fs/aufs/vdir.c linux-6.12.29/fs/aufs/vdir.c --- /dev/null -+++ linux-6.12.30/fs/aufs/vdir.c 2025-05-27 19:28:00.107257388 +0300 ++++ linux-6.12.29/fs/aufs/vdir.c 2025-12-15 21:34:57.615338226 +0300 @@ -0,0 +1,896 @@ +// SPDX-License-Identifier: GPL-2.0 +/* @@ -32172,9 +32258,9 @@ diff -Naur null/fs/aufs/vdir.c linux-6.12.30/fs/aufs/vdir.c + /* smp_mb(); */ + return 0; +} -diff -Naur null/fs/aufs/vfsub.c linux-6.12.30/fs/aufs/vfsub.c +diff -Naur null/fs/aufs/vfsub.c linux-6.12.29/fs/aufs/vfsub.c --- /dev/null -+++ linux-6.12.30/fs/aufs/vfsub.c 2025-05-27 19:28:00.107257388 +0300 ++++ linux-6.12.29/fs/aufs/vfsub.c 2025-12-15 21:34:57.615338226 +0300 @@ -0,0 +1,966 @@ +// SPDX-License-Identifier: GPL-2.0 +/* @@ -33142,9 +33228,9 @@ diff -Naur null/fs/aufs/vfsub.c linux-6.12.30/fs/aufs/vfsub.c + + return err; +} -diff -Naur null/fs/aufs/vfsub.h linux-6.12.30/fs/aufs/vfsub.h +diff -Naur null/fs/aufs/vfsub.h linux-6.12.29/fs/aufs/vfsub.h --- /dev/null -+++ linux-6.12.30/fs/aufs/vfsub.h 2025-05-27 19:28:00.107257388 +0300 ++++ linux-6.12.29/fs/aufs/vfsub.h 2025-12-15 21:34:57.615338226 +0300 @@ -0,0 +1,441 @@ +/* SPDX-License-Identifier: GPL-2.0 */ +/* @@ -33587,9 +33673,9 @@ diff -Naur null/fs/aufs/vfsub.h linux-6.12.30/fs/aufs/vfsub.h + +#endif /* __KERNEL__ */ +#endif /* __AUFS_VFSUB_H__ */ -diff -Naur null/fs/aufs/wbr_policy.c linux-6.12.30/fs/aufs/wbr_policy.c +diff -Naur null/fs/aufs/wbr_policy.c linux-6.12.29/fs/aufs/wbr_policy.c --- /dev/null -+++ linux-6.12.30/fs/aufs/wbr_policy.c 2025-05-27 19:28:00.107257388 +0300 ++++ linux-6.12.29/fs/aufs/wbr_policy.c 2025-12-15 21:34:57.615338226 +0300 @@ -0,0 +1,830 @@ +// SPDX-License-Identifier: GPL-2.0 +/* @@ -34421,9 +34507,9 @@ diff -Naur null/fs/aufs/wbr_policy.c linux-6.12.30/fs/aufs/wbr_policy.c + .fin = au_wbr_create_fin_mfs + } +}; -diff -Naur null/fs/aufs/whout.c linux-6.12.30/fs/aufs/whout.c +diff -Naur null/fs/aufs/whout.c linux-6.12.29/fs/aufs/whout.c --- /dev/null -+++ linux-6.12.30/fs/aufs/whout.c 2025-05-27 19:28:00.107257388 +0300 ++++ linux-6.12.29/fs/aufs/whout.c 2025-12-15 21:34:57.616338213 +0300 @@ -0,0 +1,1072 @@ +// SPDX-License-Identifier: GPL-2.0 +/* @@ -35497,9 +35583,9 @@ diff -Naur null/fs/aufs/whout.c linux-6.12.30/fs/aufs/whout.c + au_whtmp_rmdir_free(args); + } +} -diff -Naur null/fs/aufs/whout.h linux-6.12.30/fs/aufs/whout.h +diff -Naur null/fs/aufs/whout.h linux-6.12.29/fs/aufs/whout.h --- /dev/null -+++ linux-6.12.30/fs/aufs/whout.h 2025-05-27 19:28:00.107257388 +0300 ++++ linux-6.12.29/fs/aufs/whout.h 2025-12-15 21:34:57.616338213 +0300 @@ -0,0 +1,87 @@ +/* SPDX-License-Identifier: GPL-2.0 */ +/* @@ -35588,9 +35674,9 @@ diff -Naur null/fs/aufs/whout.h linux-6.12.30/fs/aufs/whout.h + +#endif /* __KERNEL__ */ +#endif /* __AUFS_WHOUT_H__ */ -diff -Naur null/fs/aufs/wkq.c linux-6.12.30/fs/aufs/wkq.c +diff -Naur null/fs/aufs/wkq.c linux-6.12.29/fs/aufs/wkq.c --- /dev/null -+++ linux-6.12.30/fs/aufs/wkq.c 2025-05-27 19:28:00.107257388 +0300 ++++ linux-6.12.29/fs/aufs/wkq.c 2025-12-15 21:34:57.616338213 +0300 @@ -0,0 +1,370 @@ +// SPDX-License-Identifier: GPL-2.0 +/* @@ -35962,9 +36048,9 @@ diff -Naur null/fs/aufs/wkq.c linux-6.12.30/fs/aufs/wkq.c + + return err; +} -diff -Naur null/fs/aufs/wkq.h linux-6.12.30/fs/aufs/wkq.h +diff -Naur null/fs/aufs/wkq.h linux-6.12.29/fs/aufs/wkq.h --- /dev/null -+++ linux-6.12.30/fs/aufs/wkq.h 2025-05-27 19:28:00.108257376 +0300 ++++ linux-6.12.29/fs/aufs/wkq.h 2025-12-15 21:34:57.616338213 +0300 @@ -0,0 +1,89 @@ +/* SPDX-License-Identifier: GPL-2.0 */ +/* @@ -36055,9 +36141,9 @@ diff -Naur null/fs/aufs/wkq.h linux-6.12.30/fs/aufs/wkq.h + +#endif /* __KERNEL__ */ +#endif /* __AUFS_WKQ_H__ */ -diff -Naur null/fs/aufs/xattr.c linux-6.12.30/fs/aufs/xattr.c +diff -Naur null/fs/aufs/xattr.c linux-6.12.29/fs/aufs/xattr.c --- /dev/null -+++ linux-6.12.30/fs/aufs/xattr.c 2025-05-27 19:28:00.108257376 +0300 ++++ linux-6.12.29/fs/aufs/xattr.c 2025-12-15 21:34:57.616338213 +0300 @@ -0,0 +1,360 @@ +// SPDX-License-Identifier: GPL-2.0 +/* @@ -36419,9 +36505,9 @@ diff -Naur null/fs/aufs/xattr.c linux-6.12.30/fs/aufs/xattr.c +{ + sb->s_xattr = au_xattr_handlers; +} -diff -Naur null/fs/aufs/xino.c linux-6.12.30/fs/aufs/xino.c +diff -Naur null/fs/aufs/xino.c linux-6.12.29/fs/aufs/xino.c --- /dev/null -+++ linux-6.12.30/fs/aufs/xino.c 2025-05-27 19:28:00.108257376 +0300 ++++ linux-6.12.29/fs/aufs/xino.c 2025-12-15 21:34:57.616338213 +0300 @@ -0,0 +1,1926 @@ +// SPDX-License-Identifier: GPL-2.0 +/* @@ -38349,9 +38435,9 @@ diff -Naur null/fs/aufs/xino.c linux-6.12.30/fs/aufs/xino.c +out: + return err; +} -diff -Naur null/include/uapi/linux/aufs_type.h linux-6.12.30/include/uapi/linux/aufs_type.h +diff -Naur null/include/uapi/linux/aufs_type.h linux-6.12.29/include/uapi/linux/aufs_type.h --- /dev/null -+++ linux-6.12.30/include/uapi/linux/aufs_type.h 2025-05-27 19:28:00.108257376 +0300 ++++ linux-6.12.29/include/uapi/linux/aufs_type.h 2025-12-15 21:34:57.617338201 +0300 @@ -0,0 +1,452 @@ +/* SPDX-License-Identifier: GPL-2.0 WITH Linux-syscall-note */ +/* @@ -38395,7 +38481,7 @@ diff -Naur null/include/uapi/linux/aufs_type.h linux-6.12.30/include/uapi/linux/ +#include +#endif /* __KERNEL__ */ + -+#define AUFS_VERSION "6.12-20250414" ++#define AUFS_VERSION "6.12-20251110" + +/* todo? move this to linux-2.6.19/include/magic.h */ +#define AUFS_SUPER_MAGIC ('a' << 24 | 'u' << 16 | 'f' << 8 | 's') diff --git a/kernel/tools/cpupowertools/files/patches/linux/patch-6.12.54.xz b/kernel/tools/cpupowertools/files/patches/linux/patch-6.12.54.xz deleted file mode 100644 index eea7560b..00000000 Binary files a/kernel/tools/cpupowertools/files/patches/linux/patch-6.12.54.xz and /dev/null differ diff --git a/kernel/tools/cpupowertools/files/patches/linux/patch-6.12.58.xz b/kernel/tools/cpupowertools/files/patches/linux/patch-6.12.58.xz deleted file mode 100644 index 55e26dbe..00000000 Binary files a/kernel/tools/cpupowertools/files/patches/linux/patch-6.12.58.xz and /dev/null differ diff --git a/kernel/tools/cpupowertools/files/patches/linux/patch-6.12.63.xz b/kernel/tools/cpupowertools/files/patches/linux/patch-6.12.63.xz new file mode 100644 index 00000000..644a8597 Binary files /dev/null and b/kernel/tools/cpupowertools/files/patches/linux/patch-6.12.63.xz differ diff --git a/kernel/tools/cpupowertools/files/patches/mageia/staging-rtl8812au-Kconfig-Makefile.patch b/kernel/tools/cpupowertools/files/patches/mageia/staging-rtl8812au-Kconfig-Makefile.patch index be0c79d0..1ffd1e0f 100644 --- a/kernel/tools/cpupowertools/files/patches/mageia/staging-rtl8812au-Kconfig-Makefile.patch +++ b/kernel/tools/cpupowertools/files/patches/mageia/staging-rtl8812au-Kconfig-Makefile.patch @@ -1,32 +1,22 @@ - -Hook up to module buildsystem. - -Signed-off-by: Thomas Backlund - ---- - drivers/staging/Kconfig | 2 ++ - drivers/staging/Makefile | 1 + - 2 files changed, 3 insertions(+) - -diff -Nurp linux-6.3/drivers/staging/Kconfig linux-6.3.rtl/drivers/staging/Kconfig ---- linux-6.3/drivers/staging/Kconfig 2023-04-23 22:02:52.000000000 +0300 -+++ linux-6.3.rtl/drivers/staging/Kconfig 2023-04-24 20:35:51.404482116 +0300 -@@ -36,6 +36,8 @@ source "drivers/staging/rtl8723bs/Kconfi +diff -up linux-6.12/drivers/staging/Kconfig.setting linux-6.12/drivers/staging/Kconfig +--- linux-6.12/drivers/staging/Kconfig.setting 2025-12-09 17:31:43.591783063 +0100 ++++ linux-6.12/drivers/staging/Kconfig 2025-12-09 18:37:20.268418187 +0100 +@@ -30,6 +30,8 @@ source "drivers/staging/rtl8192e/Kconfig - source "drivers/staging/rtl8712/Kconfig" + source "drivers/staging/rtl8723bs/Kconfig" +source "drivers/staging/rtl8812au/Kconfig" + source "drivers/staging/rts5208/Kconfig" source "drivers/staging/octeon/Kconfig" -diff -Nurp linux-6.3/drivers/staging/Makefile linux-6.3.rtl/drivers/staging/Makefile ---- linux-6.3/drivers/staging/Makefile 2023-04-23 22:02:52.000000000 +0300 -+++ linux-6.3.rtl/drivers/staging/Makefile 2023-04-24 20:36:34.117485089 +0300 -@@ -8,6 +8,7 @@ obj-$(CONFIG_RTL8192U) += rtl8192u/ +diff -up linux-6.12/drivers/staging/Makefile.setting linux-6.12/drivers/staging/Makefile +--- linux-6.12/drivers/staging/Makefile.setting 2025-12-09 18:37:20.268418187 +0100 ++++ linux-6.12/drivers/staging/Makefile 2025-12-09 18:38:48.903476477 +0100 +@@ -5,6 +5,7 @@ obj-y += media/ + obj-$(CONFIG_FB_OLPC_DCON) += olpc_dcon/ obj-$(CONFIG_RTL8192E) += rtl8192e/ obj-$(CONFIG_RTL8723BS) += rtl8723bs/ - obj-$(CONFIG_R8712U) += rtl8712/ +obj-$(CONFIG_RTL8812AU) += rtl8812au/ obj-$(CONFIG_RTS5208) += rts5208/ obj-$(CONFIG_OCTEON_ETHERNET) += octeon/ diff --git a/kernel/tools/cpupowertools/pspec.xml b/kernel/tools/cpupowertools/pspec.xml index 8f75f722..9389b2d1 100644 --- a/kernel/tools/cpupowertools/pspec.xml +++ b/kernel/tools/cpupowertools/pspec.xml @@ -18,10 +18,10 @@ - patches/linux/patch-6.12.58.xz + patches/linux/patch-6.12.63.xz - patches/aufs6/aufs6.12-20250414.patch + patches/aufs6/aufs6.12-20251110.patch patches/aufs6/aufs6-base.patch patches/aufs6/aufs6-kbuild.patch @@ -95,6 +95,13 @@ + + 2025-12-19 + 6.12.63 + Version bump + Mustafa Cinasal + muscnsl@gmail.com + 2025-11-14 6.12.58