From f4d37d768896b8b1908494c4ddb38bcd79e2668a Mon Sep 17 00:00:00 2001 From: =?utf8?q?Arkadiusz=20Mi=C5=9Bkiewicz?= Date: Mon, 21 Mar 2022 16:24:34 +0100 Subject: [PATCH] Up to 5.17.0. --- kernel-aufs5.patch | 3406 +++++++++++++++++++++------------------ kernel-layer7.patch | 2 +- kernel-multiarch.config | 177 +- kernel-x86.config | 5 +- kernel.spec | 6 +- update-source.sh | 2 +- 6 files changed, 1981 insertions(+), 1617 deletions(-) diff --git a/kernel-aufs5.patch b/kernel-aufs5.patch index f937d3a4..556c742a 100644 --- a/kernel-aufs5.patch +++ b/kernel-aufs5.patch @@ -2,7 +2,7 @@ SPDX-License-Identifier: GPL-2.0 aufs5.x-rcN kbuild patch diff --git a/fs/Kconfig b/fs/Kconfig -index a6313a969bc5f..aca4b89d41a14 100644 +index 6c7dc1387beb0..4af0a823e5f24 100644 --- a/fs/Kconfig +++ b/fs/Kconfig @@ -312,6 +312,7 @@ source "fs/sysv/Kconfig" @@ -14,10 +14,10 @@ index a6313a969bc5f..aca4b89d41a14 100644 endif # MISC_FILESYSTEMS diff --git a/fs/Makefile b/fs/Makefile -index 84c5e4cdfee5a..b4fcdad8412ed 100644 +index 208a74e0b00e1..57d47a0762e0a 100644 --- a/fs/Makefile +++ b/fs/Makefile -@@ -138,3 +138,4 @@ obj-$(CONFIG_EFIVAR_FS) += efivarfs/ +@@ -140,3 +140,4 @@ obj-$(CONFIG_EFIVAR_FS) += efivarfs/ obj-$(CONFIG_EROFS_FS) += erofs/ obj-$(CONFIG_VBOXSF_FS) += vboxsf/ obj-$(CONFIG_ZONEFS_FS) += zonefs/ @@ -26,10 +26,10 @@ SPDX-License-Identifier: GPL-2.0 aufs5.x-rcN base patch diff --git a/MAINTAINERS b/MAINTAINERS -index 5250298d28170..6b11c93d6750a 100644 +index 05fd080b82f3a..9554f31190578 100644 --- a/MAINTAINERS +++ b/MAINTAINERS -@@ -3169,6 +3169,19 @@ F: include/uapi/linux/audit.h +@@ -3235,6 +3235,19 @@ F: include/uapi/linux/audit.h F: kernel/audit* F: lib/*audit.c @@ -50,10 +50,10 @@ index 5250298d28170..6b11c93d6750a 100644 M: Miguel Ojeda S: Maintained diff --git a/drivers/block/loop.c b/drivers/block/loop.c -index a154cab6cd989..52776d48e306a 100644 +index 19fe19eaa50e9..9009a0efc4b28 100644 --- a/drivers/block/loop.c +++ b/drivers/block/loop.c -@@ -635,6 +635,24 @@ static int loop_change_fd(struct loop_device *lo, struct block_device *bdev, +@@ -636,6 +636,24 @@ static int loop_change_fd(struct loop_device *lo, struct block_device *bdev, return error; } @@ -79,10 +79,10 @@ index a154cab6cd989..52776d48e306a 100644 static ssize_t loop_attr_show(struct device *dev, char *page, diff --git a/fs/dcache.c b/fs/dcache.c -index cf871a81f4fdc..bc5095b734f58 100644 +index c84269c6e8bf6..6f4f48c828351 100644 --- a/fs/dcache.c +++ b/fs/dcache.c -@@ -1320,7 +1320,7 @@ enum d_walk_ret { +@@ -1345,7 +1345,7 @@ enum d_walk_ret { * * The @enter() callbacks are called with d_lock held. */ @@ -114,10 +114,10 @@ index 9c6c6a3e2de51..02382fa9bd341 100644 return error; diff --git a/fs/namespace.c b/fs/namespace.c -index 659a8f39c61af..1283670737826 100644 +index de6fae84f1a1a..e189393b34b14 100644 --- a/fs/namespace.c +++ b/fs/namespace.c -@@ -808,6 +808,12 @@ static inline int check_mnt(struct mount *mnt) +@@ -839,6 +839,12 @@ static inline int check_mnt(struct mount *mnt) return mnt->mnt_ns == current->nsproxy->mnt_ns; } @@ -159,10 +159,10 @@ index 5dbce4dcc1a7d..3e6ba363b7775 100644 unsigned int p_space; int ret; diff --git a/include/linux/fs.h b/include/linux/fs.h -index 1cb616fc11053..02ce64c28ef15 100644 +index e2d892b201b07..5479e6dc18a23 100644 --- a/include/linux/fs.h +++ b/include/linux/fs.h -@@ -1378,6 +1378,7 @@ extern void fasync_free(struct fasync_struct *); +@@ -1372,6 +1372,7 @@ extern void fasync_free(struct fasync_struct *); /* can be called from interrupts */ extern void kill_fasync(struct fasync_struct **, int, int); @@ -170,7 +170,7 @@ index 1cb616fc11053..02ce64c28ef15 100644 extern void __f_setown(struct file *filp, struct pid *, enum pid_type, int force); extern int f_setown(struct file *filp, unsigned long arg, int force); extern void f_delown(struct file *filp); -@@ -2091,6 +2092,7 @@ struct file_operations { +@@ -2003,6 +2004,7 @@ struct file_operations { ssize_t (*sendpage) (struct file *, struct page *, int, size_t, loff_t *, int); unsigned long (*get_unmapped_area)(struct file *, unsigned long, unsigned long, unsigned long, unsigned long); int (*check_flags)(int); @@ -178,7 +178,7 @@ index 1cb616fc11053..02ce64c28ef15 100644 int (*flock) (struct file *, int, struct file_lock *); ssize_t (*splice_write)(struct pipe_inode_info *, struct file *, loff_t *, size_t, unsigned int); ssize_t (*splice_read)(struct file *, loff_t *, struct pipe_inode_info *, size_t, unsigned int); -@@ -2614,6 +2616,7 @@ extern int current_umask(void); +@@ -2529,6 +2531,7 @@ extern int current_umask(void); extern void ihold(struct inode * inode); extern void iput(struct inode *); extern int generic_update_time(struct inode *, struct timespec64 *, int); @@ -186,7 +186,7 @@ index 1cb616fc11053..02ce64c28ef15 100644 /* /sys/fs */ extern struct kobject *fs_kobj; -@@ -2777,6 +2780,7 @@ static inline bool sb_is_blkdev_sb(struct super_block *sb) +@@ -2707,6 +2710,7 @@ static inline bool sb_is_blkdev_sb(struct super_block *sb) } void emergency_thaw_all(void); @@ -243,7 +243,7 @@ index a55179fd60fc3..8e21c53cf8831 100644 + unsigned int flags); #endif diff --git a/kernel/locking/lockdep.c b/kernel/locking/lockdep.c -index 2270ec68f10a1..fbb8e650c1749 100644 +index f8a0212189cad..43e3d1fdd570b 100644 --- a/kernel/locking/lockdep.c +++ b/kernel/locking/lockdep.c @@ -189,7 +189,7 @@ static @@ -267,7 +267,7 @@ SPDX-License-Identifier: GPL-2.0 aufs5.x-rcN mmap patch diff --git a/fs/proc/base.c b/fs/proc/base.c -index 13eda8de29981..24fd5e986cb79 100644 +index d654ce7150fdd..422713de90f60 100644 --- a/fs/proc/base.c +++ b/fs/proc/base.c @@ -2191,7 +2191,7 @@ static int map_files_get_link(struct dentry *dentry, struct path *path) @@ -296,10 +296,10 @@ index 13452b32e2bd5..38acccfef9d49 100644 ino = inode->i_ino; } diff --git a/fs/proc/task_mmu.c b/fs/proc/task_mmu.c -index ad667dbc96f5c..d50423613c8ed 100644 +index f46060eb91b5c..2a7c8709acadd 100644 --- a/fs/proc/task_mmu.c +++ b/fs/proc/task_mmu.c -@@ -280,7 +280,10 @@ show_map_vma(struct seq_file *m, struct vm_area_struct *vma) +@@ -281,7 +281,10 @@ show_map_vma(struct seq_file *m, struct vm_area_struct *vma) const char *name = NULL; if (file) { @@ -311,7 +311,7 @@ index ad667dbc96f5c..d50423613c8ed 100644 dev = inode->i_sb->s_dev; ino = inode->i_ino; pgoff = ((loff_t)vma->vm_pgoff) << PAGE_SHIFT; -@@ -1869,7 +1872,7 @@ static int show_numa_map(struct seq_file *m, void *v) +@@ -1903,7 +1906,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; @@ -337,10 +337,10 @@ index a6d21fc0033c6..02c2de31196e0 100644 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 a7e4a9e7d807a..30699240b45d6 100644 +index 5744a3fc47169..f2f4c5ec69530 100644 --- a/include/linux/mm.h +++ b/include/linux/mm.h -@@ -1926,6 +1926,28 @@ static inline void unmap_shared_mapping_range(struct address_space *mapping, +@@ -1895,6 +1895,28 @@ static inline void unmap_shared_mapping_range(struct address_space *mapping, unmap_mapping_range(mapping, holebegin, holelen, 0); } @@ -370,10 +370,10 @@ index a7e4a9e7d807a..30699240b45d6 100644 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 c3a6e62096006..45f5754d51cd1 100644 +index 0f549870da6a0..67d02ae46b8fa 100644 --- a/include/linux/mm_types.h +++ b/include/linux/mm_types.h -@@ -370,6 +370,7 @@ struct vm_region { +@@ -344,6 +344,7 @@ 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 */ @@ -381,7 +381,7 @@ index c3a6e62096006..45f5754d51cd1 100644 int vm_usage; /* region usage count (access under nommu_region_sem) */ bool vm_icache_flushed : 1; /* true if the icache has been flushed for -@@ -449,6 +450,7 @@ struct vm_area_struct { +@@ -440,6 +441,7 @@ 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). */ @@ -390,10 +390,10 @@ index c3a6e62096006..45f5754d51cd1 100644 #ifdef CONFIG_SWAP diff --git a/kernel/fork.c b/kernel/fork.c -index 3244cc56b697d..ae63cce182fdc 100644 +index f1e89007f2288..f085ecd96a7db 100644 --- a/kernel/fork.c +++ b/kernel/fork.c -@@ -572,7 +572,7 @@ static __latent_entropy int dup_mmap(struct mm_struct *mm, +@@ -575,7 +575,7 @@ static __latent_entropy int dup_mmap(struct mm_struct *mm, if (file) { struct address_space *mapping = file->f_mapping; @@ -403,10 +403,10 @@ index 3244cc56b697d..ae63cce182fdc 100644 if (tmp->vm_flags & VM_SHARED) mapping_allow_writable(mapping); diff --git a/mm/Makefile b/mm/Makefile -index d6c0042e3aa0d..1f11c655a632b 100644 +index 70d4309c9ce33..9acff75987dfa 100644 --- a/mm/Makefile +++ b/mm/Makefile -@@ -52,7 +52,7 @@ obj-y := filemap.o mempool.o oom_kill.o fadvise.o \ +@@ -54,7 +54,7 @@ obj-y := filemap.o mempool.o oom_kill.o fadvise.o \ mm_init.o percpu.o slab_common.o \ compaction.o vmacache.o \ interval_tree.o list_lru.o workingset.o \ @@ -416,23 +416,23 @@ index d6c0042e3aa0d..1f11c655a632b 100644 # Give 'page_alloc' its own module-parameter namespace page-alloc-y := page_alloc.o diff --git a/mm/filemap.c b/mm/filemap.c -index daa0e23a6ee66..1c1f517516f26 100644 +index ad8c39d90bf94..f95b595a49b7b 100644 --- a/mm/filemap.c +++ b/mm/filemap.c -@@ -3358,7 +3358,7 @@ vm_fault_t filemap_page_mkwrite(struct vm_fault *vmf) +@@ -3395,7 +3395,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); - lock_page(page); - if (page->mapping != mapping) { - unlock_page(page); + folio_lock(folio); + if (folio->mapping != mapping) { + folio_unlock(folio); diff --git a/mm/mmap.c b/mm/mmap.c -index bfb0ea164a90a..6bbc17d4733df 100644 +index f61a15474dd6d..071c0cd6ef623 100644 --- a/mm/mmap.c +++ b/mm/mmap.c -@@ -183,7 +183,7 @@ static struct vm_area_struct *remove_vma(struct vm_area_struct *vma) +@@ -184,7 +184,7 @@ static struct vm_area_struct *remove_vma(struct vm_area_struct *vma) if (vma->vm_ops && vma->vm_ops->close) vma->vm_ops->close(vma); if (vma->vm_file) @@ -441,7 +441,7 @@ index bfb0ea164a90a..6bbc17d4733df 100644 mpol_put(vma_policy(vma)); vm_area_free(vma); return next; -@@ -952,7 +952,7 @@ int __vma_adjust(struct vm_area_struct *vma, unsigned long start, +@@ -953,7 +953,7 @@ int __vma_adjust(struct vm_area_struct *vma, unsigned long start, if (remove_next) { if (file) { uprobe_munmap(next, next->vm_start, next->vm_end); @@ -450,7 +450,7 @@ index bfb0ea164a90a..6bbc17d4733df 100644 } if (next->anon_vma) anon_vma_merge(vma, next); -@@ -1872,7 +1872,7 @@ unsigned long mmap_region(struct file *file, unsigned long addr, +@@ -1879,7 +1879,7 @@ unsigned long mmap_region(struct file *file, unsigned long addr, return addr; unmap_and_free_vma: @@ -459,7 +459,7 @@ index bfb0ea164a90a..6bbc17d4733df 100644 vma->vm_file = NULL; /* Undo any partial mapping done by a device driver. */ -@@ -2730,7 +2730,7 @@ int __split_vma(struct mm_struct *mm, struct vm_area_struct *vma, +@@ -2737,7 +2737,7 @@ int __split_vma(struct mm_struct *mm, struct vm_area_struct *vma, goto out_free_mpol; if (new->vm_file) @@ -468,7 +468,7 @@ index bfb0ea164a90a..6bbc17d4733df 100644 if (new->vm_ops && new->vm_ops->open) new->vm_ops->open(new); -@@ -2749,7 +2749,7 @@ int __split_vma(struct mm_struct *mm, struct vm_area_struct *vma, +@@ -2756,7 +2756,7 @@ int __split_vma(struct mm_struct *mm, struct vm_area_struct *vma, if (new->vm_ops && new->vm_ops->close) new->vm_ops->close(new); if (new->vm_file) @@ -477,7 +477,7 @@ index bfb0ea164a90a..6bbc17d4733df 100644 unlink_anon_vmas(new); out_free_mpol: mpol_put(vma_policy(new)); -@@ -2944,7 +2944,7 @@ SYSCALL_DEFINE5(remap_file_pages, unsigned long, start, unsigned long, size, +@@ -2950,7 +2950,7 @@ SYSCALL_DEFINE5(remap_file_pages, unsigned long, start, unsigned long, size, struct vm_area_struct *vma; unsigned long populate = 0; unsigned long ret = -EINVAL; @@ -486,7 +486,7 @@ index bfb0ea164a90a..6bbc17d4733df 100644 pr_warn_once("%s (%d) uses deprecated remap_file_pages() syscall. See Documentation/vm/remap_file_pages.rst.\n", current->comm, current->pid); -@@ -3000,10 +3000,27 @@ SYSCALL_DEFINE5(remap_file_pages, unsigned long, start, unsigned long, size, +@@ -3006,10 +3006,27 @@ SYSCALL_DEFINE5(remap_file_pages, unsigned long, start, unsigned long, size, if (vma->vm_flags & VM_LOCKED) flags |= MAP_LOCKED; @@ -515,7 +515,7 @@ index bfb0ea164a90a..6bbc17d4733df 100644 out: mmap_write_unlock(mm); if (populate) -@@ -3284,7 +3301,7 @@ struct vm_area_struct *copy_vma(struct vm_area_struct **vmap, +@@ -3291,7 +3308,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) @@ -664,10 +664,10 @@ SPDX-License-Identifier: GPL-2.0 aufs5.x-rcN standalone patch diff --git a/fs/dcache.c b/fs/dcache.c -index bc5095b734f58..9508bd57a3bc0 100644 +index 6f4f48c828351..7ce9e4401f08a 100644 --- a/fs/dcache.c +++ b/fs/dcache.c -@@ -1425,6 +1425,7 @@ void d_walk(struct dentry *parent, void *data, +@@ -1450,6 +1450,7 @@ void d_walk(struct dentry *parent, void *data, seq = 1; goto again; } @@ -675,7 +675,7 @@ index bc5095b734f58..9508bd57a3bc0 100644 struct check_mount { struct vfsmount *mnt; -@@ -2970,6 +2971,7 @@ void d_exchange(struct dentry *dentry1, struct dentry *dentry2) +@@ -2995,6 +2996,7 @@ void d_exchange(struct dentry *dentry1, struct dentry *dentry2) write_sequnlock(&rename_lock); } @@ -684,10 +684,10 @@ index bc5095b734f58..9508bd57a3bc0 100644 /** * d_ancestor - search for an ancestor diff --git a/fs/exec.c b/fs/exec.c -index 537d92c41105b..0ab811e0fdaae 100644 +index 79f2c9483302d..d9bc22409be6a 100644 --- a/fs/exec.c +++ b/fs/exec.c -@@ -111,6 +111,7 @@ bool path_noexec(const struct path *path) +@@ -112,6 +112,7 @@ bool path_noexec(const struct path *path) return (path->mnt->mnt_flags & MNT_NOEXEC) || (path->mnt->mnt_sb->s_iflags & SB_I_NOEXEC); } @@ -708,10 +708,10 @@ index 02382fa9bd341..3418c60b90146 100644 static void f_modown(struct file *filp, struct pid *pid, enum pid_type type, int force) diff --git a/fs/file_table.c b/fs/file_table.c -index 45437f8e1003e..786af52904fcf 100644 +index 7d2e692b66a94..91942789c49aa 100644 --- a/fs/file_table.c +++ b/fs/file_table.c -@@ -161,6 +161,7 @@ struct file *alloc_empty_file(int flags, const struct cred *cred) +@@ -198,6 +198,7 @@ struct file *alloc_empty_file(int flags, const struct cred *cred) } return ERR_PTR(-ENFILE); } @@ -719,7 +719,7 @@ index 45437f8e1003e..786af52904fcf 100644 /* * Variant of alloc_empty_file() that doesn't check and modify nr_files. -@@ -375,6 +376,7 @@ void __fput_sync(struct file *file) +@@ -412,6 +413,7 @@ void __fput_sync(struct file *file) } EXPORT_SYMBOL(fput); @@ -728,10 +728,10 @@ index 45437f8e1003e..786af52904fcf 100644 void __init files_init(void) { diff --git a/fs/namespace.c b/fs/namespace.c -index 1283670737826..db99365620118 100644 +index e189393b34b14..5d7d122d1067a 100644 --- a/fs/namespace.c +++ b/fs/namespace.c -@@ -439,6 +439,7 @@ void __mnt_drop_write(struct vfsmount *mnt) +@@ -440,6 +440,7 @@ void __mnt_drop_write(struct vfsmount *mnt) mnt_dec_writers(real_mount(mnt)); preempt_enable(); } @@ -739,7 +739,7 @@ index 1283670737826..db99365620118 100644 /** * mnt_drop_write - give up write access to a mount -@@ -813,6 +814,7 @@ int is_current_mnt_ns(struct vfsmount *mnt) +@@ -844,6 +845,7 @@ int is_current_mnt_ns(struct vfsmount *mnt) { return check_mnt(real_mount(mnt)); } @@ -747,7 +747,7 @@ index 1283670737826..db99365620118 100644 /* * vfsmount lock must be held for write -@@ -2011,6 +2013,7 @@ int iterate_mounts(int (*f)(struct vfsmount *, void *), void *arg, +@@ -2047,6 +2049,7 @@ int iterate_mounts(int (*f)(struct vfsmount *, void *), void *arg, } return 0; } @@ -756,7 +756,7 @@ index 1283670737826..db99365620118 100644 static void lock_mnt_tree(struct mount *mnt) { diff --git a/fs/notify/group.c b/fs/notify/group.c -index 6a297efc47887..ed394ccb10e00 100644 +index b7d4d64f87c29..2d2d2c6d33e41 100644 --- a/fs/notify/group.c +++ b/fs/notify/group.c @@ -100,6 +100,7 @@ void fsnotify_get_group(struct fsnotify_group *group) @@ -768,10 +768,10 @@ index 6a297efc47887..ed394ccb10e00 100644 /* * Drop a reference to a group. Free it if it's through. diff --git a/fs/open.c b/fs/open.c -index f732fb94600ce..ca33d86e73fd2 100644 +index 9ff2f621b760b..3b8deceee506f 100644 --- a/fs/open.c +++ b/fs/open.c -@@ -65,6 +65,7 @@ int do_truncate(struct user_namespace *mnt_userns, struct dentry *dentry, +@@ -66,6 +66,7 @@ int do_truncate(struct user_namespace *mnt_userns, struct dentry *dentry, inode_unlock(dentry->d_inode); return ret; } @@ -832,7 +832,7 @@ index 5c8c5175b385c..ff7e9ff774b73 100644 ssize_t __vfs_getxattr(struct dentry *dentry, struct inode *inode, const char *name, diff --git a/kernel/locking/lockdep.c b/kernel/locking/lockdep.c -index fbb8e650c1749..49c4d11b08938 100644 +index 43e3d1fdd570b..5d6f33f1f2f28 100644 --- a/kernel/locking/lockdep.c +++ b/kernel/locking/lockdep.c @@ -210,6 +210,7 @@ inline struct lock_class *lockdep_hlock_class(struct held_lock *hlock) @@ -853,10 +853,10 @@ index 1698fbe6f0e13..081b05acadf82 100644 } +EXPORT_SYMBOL_GPL(task_work_run); diff --git a/security/security.c b/security/security.c -index c88167a414b41..125724525d5c0 100644 +index 22261d79f3333..732e4c219ea29 100644 --- a/security/security.c +++ b/security/security.c -@@ -1148,6 +1148,7 @@ int security_path_rmdir(const struct path *dir, struct dentry *dentry) +@@ -1151,6 +1151,7 @@ int security_path_rmdir(const struct path *dir, struct dentry *dentry) return 0; return call_int_hook(path_rmdir, 0, dir, dentry); } @@ -864,7 +864,7 @@ index c88167a414b41..125724525d5c0 100644 int security_path_unlink(const struct path *dir, struct dentry *dentry) { -@@ -1164,6 +1165,7 @@ int security_path_symlink(const struct path *dir, struct dentry *dentry, +@@ -1167,6 +1168,7 @@ int security_path_symlink(const struct path *dir, struct dentry *dentry, return 0; return call_int_hook(path_symlink, 0, dir, dentry, old_name); } @@ -872,7 +872,7 @@ index c88167a414b41..125724525d5c0 100644 int security_path_link(struct dentry *old_dentry, const struct path *new_dir, struct dentry *new_dentry) -@@ -1172,6 +1174,7 @@ int security_path_link(struct dentry *old_dentry, const struct path *new_dir, +@@ -1175,6 +1177,7 @@ int security_path_link(struct dentry *old_dentry, const struct path *new_dir, return 0; return call_int_hook(path_link, 0, old_dentry, new_dir, new_dentry); } @@ -880,7 +880,7 @@ index c88167a414b41..125724525d5c0 100644 int security_path_rename(const struct path *old_dir, struct dentry *old_dentry, const struct path *new_dir, struct dentry *new_dentry, -@@ -1199,6 +1202,7 @@ int security_path_truncate(const struct path *path) +@@ -1202,6 +1205,7 @@ int security_path_truncate(const struct path *path) return 0; return call_int_hook(path_truncate, 0, path); } @@ -888,7 +888,7 @@ index c88167a414b41..125724525d5c0 100644 int security_path_chmod(const struct path *path, umode_t mode) { -@@ -1206,6 +1210,7 @@ int security_path_chmod(const struct path *path, umode_t mode) +@@ -1209,6 +1213,7 @@ int security_path_chmod(const struct path *path, umode_t mode) return 0; return call_int_hook(path_chmod, 0, path, mode); } @@ -896,7 +896,7 @@ index c88167a414b41..125724525d5c0 100644 int security_path_chown(const struct path *path, kuid_t uid, kgid_t gid) { -@@ -1213,6 +1218,7 @@ int security_path_chown(const struct path *path, kuid_t uid, kgid_t gid) +@@ -1216,6 +1221,7 @@ int security_path_chown(const struct path *path, kuid_t uid, kgid_t gid) return 0; return call_int_hook(path_chown, 0, path, uid, gid); } @@ -904,7 +904,7 @@ index c88167a414b41..125724525d5c0 100644 int security_path_chroot(const struct path *path) { -@@ -1313,6 +1319,7 @@ int security_inode_permission(struct inode *inode, int mask) +@@ -1316,6 +1322,7 @@ int security_inode_permission(struct inode *inode, int mask) return 0; return call_int_hook(inode_permission, 0, inode, mask); } @@ -912,7 +912,7 @@ index c88167a414b41..125724525d5c0 100644 int security_inode_setattr(struct dentry *dentry, struct iattr *attr) { -@@ -1510,6 +1517,7 @@ int security_file_permission(struct file *file, int mask) +@@ -1513,6 +1520,7 @@ int security_file_permission(struct file *file, int mask) return fsnotify_perm(file, mask); } @@ -922,7 +922,7 @@ index c88167a414b41..125724525d5c0 100644 { diff -urN /usr/share/empty/Documentation/ABI/testing/debugfs-aufs linux/Documentation/ABI/testing/debugfs-aufs --- /usr/share/empty/Documentation/ABI/testing/debugfs-aufs 1970-01-01 01:00:00.000000000 +0100 -+++ linux/Documentation/ABI/testing/debugfs-aufs 2021-12-03 15:38:59.926647310 +0100 ++++ linux/Documentation/ABI/testing/debugfs-aufs 2022-03-21 14:49:05.713299677 +0100 @@ -0,0 +1,55 @@ +What: /debug/aufs/si_/ +Date: March 2009 @@ -981,7 +981,7 @@ diff -urN /usr/share/empty/Documentation/ABI/testing/debugfs-aufs linux/Document + will be empty. About XINO files, see the aufs manual. diff -urN /usr/share/empty/Documentation/ABI/testing/sysfs-aufs linux/Documentation/ABI/testing/sysfs-aufs --- /usr/share/empty/Documentation/ABI/testing/sysfs-aufs 1970-01-01 01:00:00.000000000 +0100 -+++ linux/Documentation/ABI/testing/sysfs-aufs 2021-12-03 15:38:59.926647310 +0100 ++++ linux/Documentation/ABI/testing/sysfs-aufs 2022-03-21 14:49:05.713299677 +0100 @@ -0,0 +1,31 @@ +What: /sys/fs/aufs/si_/ +Date: March 2009 @@ -1016,7 +1016,7 @@ diff -urN /usr/share/empty/Documentation/ABI/testing/sysfs-aufs linux/Documentat + will be empty. About XINO files, see the aufs manual. diff -urN /usr/share/empty/Documentation/filesystems/aufs/design/01intro.txt linux/Documentation/filesystems/aufs/design/01intro.txt --- /usr/share/empty/Documentation/filesystems/aufs/design/01intro.txt 1970-01-01 01:00:00.000000000 +0100 -+++ linux/Documentation/filesystems/aufs/design/01intro.txt 2021-12-03 15:38:59.929980643 +0100 ++++ linux/Documentation/filesystems/aufs/design/01intro.txt 2022-03-21 14:49:05.713299677 +0100 @@ -0,0 +1,171 @@ + +# Copyright (C) 2005-2021 Junjiro R. Okajima @@ -1191,7 +1191,7 @@ diff -urN /usr/share/empty/Documentation/filesystems/aufs/design/01intro.txt lin +about it. But currently I have implemented it in kernel space. diff -urN /usr/share/empty/Documentation/filesystems/aufs/design/02struct.txt linux/Documentation/filesystems/aufs/design/02struct.txt --- /usr/share/empty/Documentation/filesystems/aufs/design/02struct.txt 1970-01-01 01:00:00.000000000 +0100 -+++ linux/Documentation/filesystems/aufs/design/02struct.txt 2021-12-03 15:38:59.929980643 +0100 ++++ linux/Documentation/filesystems/aufs/design/02struct.txt 2022-03-21 14:49:05.713299677 +0100 @@ -0,0 +1,258 @@ + +# Copyright (C) 2005-2021 Junjiro R. Okajima @@ -1453,7 +1453,7 @@ diff -urN /usr/share/empty/Documentation/filesystems/aufs/design/02struct.txt li +For this purpose, use "aumvdown" command in aufs-util.git. diff -urN /usr/share/empty/Documentation/filesystems/aufs/design/03atomic_open.txt linux/Documentation/filesystems/aufs/design/03atomic_open.txt --- /usr/share/empty/Documentation/filesystems/aufs/design/03atomic_open.txt 1970-01-01 01:00:00.000000000 +0100 -+++ linux/Documentation/filesystems/aufs/design/03atomic_open.txt 2021-12-03 15:38:59.929980643 +0100 ++++ linux/Documentation/filesystems/aufs/design/03atomic_open.txt 2022-03-21 14:49:05.713299677 +0100 @@ -0,0 +1,85 @@ + +# Copyright (C) 2015-2021 Junjiro R. Okajima @@ -1542,7 +1542,7 @@ diff -urN /usr/share/empty/Documentation/filesystems/aufs/design/03atomic_open.t + be implemented in aufs, but not all I am afraid. diff -urN /usr/share/empty/Documentation/filesystems/aufs/design/03lookup.txt linux/Documentation/filesystems/aufs/design/03lookup.txt --- /usr/share/empty/Documentation/filesystems/aufs/design/03lookup.txt 1970-01-01 01:00:00.000000000 +0100 -+++ linux/Documentation/filesystems/aufs/design/03lookup.txt 2021-12-03 15:38:59.929980643 +0100 ++++ linux/Documentation/filesystems/aufs/design/03lookup.txt 2022-03-21 14:49:05.713299677 +0100 @@ -0,0 +1,113 @@ + +# Copyright (C) 2005-2021 Junjiro R. Okajima @@ -1659,7 +1659,7 @@ diff -urN /usr/share/empty/Documentation/filesystems/aufs/design/03lookup.txt li + by over-mounting something (or another method). diff -urN /usr/share/empty/Documentation/filesystems/aufs/design/04branch.txt linux/Documentation/filesystems/aufs/design/04branch.txt --- /usr/share/empty/Documentation/filesystems/aufs/design/04branch.txt 1970-01-01 01:00:00.000000000 +0100 -+++ linux/Documentation/filesystems/aufs/design/04branch.txt 2021-12-03 15:38:59.929980643 +0100 ++++ linux/Documentation/filesystems/aufs/design/04branch.txt 2022-03-21 14:49:05.713299677 +0100 @@ -0,0 +1,74 @@ + +# Copyright (C) 2005-2021 Junjiro R. Okajima @@ -1737,7 +1737,7 @@ diff -urN /usr/share/empty/Documentation/filesystems/aufs/design/04branch.txt li + same named entry on the upper branch. diff -urN /usr/share/empty/Documentation/filesystems/aufs/design/05wbr_policy.txt linux/Documentation/filesystems/aufs/design/05wbr_policy.txt --- /usr/share/empty/Documentation/filesystems/aufs/design/05wbr_policy.txt 1970-01-01 01:00:00.000000000 +0100 -+++ linux/Documentation/filesystems/aufs/design/05wbr_policy.txt 2021-12-03 15:38:59.929980643 +0100 ++++ linux/Documentation/filesystems/aufs/design/05wbr_policy.txt 2022-03-21 14:49:05.713299677 +0100 @@ -0,0 +1,64 @@ + +# Copyright (C) 2005-2021 Junjiro R. Okajima @@ -1805,7 +1805,7 @@ diff -urN /usr/share/empty/Documentation/filesystems/aufs/design/05wbr_policy.tx + copyup policy. diff -urN /usr/share/empty/Documentation/filesystems/aufs/design/06dirren.dot linux/Documentation/filesystems/aufs/design/06dirren.dot --- /usr/share/empty/Documentation/filesystems/aufs/design/06dirren.dot 1970-01-01 01:00:00.000000000 +0100 -+++ linux/Documentation/filesystems/aufs/design/06dirren.dot 2021-12-03 15:38:59.929980643 +0100 ++++ linux/Documentation/filesystems/aufs/design/06dirren.dot 2022-03-21 14:49:05.713299677 +0100 @@ -0,0 +1,31 @@ + +// to view this graph, run dot(1) command in GRAPHVIZ. @@ -1840,7 +1840,7 @@ diff -urN /usr/share/empty/Documentation/filesystems/aufs/design/06dirren.dot li +} diff -urN /usr/share/empty/Documentation/filesystems/aufs/design/06dirren.txt linux/Documentation/filesystems/aufs/design/06dirren.txt --- /usr/share/empty/Documentation/filesystems/aufs/design/06dirren.txt 1970-01-01 01:00:00.000000000 +0100 -+++ linux/Documentation/filesystems/aufs/design/06dirren.txt 2021-12-03 15:38:59.929980643 +0100 ++++ linux/Documentation/filesystems/aufs/design/06dirren.txt 2022-03-21 14:49:05.713299677 +0100 @@ -0,0 +1,102 @@ + +# Copyright (C) 2017-2021 Junjiro R. Okajima @@ -1946,7 +1946,7 @@ diff -urN /usr/share/empty/Documentation/filesystems/aufs/design/06dirren.txt li +equivalen to udba=reval case. diff -urN /usr/share/empty/Documentation/filesystems/aufs/design/06fhsm.txt linux/Documentation/filesystems/aufs/design/06fhsm.txt --- /usr/share/empty/Documentation/filesystems/aufs/design/06fhsm.txt 1970-01-01 01:00:00.000000000 +0100 -+++ linux/Documentation/filesystems/aufs/design/06fhsm.txt 2021-12-03 15:38:59.929980643 +0100 ++++ linux/Documentation/filesystems/aufs/design/06fhsm.txt 2022-03-21 14:49:05.716633010 +0100 @@ -0,0 +1,120 @@ + +# Copyright (C) 2011-2021 Junjiro R. Okajima @@ -2070,7 +2070,7 @@ diff -urN /usr/share/empty/Documentation/filesystems/aufs/design/06fhsm.txt linu +should restore the original file state after an error happens. diff -urN /usr/share/empty/Documentation/filesystems/aufs/design/06mmap.txt linux/Documentation/filesystems/aufs/design/06mmap.txt --- /usr/share/empty/Documentation/filesystems/aufs/design/06mmap.txt 1970-01-01 01:00:00.000000000 +0100 -+++ linux/Documentation/filesystems/aufs/design/06mmap.txt 2021-12-03 15:38:59.929980643 +0100 ++++ linux/Documentation/filesystems/aufs/design/06mmap.txt 2022-03-21 14:49:05.716633010 +0100 @@ -0,0 +1,72 @@ + +# Copyright (C) 2005-2021 Junjiro R. Okajima @@ -2146,7 +2146,7 @@ diff -urN /usr/share/empty/Documentation/filesystems/aufs/design/06mmap.txt linu +I have to give up this "looks-smater" approach. diff -urN /usr/share/empty/Documentation/filesystems/aufs/design/06xattr.txt linux/Documentation/filesystems/aufs/design/06xattr.txt --- /usr/share/empty/Documentation/filesystems/aufs/design/06xattr.txt 1970-01-01 01:00:00.000000000 +0100 -+++ linux/Documentation/filesystems/aufs/design/06xattr.txt 2021-12-03 15:38:59.929980643 +0100 ++++ linux/Documentation/filesystems/aufs/design/06xattr.txt 2022-03-21 14:49:05.716633010 +0100 @@ -0,0 +1,96 @@ + +# Copyright (C) 2014-2021 Junjiro R. Okajima @@ -2246,7 +2246,7 @@ diff -urN /usr/share/empty/Documentation/filesystems/aufs/design/06xattr.txt lin +now, aufs implements the branch attributes to ignore the error. diff -urN /usr/share/empty/Documentation/filesystems/aufs/design/07export.txt linux/Documentation/filesystems/aufs/design/07export.txt --- /usr/share/empty/Documentation/filesystems/aufs/design/07export.txt 1970-01-01 01:00:00.000000000 +0100 -+++ linux/Documentation/filesystems/aufs/design/07export.txt 2021-12-03 15:38:59.929980643 +0100 ++++ linux/Documentation/filesystems/aufs/design/07export.txt 2022-03-21 14:49:05.716633010 +0100 @@ -0,0 +1,58 @@ + +# Copyright (C) 2005-2021 Junjiro R. Okajima @@ -2308,7 +2308,7 @@ diff -urN /usr/share/empty/Documentation/filesystems/aufs/design/07export.txt li + lookup_one_len(), vfs_getattr(), encode_fh() and others. diff -urN /usr/share/empty/Documentation/filesystems/aufs/design/08shwh.txt linux/Documentation/filesystems/aufs/design/08shwh.txt --- /usr/share/empty/Documentation/filesystems/aufs/design/08shwh.txt 1970-01-01 01:00:00.000000000 +0100 -+++ linux/Documentation/filesystems/aufs/design/08shwh.txt 2021-12-03 15:38:59.929980643 +0100 ++++ linux/Documentation/filesystems/aufs/design/08shwh.txt 2022-03-21 14:49:05.716633010 +0100 @@ -0,0 +1,52 @@ + +# Copyright (C) 2005-2021 Junjiro R. Okajima @@ -2364,7 +2364,7 @@ diff -urN /usr/share/empty/Documentation/filesystems/aufs/design/08shwh.txt linu +initramfs will use it to replace the old one at the next boot. diff -urN /usr/share/empty/Documentation/filesystems/aufs/design/10dynop.txt linux/Documentation/filesystems/aufs/design/10dynop.txt --- /usr/share/empty/Documentation/filesystems/aufs/design/10dynop.txt 1970-01-01 01:00:00.000000000 +0100 -+++ linux/Documentation/filesystems/aufs/design/10dynop.txt 2021-12-03 15:38:59.929980643 +0100 ++++ linux/Documentation/filesystems/aufs/design/10dynop.txt 2022-03-21 14:49:05.716633010 +0100 @@ -0,0 +1,47 @@ + +# Copyright (C) 2010-2021 Junjiro R. Okajima @@ -2415,7 +2415,7 @@ diff -urN /usr/share/empty/Documentation/filesystems/aufs/design/10dynop.txt lin +regular files only. diff -urN /usr/share/empty/Documentation/filesystems/aufs/README linux/Documentation/filesystems/aufs/README --- /usr/share/empty/Documentation/filesystems/aufs/README 1970-01-01 01:00:00.000000000 +0100 -+++ linux/Documentation/filesystems/aufs/README 2021-12-03 15:40:58.233313963 +0100 ++++ linux/Documentation/filesystems/aufs/README 2022-03-21 14:49:05.713299677 +0100 @@ -0,0 +1,396 @@ + +Aufs5 -- advanced multi layered unification filesystem version 5.x @@ -2788,7 +2788,7 @@ diff -urN /usr/share/empty/Documentation/filesystems/aufs/README linux/Documenta +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 and 2015/7). ++James B made a donation (2014/7, 2015/7, and 2021/12). +Stefano Di Biase made a donation (2014/8). +Daniel Epellei made a donation (2015/1). +OmegaPhil made a donation (2016/1, 2018/4). @@ -2815,7 +2815,7 @@ diff -urN /usr/share/empty/Documentation/filesystems/aufs/README linux/Documenta +# End: ; diff -urN /usr/share/empty/fs/aufs/aufs.h linux/fs/aufs/aufs.h --- /usr/share/empty/fs/aufs/aufs.h 1970-01-01 01:00:00.000000000 +0100 -+++ linux/fs/aufs/aufs.h 2021-12-03 15:38:59.929980643 +0100 ++++ linux/fs/aufs/aufs.h 2022-03-21 14:49:05.716633010 +0100 @@ -0,0 +1,62 @@ +/* SPDX-License-Identifier: GPL-2.0 */ +/* @@ -2881,7 +2881,7 @@ diff -urN /usr/share/empty/fs/aufs/aufs.h linux/fs/aufs/aufs.h +#endif /* __AUFS_H__ */ diff -urN /usr/share/empty/fs/aufs/branch.c linux/fs/aufs/branch.c --- /usr/share/empty/fs/aufs/branch.c 1970-01-01 01:00:00.000000000 +0100 -+++ linux/fs/aufs/branch.c 2021-12-03 15:38:59.933313976 +0100 ++++ linux/fs/aufs/branch.c 2022-03-21 14:49:05.719966344 +0100 @@ -0,0 +1,1427 @@ +// SPDX-License-Identifier: GPL-2.0 +/* @@ -4312,7 +4312,7 @@ diff -urN /usr/share/empty/fs/aufs/branch.c linux/fs/aufs/branch.c +} diff -urN /usr/share/empty/fs/aufs/branch.h linux/fs/aufs/branch.h --- /usr/share/empty/fs/aufs/branch.h 1970-01-01 01:00:00.000000000 +0100 -+++ linux/fs/aufs/branch.h 2021-12-03 15:40:58.233313963 +0100 ++++ linux/fs/aufs/branch.h 2022-03-21 14:49:05.719966344 +0100 @@ -0,0 +1,375 @@ +/* SPDX-License-Identifier: GPL-2.0 */ +/* @@ -4691,7 +4691,7 @@ diff -urN /usr/share/empty/fs/aufs/branch.h linux/fs/aufs/branch.h +#endif /* __AUFS_BRANCH_H__ */ diff -urN /usr/share/empty/fs/aufs/conf.mk linux/fs/aufs/conf.mk --- /usr/share/empty/fs/aufs/conf.mk 1970-01-01 01:00:00.000000000 +0100 -+++ linux/fs/aufs/conf.mk 2021-12-03 15:38:59.933313976 +0100 ++++ linux/fs/aufs/conf.mk 2022-03-21 14:49:05.719966344 +0100 @@ -0,0 +1,40 @@ +# SPDX-License-Identifier: GPL-2.0 + @@ -4735,7 +4735,7 @@ diff -urN /usr/share/empty/fs/aufs/conf.mk linux/fs/aufs/conf.mk +-include ${srctree}/${src}/conf_priv.mk diff -urN /usr/share/empty/fs/aufs/cpup.c linux/fs/aufs/cpup.c --- /usr/share/empty/fs/aufs/cpup.c 1970-01-01 01:00:00.000000000 +0100 -+++ linux/fs/aufs/cpup.c 2021-12-03 15:40:58.233313963 +0100 ++++ linux/fs/aufs/cpup.c 2022-03-21 14:49:05.719966344 +0100 @@ -0,0 +1,1459 @@ +// SPDX-License-Identifier: GPL-2.0 +/* @@ -6198,7 +6198,7 @@ diff -urN /usr/share/empty/fs/aufs/cpup.c linux/fs/aufs/cpup.c +} diff -urN /usr/share/empty/fs/aufs/cpup.h linux/fs/aufs/cpup.h --- /usr/share/empty/fs/aufs/cpup.h 1970-01-01 01:00:00.000000000 +0100 -+++ linux/fs/aufs/cpup.h 2021-12-03 15:38:59.933313976 +0100 ++++ linux/fs/aufs/cpup.h 2022-03-21 14:49:05.719966344 +0100 @@ -0,0 +1,100 @@ +/* SPDX-License-Identifier: GPL-2.0 */ +/* @@ -6302,7 +6302,7 @@ diff -urN /usr/share/empty/fs/aufs/cpup.h linux/fs/aufs/cpup.h +#endif /* __AUFS_CPUP_H__ */ diff -urN /usr/share/empty/fs/aufs/dbgaufs.c linux/fs/aufs/dbgaufs.c --- /usr/share/empty/fs/aufs/dbgaufs.c 1970-01-01 01:00:00.000000000 +0100 -+++ linux/fs/aufs/dbgaufs.c 2021-12-03 15:38:59.933313976 +0100 ++++ linux/fs/aufs/dbgaufs.c 2022-03-21 14:49:05.719966344 +0100 @@ -0,0 +1,526 @@ +// SPDX-License-Identifier: GPL-2.0 +/* @@ -6832,7 +6832,7 @@ diff -urN /usr/share/empty/fs/aufs/dbgaufs.c linux/fs/aufs/dbgaufs.c +} diff -urN /usr/share/empty/fs/aufs/dbgaufs.h linux/fs/aufs/dbgaufs.h --- /usr/share/empty/fs/aufs/dbgaufs.h 1970-01-01 01:00:00.000000000 +0100 -+++ linux/fs/aufs/dbgaufs.h 2021-12-03 15:38:59.933313976 +0100 ++++ linux/fs/aufs/dbgaufs.h 2022-03-21 14:49:05.719966344 +0100 @@ -0,0 +1,53 @@ +/* SPDX-License-Identifier: GPL-2.0 */ +/* @@ -6889,7 +6889,7 @@ diff -urN /usr/share/empty/fs/aufs/dbgaufs.h linux/fs/aufs/dbgaufs.h +#endif /* __DBGAUFS_H__ */ diff -urN /usr/share/empty/fs/aufs/dcsub.c linux/fs/aufs/dcsub.c --- /usr/share/empty/fs/aufs/dcsub.c 1970-01-01 01:00:00.000000000 +0100 -+++ linux/fs/aufs/dcsub.c 2021-12-03 15:38:59.933313976 +0100 ++++ linux/fs/aufs/dcsub.c 2022-03-21 14:49:05.719966344 +0100 @@ -0,0 +1,225 @@ +// SPDX-License-Identifier: GPL-2.0 +/* @@ -7118,7 +7118,7 @@ diff -urN /usr/share/empty/fs/aufs/dcsub.c linux/fs/aufs/dcsub.c +} diff -urN /usr/share/empty/fs/aufs/dcsub.h linux/fs/aufs/dcsub.h --- /usr/share/empty/fs/aufs/dcsub.h 1970-01-01 01:00:00.000000000 +0100 -+++ linux/fs/aufs/dcsub.h 2021-12-03 15:38:59.933313976 +0100 ++++ linux/fs/aufs/dcsub.h 2022-03-21 14:49:05.719966344 +0100 @@ -0,0 +1,137 @@ +/* SPDX-License-Identifier: GPL-2.0 */ +/* @@ -7259,7 +7259,7 @@ diff -urN /usr/share/empty/fs/aufs/dcsub.h linux/fs/aufs/dcsub.h +#endif /* __AUFS_DCSUB_H__ */ diff -urN /usr/share/empty/fs/aufs/debug.c linux/fs/aufs/debug.c --- /usr/share/empty/fs/aufs/debug.c 1970-01-01 01:00:00.000000000 +0100 -+++ linux/fs/aufs/debug.c 2021-12-03 15:38:59.933313976 +0100 ++++ linux/fs/aufs/debug.c 2022-03-21 14:49:05.719966344 +0100 @@ -0,0 +1,444 @@ +// SPDX-License-Identifier: GPL-2.0 +/* @@ -7707,7 +7707,7 @@ diff -urN /usr/share/empty/fs/aufs/debug.c linux/fs/aufs/debug.c +} diff -urN /usr/share/empty/fs/aufs/debug.h linux/fs/aufs/debug.h --- /usr/share/empty/fs/aufs/debug.h 1970-01-01 01:00:00.000000000 +0100 -+++ linux/fs/aufs/debug.h 2021-12-03 15:38:59.933313976 +0100 ++++ linux/fs/aufs/debug.h 2022-03-21 14:49:05.719966344 +0100 @@ -0,0 +1,226 @@ +/* SPDX-License-Identifier: GPL-2.0 */ +/* @@ -7937,8 +7937,8 @@ diff -urN /usr/share/empty/fs/aufs/debug.h linux/fs/aufs/debug.h +#endif /* __AUFS_DEBUG_H__ */ diff -urN /usr/share/empty/fs/aufs/dentry.c linux/fs/aufs/dentry.c --- /usr/share/empty/fs/aufs/dentry.c 1970-01-01 01:00:00.000000000 +0100 -+++ linux/fs/aufs/dentry.c 2021-12-03 15:40:58.233313963 +0100 -@@ -0,0 +1,1169 @@ ++++ linux/fs/aufs/dentry.c 2022-03-21 14:49:05.719966344 +0100 +@@ -0,0 +1,1168 @@ +// SPDX-License-Identifier: GPL-2.0 +/* + * Copyright (C) 2005-2021 Junjiro R. Okajima @@ -7962,7 +7962,6 @@ diff -urN /usr/share/empty/fs/aufs/dentry.c linux/fs/aufs/dentry.c + */ + +#include -+#include +#include "aufs.h" + +/* @@ -9110,7 +9109,7 @@ diff -urN /usr/share/empty/fs/aufs/dentry.c linux/fs/aufs/dentry.c +}; diff -urN /usr/share/empty/fs/aufs/dentry.h linux/fs/aufs/dentry.h --- /usr/share/empty/fs/aufs/dentry.h 1970-01-01 01:00:00.000000000 +0100 -+++ linux/fs/aufs/dentry.h 2021-12-03 15:40:58.233313963 +0100 ++++ linux/fs/aufs/dentry.h 2022-03-21 14:49:05.719966344 +0100 @@ -0,0 +1,269 @@ +/* SPDX-License-Identifier: GPL-2.0 */ +/* @@ -9383,7 +9382,7 @@ diff -urN /usr/share/empty/fs/aufs/dentry.h linux/fs/aufs/dentry.h +#endif /* __AUFS_DENTRY_H__ */ diff -urN /usr/share/empty/fs/aufs/dinfo.c linux/fs/aufs/dinfo.c --- /usr/share/empty/fs/aufs/dinfo.c 1970-01-01 01:00:00.000000000 +0100 -+++ linux/fs/aufs/dinfo.c 2021-12-03 15:38:59.933313976 +0100 ++++ linux/fs/aufs/dinfo.c 2022-03-21 14:49:05.719966344 +0100 @@ -0,0 +1,554 @@ +// SPDX-License-Identifier: GPL-2.0 +/* @@ -9941,7 +9940,7 @@ diff -urN /usr/share/empty/fs/aufs/dinfo.c linux/fs/aufs/dinfo.c +} diff -urN /usr/share/empty/fs/aufs/dir.c linux/fs/aufs/dir.c --- /usr/share/empty/fs/aufs/dir.c 1970-01-01 01:00:00.000000000 +0100 -+++ linux/fs/aufs/dir.c 2021-12-03 15:40:58.233313963 +0100 ++++ linux/fs/aufs/dir.c 2022-03-21 14:49:05.719966344 +0100 @@ -0,0 +1,765 @@ +// SPDX-License-Identifier: GPL-2.0 +/* @@ -10710,7 +10709,7 @@ diff -urN /usr/share/empty/fs/aufs/dir.c linux/fs/aufs/dir.c +}; diff -urN /usr/share/empty/fs/aufs/dir.h linux/fs/aufs/dir.h --- /usr/share/empty/fs/aufs/dir.h 1970-01-01 01:00:00.000000000 +0100 -+++ linux/fs/aufs/dir.h 2021-12-03 15:38:59.933313976 +0100 ++++ linux/fs/aufs/dir.h 2022-03-21 14:49:05.719966344 +0100 @@ -0,0 +1,134 @@ +/* SPDX-License-Identifier: GPL-2.0 */ +/* @@ -10848,7 +10847,7 @@ diff -urN /usr/share/empty/fs/aufs/dir.h linux/fs/aufs/dir.h +#endif /* __AUFS_DIR_H__ */ diff -urN /usr/share/empty/fs/aufs/dirren.c linux/fs/aufs/dirren.c --- /usr/share/empty/fs/aufs/dirren.c 1970-01-01 01:00:00.000000000 +0100 -+++ linux/fs/aufs/dirren.c 2021-12-03 15:38:59.933313976 +0100 ++++ linux/fs/aufs/dirren.c 2022-03-21 14:49:05.723299677 +0100 @@ -0,0 +1,1315 @@ +// SPDX-License-Identifier: GPL-2.0 +/* @@ -12167,7 +12166,7 @@ diff -urN /usr/share/empty/fs/aufs/dirren.c linux/fs/aufs/dirren.c +} diff -urN /usr/share/empty/fs/aufs/dirren.h linux/fs/aufs/dirren.h --- /usr/share/empty/fs/aufs/dirren.h 1970-01-01 01:00:00.000000000 +0100 -+++ linux/fs/aufs/dirren.h 2021-12-03 15:38:59.933313976 +0100 ++++ linux/fs/aufs/dirren.h 2022-03-21 14:49:05.723299677 +0100 @@ -0,0 +1,140 @@ +/* SPDX-License-Identifier: GPL-2.0 */ +/* @@ -12311,7 +12310,7 @@ diff -urN /usr/share/empty/fs/aufs/dirren.h linux/fs/aufs/dirren.h +#endif /* __AUFS_DIRREN_H__ */ diff -urN /usr/share/empty/fs/aufs/dynop.c linux/fs/aufs/dynop.c --- /usr/share/empty/fs/aufs/dynop.c 1970-01-01 01:00:00.000000000 +0100 -+++ linux/fs/aufs/dynop.c 2021-12-03 15:38:59.933313976 +0100 ++++ linux/fs/aufs/dynop.c 2022-03-21 14:49:05.723299677 +0100 @@ -0,0 +1,368 @@ +// SPDX-License-Identifier: GPL-2.0 +/* @@ -12683,7 +12682,7 @@ diff -urN /usr/share/empty/fs/aufs/dynop.c linux/fs/aufs/dynop.c +} diff -urN /usr/share/empty/fs/aufs/dynop.h linux/fs/aufs/dynop.h --- /usr/share/empty/fs/aufs/dynop.h 1970-01-01 01:00:00.000000000 +0100 -+++ linux/fs/aufs/dynop.h 2021-12-03 15:38:59.933313976 +0100 ++++ linux/fs/aufs/dynop.h 2022-03-21 14:49:05.723299677 +0100 @@ -0,0 +1,77 @@ +/* SPDX-License-Identifier: GPL-2.0 */ +/* @@ -12764,8 +12763,8 @@ diff -urN /usr/share/empty/fs/aufs/dynop.h linux/fs/aufs/dynop.h +#endif /* __AUFS_DYNOP_H__ */ diff -urN /usr/share/empty/fs/aufs/export.c linux/fs/aufs/export.c --- /usr/share/empty/fs/aufs/export.c 1970-01-01 01:00:00.000000000 +0100 -+++ linux/fs/aufs/export.c 2021-12-03 15:40:58.233313963 +0100 -@@ -0,0 +1,831 @@ ++++ linux/fs/aufs/export.c 2022-03-21 14:49:05.723299677 +0100 +@@ -0,0 +1,830 @@ +// SPDX-License-Identifier: GPL-2.0 +/* + * Copyright (C) 2005-2021 Junjiro R. Okajima @@ -12790,7 +12789,6 @@ diff -urN /usr/share/empty/fs/aufs/export.c linux/fs/aufs/export.c + +#include +#include -+#include +#include +#include +#include @@ -13599,7 +13597,7 @@ diff -urN /usr/share/empty/fs/aufs/export.c linux/fs/aufs/export.c +} diff -urN /usr/share/empty/fs/aufs/fhsm.c linux/fs/aufs/fhsm.c --- /usr/share/empty/fs/aufs/fhsm.c 1970-01-01 01:00:00.000000000 +0100 -+++ linux/fs/aufs/fhsm.c 2021-12-03 15:38:59.933313976 +0100 ++++ linux/fs/aufs/fhsm.c 2022-03-21 14:49:05.723299677 +0100 @@ -0,0 +1,427 @@ +// SPDX-License-Identifier: GPL-2.0 +/* @@ -14030,7 +14028,7 @@ diff -urN /usr/share/empty/fs/aufs/fhsm.c linux/fs/aufs/fhsm.c +} diff -urN /usr/share/empty/fs/aufs/file.c linux/fs/aufs/file.c --- /usr/share/empty/fs/aufs/file.c 1970-01-01 01:00:00.000000000 +0100 -+++ linux/fs/aufs/file.c 2021-12-03 15:38:59.936647310 +0100 ++++ linux/fs/aufs/file.c 2022-03-21 14:49:05.723299677 +0100 @@ -0,0 +1,863 @@ +// SPDX-License-Identifier: GPL-2.0 +/* @@ -14897,7 +14895,7 @@ diff -urN /usr/share/empty/fs/aufs/file.c linux/fs/aufs/file.c +}; diff -urN /usr/share/empty/fs/aufs/file.h linux/fs/aufs/file.h --- /usr/share/empty/fs/aufs/file.h 1970-01-01 01:00:00.000000000 +0100 -+++ linux/fs/aufs/file.h 2021-12-03 15:38:59.936647310 +0100 ++++ linux/fs/aufs/file.h 2022-03-21 14:49:05.723299677 +0100 @@ -0,0 +1,342 @@ +/* SPDX-License-Identifier: GPL-2.0 */ +/* @@ -15243,7 +15241,7 @@ diff -urN /usr/share/empty/fs/aufs/file.h linux/fs/aufs/file.h +#endif /* __AUFS_FILE_H__ */ diff -urN /usr/share/empty/fs/aufs/finfo.c linux/fs/aufs/finfo.c --- /usr/share/empty/fs/aufs/finfo.c 1970-01-01 01:00:00.000000000 +0100 -+++ linux/fs/aufs/finfo.c 2021-12-03 15:38:59.936647310 +0100 ++++ linux/fs/aufs/finfo.c 2022-03-21 14:49:05.723299677 +0100 @@ -0,0 +1,149 @@ +// SPDX-License-Identifier: GPL-2.0 +/* @@ -15396,7 +15394,7 @@ diff -urN /usr/share/empty/fs/aufs/finfo.c linux/fs/aufs/finfo.c +} diff -urN /usr/share/empty/fs/aufs/f_op.c linux/fs/aufs/f_op.c --- /usr/share/empty/fs/aufs/f_op.c 1970-01-01 01:00:00.000000000 +0100 -+++ linux/fs/aufs/f_op.c 2021-12-03 15:38:59.933313976 +0100 ++++ linux/fs/aufs/f_op.c 2022-03-21 14:49:05.723299677 +0100 @@ -0,0 +1,771 @@ +// SPDX-License-Identifier: GPL-2.0 +/* @@ -15908,270 +15906,1516 @@ diff -urN /usr/share/empty/fs/aufs/f_op.c linux/fs/aufs/f_op.c + } + } + -+ err = -EXDEV; -+ a_src.h_sb = file_inode(a_src.h_file)->i_sb; -+ a_dst.h_sb = file_inode(a_dst.h_file)->i_sb; -+ if (unlikely(a_src.h_sb != a_dst.h_sb)) { -+ AuDbgFile(src); -+ AuDbgFile(dst); -+ goto out_file; ++ err = -EXDEV; ++ a_src.h_sb = file_inode(a_src.h_file)->i_sb; ++ a_dst.h_sb = file_inode(a_dst.h_file)->i_sb; ++ if (unlikely(a_src.h_sb != a_dst.h_sb)) { ++ AuDbgFile(src); ++ AuDbgFile(dst); ++ goto out_file; ++ } ++ ++ err = vfsub_copy_file_range(a_src.h_file, src_pos, a_dst.h_file, ++ dst_pos, len, flags); ++ ++out_file: ++ au_write_post(a_dst.inode, a_dst.h_file, &wpre, err); ++ fi_read_unlock(src); ++ au_read_post(a_src.inode, a_src.h_file); ++out_si: ++ si_read_unlock(a_dst.inode->i_sb); ++ inode_unlock(a_dst.inode); ++out: ++ return err; ++#undef a_src ++#undef a_dst ++} ++ ++/* ---------------------------------------------------------------------- */ ++ ++/* ++ * The locking order around current->mmap_sem. ++ * - in most and regular cases ++ * file I/O syscall -- aufs_read() or something ++ * -- si_rwsem for read -- mmap_sem ++ * (Note that [fdi]i_rwsem are released before mmap_sem). ++ * - in mmap case ++ * mmap(2) -- mmap_sem -- aufs_mmap() -- si_rwsem for read -- [fdi]i_rwsem ++ * This AB-BA order is definitely bad, but is not a problem since "si_rwsem for ++ * read" allows multiple processes to acquire it and [fdi]i_rwsem are not held ++ * in file I/O. Aufs needs to stop lockdep in aufs_mmap() though. ++ * It means that when aufs acquires si_rwsem for write, the process should never ++ * acquire mmap_sem. ++ * ++ * Actually aufs_iterate() holds [fdi]i_rwsem before mmap_sem, but this is not a ++ * problem either since any directory is not able to be mmap-ed. ++ * The similar scenario is applied to aufs_readlink() too. ++ */ ++ ++#if 0 /* stop calling security_file_mmap() */ ++/* cf. linux/include/linux/mman.h: calc_vm_prot_bits() */ ++#define AuConv_VM_PROT(f, b) _calc_vm_trans(f, VM_##b, PROT_##b) ++ ++static unsigned long au_arch_prot_conv(unsigned long flags) ++{ ++ /* currently ppc64 only */ ++#ifdef CONFIG_PPC64 ++ /* cf. linux/arch/powerpc/include/asm/mman.h */ ++ AuDebugOn(arch_calc_vm_prot_bits(-1) != VM_SAO); ++ return AuConv_VM_PROT(flags, SAO); ++#else ++ AuDebugOn(arch_calc_vm_prot_bits(-1)); ++ return 0; ++#endif ++} ++ ++static unsigned long au_prot_conv(unsigned long flags) ++{ ++ return AuConv_VM_PROT(flags, READ) ++ | AuConv_VM_PROT(flags, WRITE) ++ | AuConv_VM_PROT(flags, EXEC) ++ | au_arch_prot_conv(flags); ++} ++ ++/* cf. linux/include/linux/mman.h: calc_vm_flag_bits() */ ++#define AuConv_VM_MAP(f, b) _calc_vm_trans(f, VM_##b, MAP_##b) ++ ++static unsigned long au_flag_conv(unsigned long flags) ++{ ++ return AuConv_VM_MAP(flags, GROWSDOWN) ++ | AuConv_VM_MAP(flags, DENYWRITE) ++ | AuConv_VM_MAP(flags, LOCKED); ++} ++#endif ++ ++static int aufs_mmap(struct file *file, struct vm_area_struct *vma) ++{ ++ int err; ++ const unsigned char wlock ++ = (file->f_mode & FMODE_WRITE) && (vma->vm_flags & VM_SHARED); ++ struct super_block *sb; ++ struct file *h_file; ++ struct inode *inode; ++ ++ AuDbgVmRegion(file, vma); ++ ++ inode = file_inode(file); ++ sb = inode->i_sb; ++ lockdep_off(); ++ si_read_lock(sb, AuLock_NOPLMW); ++ ++ h_file = au_write_pre(file, wlock, /*wpre*/NULL); ++ lockdep_on(); ++ err = PTR_ERR(h_file); ++ if (IS_ERR(h_file)) ++ goto out; ++ ++ err = 0; ++ au_set_mmapped(file); ++ au_vm_file_reset(vma, h_file); ++ /* ++ * we cannot call security_mmap_file() here since it may acquire ++ * mmap_sem or i_mutex. ++ * ++ * err = security_mmap_file(h_file, au_prot_conv(vma->vm_flags), ++ * au_flag_conv(vma->vm_flags)); ++ */ ++ if (!err) ++ err = call_mmap(h_file, vma); ++ if (!err) { ++ au_vm_prfile_set(vma, file); ++ fsstack_copy_attr_atime(inode, file_inode(h_file)); ++ goto out_fput; /* success */ ++ } ++ au_unset_mmapped(file); ++ au_vm_file_reset(vma, file); ++ ++out_fput: ++ lockdep_off(); ++ ii_write_unlock(inode); ++ lockdep_on(); ++ fput(h_file); ++out: ++ lockdep_off(); ++ si_read_unlock(sb); ++ lockdep_on(); ++ AuTraceErr(err); ++ return err; ++} ++ ++/* ---------------------------------------------------------------------- */ ++ ++static int aufs_fsync_nondir(struct file *file, loff_t start, loff_t end, ++ int datasync) ++{ ++ int err; ++ struct au_write_pre wpre; ++ struct inode *inode; ++ struct file *h_file; ++ ++ err = 0; /* -EBADF; */ /* posix? */ ++ if (unlikely(!(file->f_mode & FMODE_WRITE))) ++ goto out; ++ ++ inode = file_inode(file); ++ au_mtx_and_read_lock(inode); ++ ++ wpre.lsc = 0; ++ h_file = au_write_pre(file, /*do_ready*/1, &wpre); ++ err = PTR_ERR(h_file); ++ if (IS_ERR(h_file)) ++ goto out_unlock; ++ ++ err = vfsub_fsync(h_file, &h_file->f_path, datasync); ++ au_write_post(inode, h_file, &wpre, /*written*/0); ++ ++out_unlock: ++ si_read_unlock(inode->i_sb); ++ inode_unlock(inode); ++out: ++ return err; ++} ++ ++static int aufs_fasync(int fd, struct file *file, int flag) ++{ ++ int err; ++ struct file *h_file; ++ struct super_block *sb; ++ ++ sb = file->f_path.dentry->d_sb; ++ si_read_lock(sb, AuLock_FLUSH | AuLock_NOPLMW); ++ ++ h_file = au_read_pre(file, /*keep_fi*/0, /*lsc*/0); ++ err = PTR_ERR(h_file); ++ if (IS_ERR(h_file)) ++ goto out; ++ ++ if (h_file->f_op->fasync) ++ err = h_file->f_op->fasync(fd, h_file, flag); ++ fput(h_file); /* instead of au_read_post() */ ++ ++out: ++ si_read_unlock(sb); ++ return err; ++} ++ ++static int aufs_setfl(struct file *file, unsigned long arg) ++{ ++ int err; ++ struct file *h_file; ++ struct super_block *sb; ++ ++ sb = file->f_path.dentry->d_sb; ++ si_read_lock(sb, AuLock_FLUSH | AuLock_NOPLMW); ++ ++ h_file = au_read_pre(file, /*keep_fi*/0, /*lsc*/0); ++ err = PTR_ERR(h_file); ++ if (IS_ERR(h_file)) ++ goto out; ++ ++ /* stop calling h_file->fasync */ ++ arg |= vfsub_file_flags(file) & FASYNC; ++ err = setfl(/*unused fd*/-1, h_file, arg); ++ fput(h_file); /* instead of au_read_post() */ ++ ++out: ++ si_read_unlock(sb); ++ return err; ++} ++ ++/* ---------------------------------------------------------------------- */ ++ ++/* no one supports this operation, currently */ ++#if 0 /* reserved for future use */ ++static ssize_t aufs_sendpage(struct file *file, struct page *page, int offset, ++ size_t len, loff_t *pos, int more) ++{ ++} ++#endif ++ ++/* ---------------------------------------------------------------------- */ ++ ++const struct file_operations aufs_file_fop = { ++ .owner = THIS_MODULE, ++ ++ .llseek = default_llseek, ++ ++ .read_iter = aufs_read_iter, ++ .write_iter = aufs_write_iter, ++ ++#ifdef CONFIG_AUFS_POLL ++ .poll = aufs_poll, ++#endif ++ .unlocked_ioctl = aufs_ioctl_nondir, ++#ifdef CONFIG_COMPAT ++ .compat_ioctl = aufs_compat_ioctl_nondir, ++#endif ++ .mmap = aufs_mmap, ++ .open = aufs_open_nondir, ++ .flush = aufs_flush_nondir, ++ .release = aufs_release_nondir, ++ .fsync = aufs_fsync_nondir, ++ .fasync = aufs_fasync, ++ /* .sendpage = aufs_sendpage, */ ++ .setfl = aufs_setfl, ++ .splice_write = aufs_splice_write, ++ .splice_read = aufs_splice_read, ++#if 0 /* reserved for future use */ ++ .aio_splice_write = aufs_aio_splice_write, ++ .aio_splice_read = aufs_aio_splice_read, ++#endif ++ .fallocate = aufs_fallocate, ++ .copy_file_range = aufs_copy_file_range ++}; +diff -urN /usr/share/empty/fs/aufs/fsctx.c linux/fs/aufs/fsctx.c +--- /usr/share/empty/fs/aufs/fsctx.c 1970-01-01 01:00:00.000000000 +0100 ++++ linux/fs/aufs/fsctx.c 2022-03-21 14:49:05.723299677 +0100 +@@ -0,0 +1,1242 @@ ++// SPDX-License-Identifier: GPL-2.0 ++/* ++ * Copyright (C) 2022 Junjiro R. Okajima ++ * ++ * This program, aufs is free software; you can redistribute it and/or modify ++ * it under the terms of the GNU General Public License as published by ++ * the Free Software Foundation; either version 2 of the License, or ++ * (at your option) any later version. ++ * ++ * This program is distributed in the hope that it will be useful, ++ * but WITHOUT ANY WARRANTY; without even the implied warranty of ++ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the ++ * GNU General Public License for more details. ++ * ++ * You should have received a copy of the GNU General Public License ++ * along with this program. If not, see . ++ */ ++ ++/* ++ * fs context, aka new mount api ++ */ ++ ++#include ++#include "aufs.h" ++ ++struct au_fsctx_opts { ++ aufs_bindex_t bindex; ++ unsigned char skipped; ++ struct au_opt *opt, *opt_tail; ++ struct super_block *sb; ++ struct au_sbinfo *sbinfo; ++ struct au_opts opts; ++}; ++ ++/* stop extra interpretation of errno in mount(8), and strange error messages */ ++static int cvt_err(int err) ++{ ++ AuTraceErr(err); ++ ++ switch (err) { ++ case -ENOENT: ++ case -ENOTDIR: ++ case -EEXIST: ++ case -EIO: ++ err = -EINVAL; ++ } ++ return err; ++} ++ ++static int au_fsctx_reconfigure(struct fs_context *fc) ++{ ++ int err, do_dx; ++ unsigned int mntflags; ++ struct dentry *root; ++ struct super_block *sb; ++ struct inode *inode; ++ struct au_fsctx_opts *a = fc->fs_private; ++ ++ AuDbg("fc %p\n", fc); ++ ++ root = fc->root; ++ sb = root->d_sb; ++ err = si_write_lock(sb, AuLock_FLUSH | AuLock_NOPLM); ++ if (!err) { ++ di_write_lock_child(root); ++ err = au_opts_verify(sb, fc->sb_flags, /*pending*/0); ++ aufs_write_unlock(root); ++ } ++ ++ inode = d_inode(root); ++ inode_lock(inode); ++ err = si_write_lock(sb, AuLock_FLUSH | AuLock_NOPLM); ++ if (unlikely(err)) ++ goto out; ++ di_write_lock_child(root); ++ ++ /* au_opts_remount() may return an error */ ++ err = au_opts_remount(sb, &a->opts); ++ ++ if (au_ftest_opts(a->opts.flags, REFRESH)) ++ au_remount_refresh(sb, au_ftest_opts(a->opts.flags, ++ REFRESH_IDOP)); ++ ++ if (au_ftest_opts(a->opts.flags, REFRESH_DYAOP)) { ++ mntflags = au_mntflags(sb); ++ do_dx = !!au_opt_test(mntflags, DIO); ++ au_dy_arefresh(do_dx); ++ } ++ ++ au_fhsm_wrote_all(sb, /*force*/1); /* ?? */ ++ aufs_write_unlock(root); ++ ++out: ++ inode_unlock(inode); ++ err = cvt_err(err); ++ AuTraceErr(err); ++ ++ return err; ++} ++ ++/* ---------------------------------------------------------------------- */ ++ ++static int au_fsctx_fill_super(struct super_block *sb, struct fs_context *fc) ++{ ++ int err; ++ struct au_fsctx_opts *a = fc->fs_private; ++ struct au_sbinfo *sbinfo = a->sbinfo; ++ struct dentry *root; ++ struct inode *inode; ++ ++ sbinfo->si_sb = sb; ++ sb->s_fs_info = sbinfo; ++ kobject_get(&sbinfo->si_kobj); ++ ++ __si_write_lock(sb); ++ si_pid_set(sb); ++ au_sbilist_add(sb); ++ ++ /* all timestamps always follow the ones on the branch */ ++ sb->s_flags |= SB_NOATIME | SB_NODIRATIME; ++ sb->s_flags |= SB_I_VERSION; /* do we really need this? */ ++ sb->s_op = &aufs_sop; ++ sb->s_d_op = &aufs_dop; ++ sb->s_magic = AUFS_SUPER_MAGIC; ++ sb->s_maxbytes = 0; ++ sb->s_stack_depth = 1; ++ au_export_init(sb); ++ au_xattr_init(sb); ++ ++ err = au_alloc_root(sb); ++ if (unlikely(err)) { ++ si_write_unlock(sb); ++ goto out; ++ } ++ root = sb->s_root; ++ inode = d_inode(root); ++ ii_write_lock_parent(inode); ++ aufs_write_unlock(root); ++ ++ /* lock vfs_inode first, then aufs. */ ++ inode_lock(inode); ++ aufs_write_lock(root); ++ err = au_opts_mount(sb, &a->opts); ++ AuTraceErr(err); ++ if (!err && au_ftest_si(sbinfo, NO_DREVAL)) { ++ sb->s_d_op = &aufs_dop_noreval; ++ /* infofc(fc, "%ps", sb->s_d_op); */ ++ pr_info("%ps\n", sb->s_d_op); ++ au_refresh_dop(root, /*force_reval*/0); ++ sbinfo->si_iop_array = aufs_iop_nogetattr; ++ au_refresh_iop(inode, /*force_getattr*/0); ++ } ++ aufs_write_unlock(root); ++ inode_unlock(inode); ++ if (!err) ++ goto out; /* success */ ++ ++ dput(root); ++ sb->s_root = NULL; ++ ++out: ++ if (unlikely(err)) ++ kobject_put(&sbinfo->si_kobj); ++ AuTraceErr(err); ++ err = cvt_err(err); ++ AuTraceErr(err); ++ return err; ++} ++ ++static int au_fsctx_get_tree(struct fs_context *fc) ++{ ++ int err; ++ ++ AuDbg("fc %p\n", fc); ++ err = get_tree_nodev(fc, au_fsctx_fill_super); ++ ++ AuTraceErr(err); ++ return err; ++} ++ ++/* ---------------------------------------------------------------------- */ ++ ++static void au_fsctx_dump(struct au_opts *opts) ++{ ++#ifdef CONFIG_AUFS_DEBUG ++ /* reduce stack space */ ++ union { ++ struct au_opt_add *add; ++ struct au_opt_del *del; ++ struct au_opt_mod *mod; ++ struct au_opt_xino *xino; ++ struct au_opt_xino_itrunc *xino_itrunc; ++ struct au_opt_wbr_create *create; ++ } u; ++ struct au_opt *opt; ++ ++ opt = opts->opt; ++ while (opt->type != Opt_tail) { ++ switch (opt->type) { ++ case Opt_add: ++ u.add = &opt->add; ++ AuDbg("add {b%d, %s, 0x%x, %p}\n", ++ u.add->bindex, u.add->pathname, u.add->perm, ++ u.add->path.dentry); ++ break; ++ case Opt_del: ++ fallthrough; ++ case Opt_idel: ++ u.del = &opt->del; ++ AuDbg("del {%s, %p}\n", ++ u.del->pathname, u.del->h_path.dentry); ++ break; ++ case Opt_mod: ++ fallthrough; ++ case Opt_imod: ++ u.mod = &opt->mod; ++ AuDbg("mod {%s, 0x%x, %p}\n", ++ u.mod->path, u.mod->perm, u.mod->h_root); ++ break; ++ case Opt_append: ++ u.add = &opt->add; ++ AuDbg("append {b%d, %s, 0x%x, %p}\n", ++ u.add->bindex, u.add->pathname, u.add->perm, ++ u.add->path.dentry); ++ break; ++ case Opt_prepend: ++ u.add = &opt->add; ++ AuDbg("prepend {b%d, %s, 0x%x, %p}\n", ++ u.add->bindex, u.add->pathname, u.add->perm, ++ u.add->path.dentry); ++ break; ++ ++ case Opt_dirwh: ++ AuDbg("dirwh %d\n", opt->dirwh); ++ break; ++ case Opt_rdcache: ++ AuDbg("rdcache %d\n", opt->rdcache); ++ break; ++ case Opt_rdblk: ++ AuDbg("rdblk %d\n", opt->rdblk); ++ break; ++ case Opt_rdhash: ++ AuDbg("rdhash %u\n", opt->rdhash); ++ break; ++ ++ case Opt_xino: ++ u.xino = &opt->xino; ++ AuDbg("xino {%s %pD}\n", u.xino->path, u.xino->file); ++ break; ++ ++#define au_fsctx_TF(name) \ ++ case Opt_##name: \ ++ if (opt->tf) \ ++ AuLabel(name); \ ++ else \ ++ AuLabel(no##name); \ ++ break; ++ ++ /* simple true/false flag */ ++ au_fsctx_TF(trunc_xino); ++ au_fsctx_TF(trunc_xib); ++ au_fsctx_TF(dirperm1); ++ au_fsctx_TF(plink); ++ au_fsctx_TF(shwh); ++ au_fsctx_TF(dio); ++ au_fsctx_TF(warn_perm); ++ au_fsctx_TF(verbose); ++ au_fsctx_TF(sum); ++ au_fsctx_TF(dirren); ++ au_fsctx_TF(acl); ++#undef au_fsctx_TF ++ ++ case Opt_trunc_xino_path: ++ fallthrough; ++ case Opt_itrunc_xino: ++ u.xino_itrunc = &opt->xino_itrunc; ++ AuDbg("trunc_xino %d\n", u.xino_itrunc->bindex); ++ break; ++ case Opt_noxino: ++ AuLabel(noxino); ++ break; ++ ++ case Opt_list_plink: ++ AuLabel(list_plink); ++ break; ++ case Opt_udba: ++ AuDbg("udba %d, %s\n", ++ opt->udba, au_optstr_udba(opt->udba)); ++ break; ++ case Opt_diropq_a: ++ AuLabel(diropq_a); ++ break; ++ case Opt_diropq_w: ++ AuLabel(diropq_w); ++ break; ++ case Opt_wsum: ++ AuLabel(wsum); ++ break; ++ case Opt_wbr_create: ++ u.create = &opt->wbr_create; ++ AuDbg("create %d, %s\n", u.create->wbr_create, ++ au_optstr_wbr_create(u.create->wbr_create)); ++ switch (u.create->wbr_create) { ++ case AuWbrCreate_MFSV: ++ fallthrough; ++ case AuWbrCreate_PMFSV: ++ AuDbg("%d sec\n", u.create->mfs_second); ++ break; ++ case AuWbrCreate_MFSRR: ++ fallthrough; ++ case AuWbrCreate_TDMFS: ++ AuDbg("%llu watermark\n", ++ u.create->mfsrr_watermark); ++ break; ++ case AuWbrCreate_MFSRRV: ++ fallthrough; ++ case AuWbrCreate_TDMFSV: ++ fallthrough; ++ case AuWbrCreate_PMFSRRV: ++ AuDbg("%llu watermark, %d sec\n", ++ u.create->mfsrr_watermark, ++ u.create->mfs_second); ++ break; ++ } ++ break; ++ case Opt_wbr_copyup: ++ AuDbg("copyup %d, %s\n", opt->wbr_copyup, ++ au_optstr_wbr_copyup(opt->wbr_copyup)); ++ break; ++ case Opt_fhsm_sec: ++ AuDbg("fhsm_sec %u\n", opt->fhsm_second); ++ break; ++ ++ default: ++ AuDbg("type %d\n", opt->type); ++ BUG(); ++ } ++ opt++; ++ } ++#endif ++} ++ ++/* ---------------------------------------------------------------------- */ ++ ++/* ++ * For conditionally compiled mount options. ++ * Instead of fsparam_flag_no(), use this macro to distinguish ignore_silent. ++ */ ++#define au_ignore_flag(name, action) \ ++ fsparam_flag(name, action), \ ++ fsparam_flag("no" name, Opt_ignore_silent) ++ ++const struct fs_parameter_spec aufs_fsctx_paramspec[] = { ++ fsparam_string("br", Opt_br), ++ ++ /* "add=%d:%s" or "ins=%d:%s" */ ++ fsparam_string("add", Opt_add), ++ fsparam_string("ins", Opt_add), ++ fsparam_path("append", Opt_append), ++ fsparam_path("prepend", Opt_prepend), ++ ++ fsparam_path("del", Opt_del), ++ /* fsparam_s32("idel", Opt_idel), */ ++ fsparam_path("mod", Opt_mod), ++ /* fsparam_string("imod", Opt_imod), */ ++ ++ fsparam_s32("dirwh", Opt_dirwh), ++ ++ fsparam_path("xino", Opt_xino), ++ fsparam_flag("noxino", Opt_noxino), ++ fsparam_flag_no("trunc_xino", Opt_trunc_xino), ++ /* "trunc_xino_v=%d:%d" */ ++ /* fsparam_string("trunc_xino_v", Opt_trunc_xino_v), */ ++ fsparam_path("trunc_xino", Opt_trunc_xino_path), ++ fsparam_s32("itrunc_xino", Opt_itrunc_xino), ++ /* fsparam_path("zxino", Opt_zxino), */ ++ fsparam_flag_no("trunc_xib", Opt_trunc_xib), ++ ++#ifdef CONFIG_PROC_FS ++ fsparam_flag_no("plink", Opt_plink), ++#else ++ au_ignore_flag("plink", Opt_ignore), ++#endif ++ ++#ifdef CONFIG_AUFS_DEBUG ++ fsparam_flag("list_plink", Opt_list_plink), ++#endif ++ ++ fsparam_string("udba", Opt_udba), ++ ++ fsparam_flag_no("dio", Opt_dio), ++ ++#ifdef CONFIG_AUFS_DIRREN ++ fsparam_flag_no("dirren", Opt_dirren), ++#else ++ au_ignore_flag("dirren", Opt_ignore), ++#endif ++ ++#ifdef CONFIG_AUFS_FHSM ++ fsparam_s32("fhsm_sec", Opt_fhsm_sec), ++#else ++ fsparam_s32("fhsm_sec", Opt_ignore), ++#endif ++ ++ /* always | a | whiteouted | w */ ++ fsparam_string("diropq", Opt_diropq), ++ ++ fsparam_flag_no("warn_perm", Opt_warn_perm), ++ ++#ifdef CONFIG_AUFS_SHWH ++ fsparam_flag_no("shwh", Opt_shwh), ++#else ++ au_ignore_flag("shwh", Opt_err), ++#endif ++ ++ fsparam_flag_no("dirperm1", Opt_dirperm1), ++ ++ fsparam_flag_no("verbose", Opt_verbose), ++ fsparam_flag("v", Opt_verbose), ++ fsparam_flag("quiet", Opt_noverbose), ++ fsparam_flag("q", Opt_noverbose), ++ /* user-space may handle this */ ++ fsparam_flag("silent", Opt_noverbose), ++ ++ fsparam_flag_no("sum", Opt_sum), ++ fsparam_flag("wsum", Opt_wsum), ++ ++ fsparam_s32("rdcache", Opt_rdcache), ++ /* "def" or s32 */ ++ fsparam_string("rdblk", Opt_rdblk), ++ /* "def" or s32 */ ++ fsparam_string("rdhash", Opt_rdhash), ++ ++ fsparam_string("create", Opt_wbr_create), ++ fsparam_string("create_policy", Opt_wbr_create), ++ fsparam_string("cpup", Opt_wbr_copyup), ++ fsparam_string("copyup", Opt_wbr_copyup), ++ fsparam_string("copyup_policy", Opt_wbr_copyup), ++ ++ /* generic VFS flag */ ++#ifdef CONFIG_FS_POSIX_ACL ++ fsparam_flag_no("acl", Opt_acl), ++#else ++ au_ignore_flag("acl"), ++#endif ++ ++ /* internal use for the scripts */ ++ fsparam_string("si", Opt_ignore_silent), ++ ++ /* obsoleted, keep them temporary */ ++ fsparam_flag("nodlgt", Opt_ignore_silent), ++ fsparam_flag("clean_plink", Opt_ignore), ++ fsparam_string("dirs", Opt_br), ++ fsparam_u32("debug", Opt_ignore), ++ /* "whiteout" or "all" */ ++ fsparam_string("delete", Opt_ignore), ++ fsparam_string("imap", Opt_ignore), ++ ++ /* temporary workaround, due to old mount(8)? */ ++ fsparam_flag("relatime", Opt_ignore_silent), ++ ++ {} ++}; ++ ++static int au_fsctx_parse_do_add(struct fs_context *fc, struct au_opt *opt, ++ char *brspec, size_t speclen, ++ aufs_bindex_t bindex) ++{ ++ int err; ++ char *p; ++ ++ AuDbg("brspec %s\n", brspec); ++ ++ err = -ENOMEM; ++ if (!speclen) ++ speclen = strlen(brspec); ++ /* will be freed by au_fsctx_free() */ ++ p = kmemdup_nul(brspec, speclen, GFP_NOFS); ++ if (unlikely(!p)) { ++ errorfc(fc, "failed in %s", brspec); ++ goto out; ++ } ++ err = au_opt_add(opt, p, fc->sb_flags, bindex); ++ ++out: ++ AuTraceErr(err); ++ return err; ++} ++ ++static int au_fsctx_parse_br(struct fs_context *fc, char *brspec) ++{ ++ int err; ++ char *p; ++ struct au_fsctx_opts *a = fc->fs_private; ++ struct au_opt *opt = a->opt; ++ aufs_bindex_t bindex = a->bindex; ++ ++ AuDbg("brspec %s\n", brspec); ++ ++ err = -EINVAL; ++ while ((p = strsep(&brspec, ":")) && *p) { ++ err = au_fsctx_parse_do_add(fc, opt, p, /*len*/0, bindex); ++ AuTraceErr(err); ++ if (unlikely(err)) ++ break; ++ bindex++; ++ opt++; ++ if (unlikely(opt > a->opt_tail)) { ++ err = -E2BIG; ++ bindex--; ++ opt--; ++ break; ++ } ++ opt->type = Opt_tail; ++ a->skipped = 1; ++ } ++ a->bindex = bindex; ++ a->opt = opt; ++ ++ AuTraceErr(err); ++ return err; ++} ++ ++static int au_fsctx_parse_add(struct fs_context *fc, char *addspec) ++{ ++ int err, n; ++ char *p; ++ struct au_fsctx_opts *a = fc->fs_private; ++ struct au_opt *opt = a->opt; ++ ++ err = -EINVAL; ++ p = strchr(addspec, ':'); ++ if (unlikely(!p)) { ++ errorfc(fc, "bad arg in %s", addspec); ++ goto out; ++ } ++ *p++ = '\0'; ++ err = kstrtoint(addspec, 0, &n); ++ if (unlikely(err)) { ++ errorfc(fc, "bad integer in %s", addspec); ++ goto out; ++ } ++ AuDbg("n %d\n", n); ++ err = au_fsctx_parse_do_add(fc, opt, p, /*len*/0, n); ++ ++out: ++ AuTraceErr(err); ++ return err; ++} ++ ++static int au_fsctx_parse_del(struct fs_context *fc, struct au_opt_del *del, ++ struct fs_parameter *param) ++{ ++ int err; ++ ++ err = -ENOMEM; ++ /* will be freed by au_fsctx_free() */ ++ del->pathname = kmemdup_nul(param->string, param->size, GFP_NOFS); ++ if (unlikely(!del->pathname)) ++ goto out; ++ AuDbg("del %s\n", del->pathname); ++ err = vfsub_kern_path(del->pathname, AuOpt_LkupDirFlags, &del->h_path); ++ if (unlikely(err)) ++ errorfc(fc, "lookup failed %s (%d)", del->pathname, err); ++ ++out: ++ AuTraceErr(err); ++ return err; ++} ++ ++#if 0 /* reserved for future use */ ++static int au_fsctx_parse_idel(struct fs_context *fc, struct au_opt_del *del, ++ aufs_bindex_t bindex) ++{ ++ int err; ++ struct super_block *sb; ++ struct dentry *root; ++ struct au_fsctx_opts *a = fc->fs_private; ++ ++ sb = a->sb; ++ AuDebugOn(!sb); ++ ++ err = -EINVAL; ++ root = sb->s_root; ++ aufs_read_lock(root, AuLock_FLUSH); ++ if (bindex < 0 || au_sbbot(sb) < bindex) { ++ errorfc(fc, "out of bounds, %d", bindex); ++ goto out; ++ } ++ ++ err = 0; ++ del->h_path.dentry = dget(au_h_dptr(root, bindex)); ++ del->h_path.mnt = mntget(au_sbr_mnt(sb, bindex)); ++ ++out: ++ aufs_read_unlock(root, !AuLock_IR); ++ AuTraceErr(err); ++ return err; ++} ++#endif ++ ++static int au_fsctx_parse_mod(struct fs_context *fc, struct au_opt_mod *mod, ++ struct fs_parameter *param) ++{ ++ int err; ++ struct path path; ++ char *p; ++ ++ err = -ENOMEM; ++ /* will be freed by au_fsctx_free() */ ++ mod->path = kmemdup_nul(param->string, param->size, GFP_NOFS); ++ if (unlikely(!mod->path)) ++ goto out; ++ ++ err = -EINVAL; ++ p = strchr(mod->path, '='); ++ if (unlikely(!p)) { ++ errorfc(fc, "no permission %s", mod->path); ++ goto out; ++ } ++ ++ *p++ = 0; ++ err = vfsub_kern_path(mod->path, AuOpt_LkupDirFlags, &path); ++ if (unlikely(err)) { ++ errorfc(fc, "lookup failed %s (%d)", mod->path, err); ++ goto out; ++ } ++ ++ mod->perm = au_br_perm_val(p); ++ AuDbg("mod path %s, perm 0x%x, %s", mod->path, mod->perm, p); ++ mod->h_root = dget(path.dentry); ++ path_put(&path); ++ ++out: ++ AuTraceErr(err); ++ return err; ++} ++ ++#if 0 /* reserved for future use */ ++static int au_fsctx_parse_imod(struct fs_context *fc, struct au_opt_mod *mod, ++ char *ibrspec) ++{ ++ int err, n; ++ char *p; ++ struct super_block *sb; ++ struct dentry *root; ++ struct au_fsctx_opts *a = fc->fs_private; ++ ++ sb = a->sb; ++ AuDebugOn(!sb); ++ ++ err = -EINVAL; ++ p = strchr(ibrspec, ':'); ++ if (unlikely(!p)) { ++ errorfc(fc, "no index, %s", ibrspec); ++ goto out; ++ } ++ *p++ = '\0'; ++ err = kstrtoint(ibrspec, 0, &n); ++ if (unlikely(err)) { ++ errorfc(fc, "bad integer in %s", ibrspec); ++ goto out; ++ } ++ AuDbg("n %d\n", n); ++ ++ root = sb->s_root; ++ aufs_read_lock(root, AuLock_FLUSH); ++ if (n < 0 || au_sbbot(sb) < n) { ++ errorfc(fc, "out of bounds, %d", bindex); ++ goto out_root; ++ } ++ ++ err = 0; ++ mod->perm = au_br_perm_val(p); ++ AuDbg("mod path %s, perm 0x%x, %s\n", ++ mod->path, mod->perm, p); ++ mod->h_root = dget(au_h_dptr(root, bindex)); ++ ++out_root: ++ aufs_read_unlock(root, !AuLock_IR); ++out: ++ AuTraceErr(err); ++ return err; ++} ++#endif ++ ++static int au_fsctx_parse_xino(struct fs_context *fc, ++ struct au_opt_xino *xino, ++ struct fs_parameter *param) ++{ ++ int err; ++ struct au_fsctx_opts *a = fc->fs_private; ++ ++ err = -ENOMEM; ++ /* will be freed by au_opts_free() */ ++ xino->path = kmemdup_nul(param->string, param->size, GFP_NOFS); ++ if (unlikely(!xino->path)) ++ goto out; ++ AuDbg("path %s\n", xino->path); ++ ++ xino->file = au_xino_create(a->sb, xino->path, /*silent*/0, ++ /*wbrtop*/0); ++ err = PTR_ERR(xino->file); ++ if (IS_ERR(xino->file)) { ++ xino->file = NULL; ++ goto out; ++ } ++ ++ err = 0; ++ if (unlikely(a->sb && xino->file->f_path.dentry->d_sb == a->sb)) { ++ err = -EINVAL; ++ errorfc(fc, "%s must be outside", xino->path); ++ } ++ ++out: ++ AuTraceErr(err); ++ return err; ++} ++ ++static ++int au_fsctx_parse_xino_itrunc_path(struct fs_context *fc, ++ struct au_opt_xino_itrunc *xino_itrunc, ++ char *pathname) ++{ ++ int err; ++ aufs_bindex_t bbot, bindex; ++ struct path path; ++ struct dentry *root; ++ struct au_fsctx_opts *a = fc->fs_private; ++ ++ AuDebugOn(!a->sb); ++ ++ err = vfsub_kern_path(pathname, AuOpt_LkupDirFlags, &path); ++ if (unlikely(err)) { ++ errorfc(fc, "lookup failed %s (%d)", pathname, err); ++ goto out; ++ } ++ ++ xino_itrunc->bindex = -1; ++ root = a->sb->s_root; ++ aufs_read_lock(root, AuLock_FLUSH); ++ bbot = au_sbbot(a->sb); ++ for (bindex = 0; bindex <= bbot; bindex++) { ++ if (au_h_dptr(root, bindex) == path.dentry) { ++ xino_itrunc->bindex = bindex; ++ break; ++ } ++ } ++ aufs_read_unlock(root, !AuLock_IR); ++ path_put(&path); ++ ++ if (unlikely(xino_itrunc->bindex < 0)) { ++ err = -EINVAL; ++ errorfc(fc, "no such branch %s", pathname); ++ } ++ ++out: ++ AuTraceErr(err); ++ return err; ++} ++ ++static int au_fsctx_parse_xino_itrunc(struct fs_context *fc, ++ struct au_opt_xino_itrunc *xino_itrunc, ++ unsigned int bindex) ++{ ++ int err; ++ aufs_bindex_t bbot; ++ struct super_block *sb; ++ struct au_fsctx_opts *a = fc->fs_private; ++ ++ sb = a->sb; ++ AuDebugOn(!sb); ++ ++ err = 0; ++ si_noflush_read_lock(sb); ++ bbot = au_sbbot(sb); ++ si_read_unlock(sb); ++ if (bindex <= bbot) ++ xino_itrunc->bindex = bindex; ++ else { ++ err = -EINVAL; ++ errorfc(fc, "out of bounds, %u", bindex); ++ } ++ ++ AuTraceErr(err); ++ return err; ++} ++ ++static int au_fsctx_parse_param(struct fs_context *fc, struct fs_parameter *param) ++{ ++ int err, token; ++ struct fs_parse_result result; ++ struct au_fsctx_opts *a = fc->fs_private; ++ struct au_opt *opt = a->opt; ++ ++ AuDbg("fc %p, param {key %s, string %s}\n", ++ fc, param->key, param->string); ++ err = fs_parse(fc, aufs_fsctx_paramspec, param, &result); ++ if (unlikely(err < 0)) ++ goto out; ++ token = err; ++ AuDbg("token %d, res{negated %d, uint64 %llu}\n", ++ token, result.negated, result.uint_64); ++ ++ err = -EINVAL; ++ a->skipped = 0; ++ switch (token) { ++ case Opt_br: ++ err = au_fsctx_parse_br(fc, param->string); ++ break; ++ case Opt_add: ++ err = au_fsctx_parse_add(fc, param->string); ++ break; ++ case Opt_append: ++ err = au_fsctx_parse_do_add(fc, opt, param->string, param->size, ++ /*dummy bindex*/1); ++ break; ++ case Opt_prepend: ++ err = au_fsctx_parse_do_add(fc, opt, param->string, param->size, ++ /*bindex*/0); ++ break; ++ ++ case Opt_del: ++ err = au_fsctx_parse_del(fc, &opt->del, param); ++ break; ++#if 0 /* reserved for future use */ ++ case Opt_idel: ++ if (!a->sb) { ++ err = 0; ++ a->skipped = 1; ++ break; ++ } ++ del->pathname = "(indexed)"; ++ err = au_opts_parse_idel(fc, &opt->del, result.uint_32); ++ break; ++#endif ++ ++ case Opt_mod: ++ err = au_fsctx_parse_mod(fc, &opt->mod, param); ++ break; ++#ifdef IMOD /* reserved for future use */ ++ case Opt_imod: ++ if (!a->sb) { ++ err = 0; ++ a->skipped = 1; ++ break; ++ } ++ u.mod->path = "(indexed)"; ++ err = au_opts_parse_imod(fc, &opt->mod, param->string); ++ break; ++#endif ++ ++ case Opt_xino: ++ err = au_fsctx_parse_xino(fc, &opt->xino, param); ++ break; ++ case Opt_trunc_xino_path: ++ if (!a->sb) { ++ errorfc(fc, "no such branch %s", param->string); ++ break; ++ } ++ err = au_fsctx_parse_xino_itrunc_path(fc, &opt->xino_itrunc, ++ param->string); ++ break; ++#if 0 ++ case Opt_trunc_xino_v: ++ if (!a->sb) { ++ err = 0; ++ a->skipped = 1; ++ break; ++ } ++ err = au_fsctx_parse_xino_itrunc_path(fc, &opt->xino_itrunc, ++ param->string); ++ break; ++#endif ++ case Opt_itrunc_xino: ++ if (!a->sb) { ++ errorfc(fc, "out of bounds %s", param->string); ++ break; ++ } ++ err = au_fsctx_parse_xino_itrunc(fc, &opt->xino_itrunc, ++ result.int_32); ++ break; ++ ++ case Opt_dirwh: ++ err = 0; ++ opt->dirwh = result.int_32; ++ break; ++ ++ case Opt_rdcache: ++ if (unlikely(result.int_32 > AUFS_RDCACHE_MAX)) { ++ errorfc(fc, "rdcache must be smaller than %d", ++ AUFS_RDCACHE_MAX); ++ break; ++ } ++ err = 0; ++ opt->rdcache = result.int_32; ++ break; ++ ++ case Opt_rdblk: ++ err = 0; ++ opt->rdblk = AUFS_RDBLK_DEF; ++ if (!strcmp(param->string, "def")) ++ break; ++ ++ err = kstrtoint(param->string, 0, &result.int_32); ++ if (unlikely(err)) { ++ errorfc(fc, "bad value in %s", param->key); ++ break; ++ } ++ err = -EINVAL; ++ if (unlikely(result.int_32 < 0 ++ || result.int_32 > KMALLOC_MAX_SIZE)) { ++ errorfc(fc, "bad value in %s", param->key); ++ break; ++ } ++ if (unlikely(result.int_32 && result.int_32 < NAME_MAX)) { ++ errorfc(fc, "rdblk must be larger than %d", NAME_MAX); ++ break; ++ } ++ err = 0; ++ opt->rdblk = result.int_32; ++ break; ++ ++ case Opt_rdhash: ++ err = 0; ++ opt->rdhash = AUFS_RDHASH_DEF; ++ if (!strcmp(param->string, "def")) ++ break; ++ ++ err = kstrtoint(param->string, 0, &result.int_32); ++ if (unlikely(err)) { ++ errorfc(fc, "bad value in %s", param->key); ++ break; ++ } ++ /* how about zero? */ ++ if (result.int_32 < 0 ++ || result.int_32 * sizeof(struct hlist_head) ++ > KMALLOC_MAX_SIZE) { ++ err = -EINVAL; ++ errorfc(fc, "bad integer in %s", param->key); ++ break; ++ } ++ opt->rdhash = result.int_32; ++ break; ++ ++ case Opt_diropq: ++ /* ++ * As other options, fs/aufs/opts.c can handle these strings by ++ * match_token(). But "diropq=" is deprecated now and will ++ * never have other value. So simple strcmp() is enough here. ++ */ ++ if (!strcmp(param->string, "a") || ++ !strcmp(param->string, "always")) { ++ err = 0; ++ opt->type = Opt_diropq_a; ++ } else if (!strcmp(param->string, "w") || ++ !strcmp(param->string, "whiteouted")) { ++ err = 0; ++ opt->type = Opt_diropq_w; ++ } else ++ errorfc(fc, "unknown value %s", param->string); ++ break; ++ ++ case Opt_udba: ++ opt->udba = au_udba_val(param->string); ++ if (opt->udba >= 0) ++ err = 0; ++ else ++ errorf(fc, "wrong value, %s", param->string); ++ break; ++ ++ case Opt_wbr_create: ++ opt->wbr_create.wbr_create ++ = au_wbr_create_val(param->string, &opt->wbr_create); ++ if (opt->wbr_create.wbr_create >= 0) ++ err = 0; ++ else ++ errorf(fc, "wrong value, %s", param->key); ++ break; ++ ++ case Opt_wbr_copyup: ++ opt->wbr_copyup = au_wbr_copyup_val(param->string); ++ if (opt->wbr_copyup >= 0) ++ err = 0; ++ else ++ errorfc(fc, "wrong value, %s", param->key); ++ break; ++ ++ case Opt_fhsm_sec: ++ if (unlikely(result.int_32 < 0)) { ++ errorfc(fc, "bad integer in %s\n", param->key); ++ break; ++ } ++ err = 0; ++ if (sysaufs_brs) ++ opt->fhsm_second = result.int_32; ++ else ++ warnfc(fc, "ignored %s %s", param->key, param->string); ++ break; ++ ++ /* simple true/false flag */ ++#define au_fsctx_TF(name) \ ++ case Opt_##name: \ ++ err = 0; \ ++ opt->tf = !result.negated; \ ++ break; ++ au_fsctx_TF(trunc_xino); ++ au_fsctx_TF(trunc_xib); ++ au_fsctx_TF(dirperm1); ++ au_fsctx_TF(plink); ++ au_fsctx_TF(shwh); ++ au_fsctx_TF(dio); ++ au_fsctx_TF(warn_perm); ++ au_fsctx_TF(verbose); ++ au_fsctx_TF(sum); ++ au_fsctx_TF(dirren); ++ au_fsctx_TF(acl); ++#undef au_fsctx_TF ++ ++ case Opt_noverbose: ++ err = 0; ++ opt->type = Opt_verbose; ++ opt->tf = false; ++ break; ++ ++ case Opt_noxino: ++ fallthrough; ++ case Opt_list_plink: ++ fallthrough; ++ case Opt_wsum: ++ err = 0; ++ break; ++ ++ case Opt_ignore: ++ warnfc(fc, "ignored %s", param->key); ++ fallthrough; ++ case Opt_ignore_silent: ++ a->skipped = 1; ++ err = 0; ++ break; ++ default: ++ a->skipped = 1; ++ err = -ENOPARAM; ++ break; ++ } ++ if (unlikely(err)) ++ goto out; ++ if (a->skipped) ++ goto out; ++ ++ switch (token) { ++ case Opt_br: ++ fallthrough; ++ case Opt_noverbose: ++ fallthrough; ++ case Opt_diropq: ++ break; ++ default: ++ opt->type = token; ++ break; + } ++ opt++; ++ if (unlikely(opt > a->opt_tail)) { ++ err = -E2BIG; ++ opt--; ++ } ++ opt->type = Opt_tail; ++ a->opt = opt; + -+ err = vfsub_copy_file_range(a_src.h_file, src_pos, a_dst.h_file, -+ dst_pos, len, flags); -+ -+out_file: -+ au_write_post(a_dst.inode, a_dst.h_file, &wpre, err); -+ fi_read_unlock(src); -+ au_read_post(a_src.inode, a_src.h_file); -+out_si: -+ si_read_unlock(a_dst.inode->i_sb); -+ inode_unlock(a_dst.inode); +out: + return err; -+#undef a_src -+#undef a_dst +} + -+/* ---------------------------------------------------------------------- */ -+ +/* -+ * The locking order around current->mmap_sem. -+ * - in most and regular cases -+ * file I/O syscall -- aufs_read() or something -+ * -- si_rwsem for read -- mmap_sem -+ * (Note that [fdi]i_rwsem are released before mmap_sem). -+ * - in mmap case -+ * mmap(2) -- mmap_sem -- aufs_mmap() -- si_rwsem for read -- [fdi]i_rwsem -+ * This AB-BA order is definitely bad, but is not a problem since "si_rwsem for -+ * read" allows multiple processes to acquire it and [fdi]i_rwsem are not held -+ * in file I/O. Aufs needs to stop lockdep in aufs_mmap() though. -+ * It means that when aufs acquires si_rwsem for write, the process should never -+ * acquire mmap_sem. -+ * -+ * Actually aufs_iterate() holds [fdi]i_rwsem before mmap_sem, but this is not a -+ * problem either since any directory is not able to be mmap-ed. -+ * The similar scenario is applied to aufs_readlink() too. ++ * these options accept both 'name=val' and 'name:val' form. ++ * some accept optional '=' in its value. ++ * eg. br:/br1=rw:/br2=ro and br=/br1=rw:/br2=ro + */ -+ -+#if 0 /* stop calling security_file_mmap() */ -+/* cf. linux/include/linux/mman.h: calc_vm_prot_bits() */ -+#define AuConv_VM_PROT(f, b) _calc_vm_trans(f, VM_##b, PROT_##b) -+ -+static unsigned long au_arch_prot_conv(unsigned long flags) -+{ -+ /* currently ppc64 only */ -+#ifdef CONFIG_PPC64 -+ /* cf. linux/arch/powerpc/include/asm/mman.h */ -+ AuDebugOn(arch_calc_vm_prot_bits(-1) != VM_SAO); -+ return AuConv_VM_PROT(flags, SAO); -+#else -+ AuDebugOn(arch_calc_vm_prot_bits(-1)); -+ return 0; -+#endif -+} -+ -+static unsigned long au_prot_conv(unsigned long flags) ++static inline unsigned int is_colonopt(char *str) +{ -+ return AuConv_VM_PROT(flags, READ) -+ | AuConv_VM_PROT(flags, WRITE) -+ | AuConv_VM_PROT(flags, EXEC) -+ | au_arch_prot_conv(flags); -+} -+ -+/* cf. linux/include/linux/mman.h: calc_vm_flag_bits() */ -+#define AuConv_VM_MAP(f, b) _calc_vm_trans(f, VM_##b, MAP_##b) ++#define do_test(name) \ ++ if (!strncmp(str, name ":", sizeof(name))) \ ++ return sizeof(name) - 1; ++ do_test("br"); ++ do_test("add"); ++ do_test("ins"); ++ do_test("append"); ++ do_test("prepend"); ++ do_test("del"); ++ /* do_test("idel"); */ ++ do_test("mod"); ++ /* do_test("imod"); */ ++#undef do_test + -+static unsigned long au_flag_conv(unsigned long flags) -+{ -+ return AuConv_VM_MAP(flags, GROWSDOWN) -+ | AuConv_VM_MAP(flags, DENYWRITE) -+ | AuConv_VM_MAP(flags, LOCKED); ++ return 0; +} -+#endif + -+static int aufs_mmap(struct file *file, struct vm_area_struct *vma) ++static int au_fsctx_parse_monolithic(struct fs_context *fc, void *data) +{ + int err; -+ const unsigned char wlock -+ = (file->f_mode & FMODE_WRITE) && (vma->vm_flags & VM_SHARED); -+ struct super_block *sb; -+ struct file *h_file; -+ struct inode *inode; -+ -+ AuDbgVmRegion(file, vma); -+ -+ inode = file_inode(file); -+ sb = inode->i_sb; -+ lockdep_off(); -+ si_read_lock(sb, AuLock_NOPLMW); -+ -+ h_file = au_write_pre(file, wlock, /*wpre*/NULL); -+ lockdep_on(); -+ err = PTR_ERR(h_file); -+ if (IS_ERR(h_file)) -+ goto out; -+ -+ err = 0; -+ au_set_mmapped(file); -+ au_vm_file_reset(vma, h_file); -+ /* -+ * we cannot call security_mmap_file() here since it may acquire -+ * mmap_sem or i_mutex. -+ * -+ * err = security_mmap_file(h_file, au_prot_conv(vma->vm_flags), -+ * au_flag_conv(vma->vm_flags)); -+ */ -+ if (!err) -+ err = call_mmap(h_file, vma); -+ if (!err) { -+ au_vm_prfile_set(vma, file); -+ fsstack_copy_attr_atime(inode, file_inode(h_file)); -+ goto out_fput; /* success */ ++ unsigned int u; ++ char *str; ++ struct au_fsctx_opts *a = fc->fs_private; ++ ++ str = data; ++ AuDbg("str %s\n", str); ++ while (str) { ++ u = is_colonopt(str); ++ if (u) ++ str[u] = '='; ++ str = strchr(str, ','); ++ if (!str) ++ break; ++ str++; + } -+ au_unset_mmapped(file); -+ au_vm_file_reset(vma, file); ++ str = data; ++ AuDbg("str %s\n", str); + -+out_fput: -+ lockdep_off(); -+ ii_write_unlock(inode); -+ lockdep_on(); -+ fput(h_file); -+out: -+ lockdep_off(); -+ si_read_unlock(sb); -+ lockdep_on(); ++ err = generic_parse_monolithic(fc, str); + AuTraceErr(err); ++ au_fsctx_dump(&a->opts); ++ + return err; +} + +/* ---------------------------------------------------------------------- */ + -+static int aufs_fsync_nondir(struct file *file, loff_t start, loff_t end, -+ int datasync) ++static void au_fsctx_opts_free(struct au_opts *opts) +{ -+ int err; -+ struct au_write_pre wpre; -+ struct inode *inode; -+ struct file *h_file; -+ -+ err = 0; /* -EBADF; */ /* posix? */ -+ if (unlikely(!(file->f_mode & FMODE_WRITE))) -+ goto out; -+ -+ inode = file_inode(file); -+ au_mtx_and_read_lock(inode); -+ -+ wpre.lsc = 0; -+ h_file = au_write_pre(file, /*do_ready*/1, &wpre); -+ err = PTR_ERR(h_file); -+ if (IS_ERR(h_file)) -+ goto out_unlock; -+ -+ err = vfsub_fsync(h_file, &h_file->f_path, datasync); -+ au_write_post(inode, h_file, &wpre, /*written*/0); ++ struct au_opt *opt; + -+out_unlock: -+ si_read_unlock(inode->i_sb); -+ inode_unlock(inode); -+out: -+ return err; ++ opt = opts->opt; ++ while (opt->type != Opt_tail) { ++ switch (opt->type) { ++ case Opt_add: ++ fallthrough; ++ case Opt_append: ++ fallthrough; ++ case Opt_prepend: ++ kfree(opt->add.pathname); ++ path_put(&opt->add.path); ++ break; ++ case Opt_del: ++ kfree(opt->del.pathname); ++ fallthrough; ++ case Opt_idel: ++ path_put(&opt->del.h_path); ++ break; ++ case Opt_mod: ++ kfree(opt->mod.path); ++ fallthrough; ++ case Opt_imod: ++ dput(opt->mod.h_root); ++ break; ++ case Opt_xino: ++ kfree(opt->xino.path); ++ fput(opt->xino.file); ++ break; ++ } ++ opt++; ++ } +} + -+static int aufs_fasync(int fd, struct file *file, int flag) ++static void au_fsctx_free(struct fs_context *fc) +{ -+ int err; -+ struct file *h_file; -+ struct super_block *sb; -+ -+ sb = file->f_path.dentry->d_sb; -+ si_read_lock(sb, AuLock_FLUSH | AuLock_NOPLMW); -+ -+ h_file = au_read_pre(file, /*keep_fi*/0, /*lsc*/0); -+ err = PTR_ERR(h_file); -+ if (IS_ERR(h_file)) -+ goto out; ++ struct au_fsctx_opts *a = fc->fs_private; + -+ if (h_file->f_op->fasync) -+ err = h_file->f_op->fasync(fd, h_file, flag); -+ fput(h_file); /* instead of au_read_post() */ ++ /* fs_type=%p, root=%pD */ ++ AuDbg("fc %p{sb_flags 0x%x, sb_flags_mask 0x%x, purpose %u\n", ++ fc, fc->sb_flags, fc->sb_flags_mask, fc->purpose); + -+out: -+ si_read_unlock(sb); -+ return err; ++ kobject_put(&a->sbinfo->si_kobj); ++ au_fsctx_opts_free(&a->opts); ++ free_page((unsigned long)a->opts.opt); ++ au_kfree_rcu(a); +} + -+static int aufs_setfl(struct file *file, unsigned long arg) ++static const struct fs_context_operations au_fsctx_ops = { ++ .free = au_fsctx_free, ++ .parse_param = au_fsctx_parse_param, ++ .parse_monolithic = au_fsctx_parse_monolithic, ++ .get_tree = au_fsctx_get_tree, ++ .reconfigure = au_fsctx_reconfigure ++ /* ++ * nfs4 requires ->dup()? No. ++ * I don't know what is this ->dup() for. ++ */ ++}; ++ ++int aufs_fsctx_init(struct fs_context *fc) +{ + int err; -+ struct file *h_file; -+ struct super_block *sb; ++ struct au_fsctx_opts *a; + -+ sb = file->f_path.dentry->d_sb; -+ si_read_lock(sb, AuLock_FLUSH | AuLock_NOPLMW); ++ /* fs_type=%p, root=%pD */ ++ AuDbg("fc %p{sb_flags 0x%x, sb_flags_mask 0x%x, purpose %u\n", ++ fc, fc->sb_flags, fc->sb_flags_mask, fc->purpose); + -+ h_file = au_read_pre(file, /*keep_fi*/0, /*lsc*/0); -+ err = PTR_ERR(h_file); -+ if (IS_ERR(h_file)) ++ /* they will be freed by au_fsctx_free() */ ++ err = -ENOMEM; ++ a = kzalloc(sizeof(*a), GFP_NOFS); ++ if (unlikely(!a)) + goto out; ++ a->bindex = 0; ++ a->opts.opt = (void *)__get_free_page(GFP_NOFS); ++ if (unlikely(!a->opts.opt)) ++ goto out_a; ++ a->opt = a->opts.opt; ++ a->opt->type = Opt_tail; ++ a->opts.max_opt = PAGE_SIZE / sizeof(*a->opts.opt); ++ a->opt_tail = a->opt + a->opts.max_opt - 1; ++ a->opts.sb_flags = fc->sb_flags; ++ ++ a->sb = NULL; ++ if (fc->root) { ++ AuDebugOn(fc->purpose != FS_CONTEXT_FOR_RECONFIGURE); ++ a->opts.flags = AuOpts_REMOUNT; ++ a->sb = fc->root->d_sb; ++ a->sbinfo = au_sbi(a->sb); ++ kobject_get(&a->sbinfo->si_kobj); ++ } else { ++ a->sbinfo = au_si_alloc(a->sb); ++ AuDebugOn(!a->sbinfo); ++ err = PTR_ERR(a->sbinfo); ++ if (IS_ERR(a->sbinfo)) ++ goto out_opt; ++ au_rw_write_unlock(&a->sbinfo->si_rwsem); ++ } + -+ /* stop calling h_file->fasync */ -+ arg |= vfsub_file_flags(file) & FASYNC; -+ err = setfl(/*unused fd*/-1, h_file, arg); -+ fput(h_file); /* instead of au_read_post() */ ++ err = 0; ++ fc->fs_private = a; ++ fc->ops = &au_fsctx_ops; ++ goto out; /* success */ + ++out_opt: ++ free_page((unsigned long)a->opts.opt); ++out_a: ++ au_kfree_rcu(a); +out: -+ si_read_unlock(sb); ++ AuTraceErr(err); + return err; +} -+ -+/* ---------------------------------------------------------------------- */ -+ -+/* no one supports this operation, currently */ -+#if 0 /* reserved for future use */ -+static ssize_t aufs_sendpage(struct file *file, struct page *page, int offset, -+ size_t len, loff_t *pos, int more) -+{ -+} -+#endif -+ -+/* ---------------------------------------------------------------------- */ -+ -+const struct file_operations aufs_file_fop = { -+ .owner = THIS_MODULE, -+ -+ .llseek = default_llseek, -+ -+ .read_iter = aufs_read_iter, -+ .write_iter = aufs_write_iter, -+ -+#ifdef CONFIG_AUFS_POLL -+ .poll = aufs_poll, -+#endif -+ .unlocked_ioctl = aufs_ioctl_nondir, -+#ifdef CONFIG_COMPAT -+ .compat_ioctl = aufs_compat_ioctl_nondir, -+#endif -+ .mmap = aufs_mmap, -+ .open = aufs_open_nondir, -+ .flush = aufs_flush_nondir, -+ .release = aufs_release_nondir, -+ .fsync = aufs_fsync_nondir, -+ .fasync = aufs_fasync, -+ /* .sendpage = aufs_sendpage, */ -+ .setfl = aufs_setfl, -+ .splice_write = aufs_splice_write, -+ .splice_read = aufs_splice_read, -+#if 0 /* reserved for future use */ -+ .aio_splice_write = aufs_aio_splice_write, -+ .aio_splice_read = aufs_aio_splice_read, -+#endif -+ .fallocate = aufs_fallocate, -+ .copy_file_range = aufs_copy_file_range -+}; diff -urN /usr/share/empty/fs/aufs/fstype.h linux/fs/aufs/fstype.h --- /usr/share/empty/fs/aufs/fstype.h 1970-01-01 01:00:00.000000000 +0100 -+++ linux/fs/aufs/fstype.h 2021-12-03 15:38:59.936647310 +0100 ++++ linux/fs/aufs/fstype.h 2022-03-21 14:49:05.723299677 +0100 @@ -0,0 +1,401 @@ +/* SPDX-License-Identifier: GPL-2.0 */ +/* @@ -16576,7 +17820,7 @@ diff -urN /usr/share/empty/fs/aufs/fstype.h linux/fs/aufs/fstype.h +#endif /* __AUFS_FSTYPE_H__ */ diff -urN /usr/share/empty/fs/aufs/hbl.h linux/fs/aufs/hbl.h --- /usr/share/empty/fs/aufs/hbl.h 1970-01-01 01:00:00.000000000 +0100 -+++ linux/fs/aufs/hbl.h 2021-12-03 15:38:59.936647310 +0100 ++++ linux/fs/aufs/hbl.h 2022-03-21 14:49:05.723299677 +0100 @@ -0,0 +1,65 @@ +/* SPDX-License-Identifier: GPL-2.0 */ +/* @@ -16645,7 +17889,7 @@ diff -urN /usr/share/empty/fs/aufs/hbl.h linux/fs/aufs/hbl.h +#endif /* __AUFS_HBL_H__ */ diff -urN /usr/share/empty/fs/aufs/hfsnotify.c linux/fs/aufs/hfsnotify.c --- /usr/share/empty/fs/aufs/hfsnotify.c 1970-01-01 01:00:00.000000000 +0100 -+++ linux/fs/aufs/hfsnotify.c 2022-01-13 12:42:15.929566135 +0100 ++++ linux/fs/aufs/hfsnotify.c 2022-03-21 14:49:05.723299677 +0100 @@ -0,0 +1,289 @@ +// SPDX-License-Identifier: GPL-2.0 +/* @@ -16938,7 +18182,7 @@ diff -urN /usr/share/empty/fs/aufs/hfsnotify.c linux/fs/aufs/hfsnotify.c +}; diff -urN /usr/share/empty/fs/aufs/hfsplus.c linux/fs/aufs/hfsplus.c --- /usr/share/empty/fs/aufs/hfsplus.c 1970-01-01 01:00:00.000000000 +0100 -+++ linux/fs/aufs/hfsplus.c 2021-12-03 15:38:59.936647310 +0100 ++++ linux/fs/aufs/hfsplus.c 2022-03-21 14:49:05.723299677 +0100 @@ -0,0 +1,60 @@ +// SPDX-License-Identifier: GPL-2.0 +/* @@ -17002,7 +18246,7 @@ diff -urN /usr/share/empty/fs/aufs/hfsplus.c linux/fs/aufs/hfsplus.c +} diff -urN /usr/share/empty/fs/aufs/hnotify.c linux/fs/aufs/hnotify.c --- /usr/share/empty/fs/aufs/hnotify.c 1970-01-01 01:00:00.000000000 +0100 -+++ linux/fs/aufs/hnotify.c 2021-12-03 15:38:59.936647310 +0100 ++++ linux/fs/aufs/hnotify.c 2022-03-21 14:49:05.723299677 +0100 @@ -0,0 +1,715 @@ +// SPDX-License-Identifier: GPL-2.0 +/* @@ -17721,7 +18965,7 @@ diff -urN /usr/share/empty/fs/aufs/hnotify.c linux/fs/aufs/hnotify.c +} diff -urN /usr/share/empty/fs/aufs/iinfo.c linux/fs/aufs/iinfo.c --- /usr/share/empty/fs/aufs/iinfo.c 1970-01-01 01:00:00.000000000 +0100 -+++ linux/fs/aufs/iinfo.c 2021-12-03 15:38:59.936647310 +0100 ++++ linux/fs/aufs/iinfo.c 2022-03-21 14:49:05.726633010 +0100 @@ -0,0 +1,286 @@ +// SPDX-License-Identifier: GPL-2.0 +/* @@ -18011,7 +19255,7 @@ diff -urN /usr/share/empty/fs/aufs/iinfo.c linux/fs/aufs/iinfo.c +} diff -urN /usr/share/empty/fs/aufs/inode.c linux/fs/aufs/inode.c --- /usr/share/empty/fs/aufs/inode.c 1970-01-01 01:00:00.000000000 +0100 -+++ linux/fs/aufs/inode.c 2021-12-03 15:40:58.236647297 +0100 ++++ linux/fs/aufs/inode.c 2022-03-21 14:49:05.726633010 +0100 @@ -0,0 +1,531 @@ +// SPDX-License-Identifier: GPL-2.0 +/* @@ -18546,7 +19790,7 @@ diff -urN /usr/share/empty/fs/aufs/inode.c linux/fs/aufs/inode.c +} diff -urN /usr/share/empty/fs/aufs/inode.h linux/fs/aufs/inode.h --- /usr/share/empty/fs/aufs/inode.h 1970-01-01 01:00:00.000000000 +0100 -+++ linux/fs/aufs/inode.h 2021-12-03 15:40:58.236647297 +0100 ++++ linux/fs/aufs/inode.h 2022-03-21 14:49:05.726633010 +0100 @@ -0,0 +1,705 @@ +/* SPDX-License-Identifier: GPL-2.0 */ +/* @@ -19255,7 +20499,7 @@ diff -urN /usr/share/empty/fs/aufs/inode.h linux/fs/aufs/inode.h +#endif /* __AUFS_INODE_H__ */ diff -urN /usr/share/empty/fs/aufs/ioctl.c linux/fs/aufs/ioctl.c --- /usr/share/empty/fs/aufs/ioctl.c 1970-01-01 01:00:00.000000000 +0100 -+++ linux/fs/aufs/ioctl.c 2021-12-03 15:38:59.936647310 +0100 ++++ linux/fs/aufs/ioctl.c 2022-03-21 14:49:05.726633010 +0100 @@ -0,0 +1,220 @@ +// SPDX-License-Identifier: GPL-2.0 +/* @@ -19479,7 +20723,7 @@ diff -urN /usr/share/empty/fs/aufs/ioctl.c linux/fs/aufs/ioctl.c +#endif diff -urN /usr/share/empty/fs/aufs/i_op_add.c linux/fs/aufs/i_op_add.c --- /usr/share/empty/fs/aufs/i_op_add.c 1970-01-01 01:00:00.000000000 +0100 -+++ linux/fs/aufs/i_op_add.c 2021-12-03 15:40:58.236647297 +0100 ++++ linux/fs/aufs/i_op_add.c 2022-03-21 14:49:05.726633010 +0100 @@ -0,0 +1,941 @@ +// SPDX-License-Identifier: GPL-2.0 +/* @@ -20424,8 +21668,8 @@ diff -urN /usr/share/empty/fs/aufs/i_op_add.c linux/fs/aufs/i_op_add.c +} diff -urN /usr/share/empty/fs/aufs/i_op.c linux/fs/aufs/i_op.c --- /usr/share/empty/fs/aufs/i_op.c 1970-01-01 01:00:00.000000000 +0100 -+++ linux/fs/aufs/i_op.c 2021-12-03 15:40:58.236647297 +0100 -@@ -0,0 +1,1513 @@ ++++ linux/fs/aufs/i_op.c 2022-03-21 14:49:05.726633010 +0100 +@@ -0,0 +1,1512 @@ +// SPDX-License-Identifier: GPL-2.0 +/* + * Copyright (C) 2005-2021 Junjiro R. Okajima @@ -20451,7 +21695,6 @@ diff -urN /usr/share/empty/fs/aufs/i_op.c linux/fs/aufs/i_op.c +#include +#include +#include -+#include +#include +#include "aufs.h" + @@ -21941,7 +23184,7 @@ diff -urN /usr/share/empty/fs/aufs/i_op.c linux/fs/aufs/i_op.c +}; diff -urN /usr/share/empty/fs/aufs/i_op_del.c linux/fs/aufs/i_op_del.c --- /usr/share/empty/fs/aufs/i_op_del.c 1970-01-01 01:00:00.000000000 +0100 -+++ linux/fs/aufs/i_op_del.c 2021-12-03 15:40:58.236647297 +0100 ++++ linux/fs/aufs/i_op_del.c 2022-03-21 14:49:05.726633010 +0100 @@ -0,0 +1,522 @@ +// SPDX-License-Identifier: GPL-2.0 +/* @@ -22467,7 +23710,7 @@ diff -urN /usr/share/empty/fs/aufs/i_op_del.c linux/fs/aufs/i_op_del.c +} diff -urN /usr/share/empty/fs/aufs/i_op_ren.c linux/fs/aufs/i_op_ren.c --- /usr/share/empty/fs/aufs/i_op_ren.c 1970-01-01 01:00:00.000000000 +0100 -+++ linux/fs/aufs/i_op_ren.c 2021-12-03 15:40:58.236647297 +0100 ++++ linux/fs/aufs/i_op_ren.c 2022-03-21 14:49:05.726633010 +0100 @@ -0,0 +1,1257 @@ +// SPDX-License-Identifier: GPL-2.0 +/* @@ -23728,7 +24971,7 @@ diff -urN /usr/share/empty/fs/aufs/i_op_ren.c linux/fs/aufs/i_op_ren.c +} diff -urN /usr/share/empty/fs/aufs/Kconfig linux/fs/aufs/Kconfig --- /usr/share/empty/fs/aufs/Kconfig 1970-01-01 01:00:00.000000000 +0100 -+++ linux/fs/aufs/Kconfig 2021-12-03 15:38:59.929980643 +0100 ++++ linux/fs/aufs/Kconfig 2022-03-21 14:49:05.716633010 +0100 @@ -0,0 +1,199 @@ +# SPDX-License-Identifier: GPL-2.0 +config AUFS_FS @@ -23931,7 +25174,7 @@ diff -urN /usr/share/empty/fs/aufs/Kconfig linux/fs/aufs/Kconfig +endif diff -urN /usr/share/empty/fs/aufs/lcnt.h linux/fs/aufs/lcnt.h --- /usr/share/empty/fs/aufs/lcnt.h 1970-01-01 01:00:00.000000000 +0100 -+++ linux/fs/aufs/lcnt.h 2021-12-03 15:38:59.936647310 +0100 ++++ linux/fs/aufs/lcnt.h 2022-03-21 14:49:05.726633010 +0100 @@ -0,0 +1,186 @@ +/* SPDX-License-Identifier: GPL-2.0 */ +/* @@ -24121,7 +25364,7 @@ diff -urN /usr/share/empty/fs/aufs/lcnt.h linux/fs/aufs/lcnt.h +#endif /* __AUFS_LCNT_H__ */ diff -urN /usr/share/empty/fs/aufs/loop.c linux/fs/aufs/loop.c --- /usr/share/empty/fs/aufs/loop.c 1970-01-01 01:00:00.000000000 +0100 -+++ linux/fs/aufs/loop.c 2021-12-03 15:38:59.936647310 +0100 ++++ linux/fs/aufs/loop.c 2022-03-21 14:49:05.726633010 +0100 @@ -0,0 +1,148 @@ +// SPDX-License-Identifier: GPL-2.0 +/* @@ -24273,7 +25516,7 @@ diff -urN /usr/share/empty/fs/aufs/loop.c linux/fs/aufs/loop.c +} diff -urN /usr/share/empty/fs/aufs/loop.h linux/fs/aufs/loop.h --- /usr/share/empty/fs/aufs/loop.h 1970-01-01 01:00:00.000000000 +0100 -+++ linux/fs/aufs/loop.h 2021-12-03 15:38:59.936647310 +0100 ++++ linux/fs/aufs/loop.h 2022-03-21 14:49:05.726633010 +0100 @@ -0,0 +1,55 @@ +/* SPDX-License-Identifier: GPL-2.0 */ +/* @@ -24332,7 +25575,7 @@ diff -urN /usr/share/empty/fs/aufs/loop.h linux/fs/aufs/loop.h +#endif /* __AUFS_LOOP_H__ */ diff -urN /usr/share/empty/fs/aufs/magic.mk linux/fs/aufs/magic.mk --- /usr/share/empty/fs/aufs/magic.mk 1970-01-01 01:00:00.000000000 +0100 -+++ linux/fs/aufs/magic.mk 2021-12-03 15:38:59.936647310 +0100 ++++ linux/fs/aufs/magic.mk 2022-03-21 14:49:05.726633010 +0100 @@ -0,0 +1,31 @@ +# SPDX-License-Identifier: GPL-2.0 + @@ -24367,7 +25610,7 @@ diff -urN /usr/share/empty/fs/aufs/magic.mk linux/fs/aufs/magic.mk +endif diff -urN /usr/share/empty/fs/aufs/Makefile linux/fs/aufs/Makefile --- /usr/share/empty/fs/aufs/Makefile 1970-01-01 01:00:00.000000000 +0100 -+++ linux/fs/aufs/Makefile 2021-12-03 15:38:59.929980643 +0100 ++++ linux/fs/aufs/Makefile 2022-03-21 14:49:05.716633010 +0100 @@ -0,0 +1,46 @@ +# SPDX-License-Identifier: GPL-2.0 + @@ -24388,7 +25631,7 @@ diff -urN /usr/share/empty/fs/aufs/Makefile linux/fs/aufs/Makefile +endif + +obj-$(CONFIG_AUFS_FS) += aufs.o -+aufs-y := module.o sbinfo.o super.o branch.o xino.o sysaufs.o opts.o \ ++aufs-y := module.o sbinfo.o super.o branch.o xino.o sysaufs.o opts.o fsctx.o \ + wkq.o vfsub.o dcsub.o \ + cpup.o whout.o wbr_policy.o \ + dinfo.o dentry.o \ @@ -24417,7 +25660,7 @@ diff -urN /usr/share/empty/fs/aufs/Makefile linux/fs/aufs/Makefile +aufs-$(CONFIG_AUFS_MAGIC_SYSRQ) += sysrq.o diff -urN /usr/share/empty/fs/aufs/module.c linux/fs/aufs/module.c --- /usr/share/empty/fs/aufs/module.c 1970-01-01 01:00:00.000000000 +0100 -+++ linux/fs/aufs/module.c 2021-12-03 15:38:59.936647310 +0100 ++++ linux/fs/aufs/module.c 2022-03-21 14:49:05.726633010 +0100 @@ -0,0 +1,273 @@ +// SPDX-License-Identifier: GPL-2.0 +/* @@ -24694,7 +25937,7 @@ diff -urN /usr/share/empty/fs/aufs/module.c linux/fs/aufs/module.c +module_exit(aufs_exit); diff -urN /usr/share/empty/fs/aufs/module.h linux/fs/aufs/module.h --- /usr/share/empty/fs/aufs/module.h 1970-01-01 01:00:00.000000000 +0100 -+++ linux/fs/aufs/module.h 2021-12-03 15:40:58.236647297 +0100 ++++ linux/fs/aufs/module.h 2022-03-21 14:49:05.726633010 +0100 @@ -0,0 +1,166 @@ +/* SPDX-License-Identifier: GPL-2.0 */ +/* @@ -24864,7 +26107,7 @@ diff -urN /usr/share/empty/fs/aufs/module.h linux/fs/aufs/module.h +#endif /* __AUFS_MODULE_H__ */ diff -urN /usr/share/empty/fs/aufs/mvdown.c linux/fs/aufs/mvdown.c --- /usr/share/empty/fs/aufs/mvdown.c 1970-01-01 01:00:00.000000000 +0100 -+++ linux/fs/aufs/mvdown.c 2021-12-03 15:38:59.939980643 +0100 ++++ linux/fs/aufs/mvdown.c 2022-03-21 14:49:05.729966343 +0100 @@ -0,0 +1,706 @@ +// SPDX-License-Identifier: GPL-2.0 +/* @@ -25574,8 +26817,8 @@ diff -urN /usr/share/empty/fs/aufs/mvdown.c linux/fs/aufs/mvdown.c +} diff -urN /usr/share/empty/fs/aufs/opts.c linux/fs/aufs/opts.c --- /usr/share/empty/fs/aufs/opts.c 1970-01-01 01:00:00.000000000 +0100 -+++ linux/fs/aufs/opts.c 2021-12-03 15:38:59.939980643 +0100 -@@ -0,0 +1,1880 @@ ++++ linux/fs/aufs/opts.c 2022-03-21 14:49:05.729966343 +0100 +@@ -0,0 +1,1032 @@ +// SPDX-License-Identifier: GPL-2.0 +/* + * Copyright (C) 2005-2021 Junjiro R. Okajima @@ -25598,172 +26841,12 @@ diff -urN /usr/share/empty/fs/aufs/opts.c linux/fs/aufs/opts.c + * mount options/flags + */ + -+#include +#include /* a distribution requires */ +#include +#include "aufs.h" + +/* ---------------------------------------------------------------------- */ + -+enum { -+ Opt_br, -+ Opt_add, Opt_del, Opt_mod, Opt_append, Opt_prepend, -+ Opt_idel, Opt_imod, -+ Opt_dirwh, Opt_rdcache, Opt_rdblk, Opt_rdhash, -+ Opt_rdblk_def, Opt_rdhash_def, -+ Opt_xino, Opt_noxino, -+ Opt_trunc_xino, Opt_trunc_xino_v, Opt_notrunc_xino, -+ Opt_trunc_xino_path, Opt_itrunc_xino, -+ Opt_trunc_xib, Opt_notrunc_xib, -+ Opt_shwh, Opt_noshwh, -+ Opt_plink, Opt_noplink, Opt_list_plink, -+ Opt_udba, -+ Opt_dio, Opt_nodio, -+ Opt_diropq_a, Opt_diropq_w, -+ Opt_warn_perm, Opt_nowarn_perm, -+ Opt_wbr_copyup, Opt_wbr_create, -+ Opt_fhsm_sec, -+ Opt_verbose, Opt_noverbose, -+ Opt_sum, Opt_nosum, Opt_wsum, -+ Opt_dirperm1, Opt_nodirperm1, -+ Opt_dirren, Opt_nodirren, -+ Opt_acl, Opt_noacl, -+ Opt_tail, Opt_ignore, Opt_ignore_silent, Opt_err -+}; -+ -+static match_table_t options = { -+ {Opt_br, "br=%s"}, -+ {Opt_br, "br:%s"}, -+ -+ {Opt_add, "add=%d:%s"}, -+ {Opt_add, "add:%d:%s"}, -+ {Opt_add, "ins=%d:%s"}, -+ {Opt_add, "ins:%d:%s"}, -+ {Opt_append, "append=%s"}, -+ {Opt_append, "append:%s"}, -+ {Opt_prepend, "prepend=%s"}, -+ {Opt_prepend, "prepend:%s"}, -+ -+ {Opt_del, "del=%s"}, -+ {Opt_del, "del:%s"}, -+ /* {Opt_idel, "idel:%d"}, */ -+ {Opt_mod, "mod=%s"}, -+ {Opt_mod, "mod:%s"}, -+ /* {Opt_imod, "imod:%d:%s"}, */ -+ -+ {Opt_dirwh, "dirwh=%d"}, -+ -+ {Opt_xino, "xino=%s"}, -+ {Opt_noxino, "noxino"}, -+ {Opt_trunc_xino, "trunc_xino"}, -+ {Opt_trunc_xino_v, "trunc_xino_v=%d:%d"}, -+ {Opt_notrunc_xino, "notrunc_xino"}, -+ {Opt_trunc_xino_path, "trunc_xino=%s"}, -+ {Opt_itrunc_xino, "itrunc_xino=%d"}, -+ /* {Opt_zxino, "zxino=%s"}, */ -+ {Opt_trunc_xib, "trunc_xib"}, -+ {Opt_notrunc_xib, "notrunc_xib"}, -+ -+#ifdef CONFIG_PROC_FS -+ {Opt_plink, "plink"}, -+#else -+ {Opt_ignore_silent, "plink"}, -+#endif -+ -+ {Opt_noplink, "noplink"}, -+ -+#ifdef CONFIG_AUFS_DEBUG -+ {Opt_list_plink, "list_plink"}, -+#endif -+ -+ {Opt_udba, "udba=%s"}, -+ -+ {Opt_dio, "dio"}, -+ {Opt_nodio, "nodio"}, -+ -+#ifdef CONFIG_AUFS_DIRREN -+ {Opt_dirren, "dirren"}, -+ {Opt_nodirren, "nodirren"}, -+#else -+ {Opt_ignore, "dirren"}, -+ {Opt_ignore_silent, "nodirren"}, -+#endif -+ -+#ifdef CONFIG_AUFS_FHSM -+ {Opt_fhsm_sec, "fhsm_sec=%d"}, -+#else -+ {Opt_ignore, "fhsm_sec=%d"}, -+#endif -+ -+ {Opt_diropq_a, "diropq=always"}, -+ {Opt_diropq_a, "diropq=a"}, -+ {Opt_diropq_w, "diropq=whiteouted"}, -+ {Opt_diropq_w, "diropq=w"}, -+ -+ {Opt_warn_perm, "warn_perm"}, -+ {Opt_nowarn_perm, "nowarn_perm"}, -+ -+ /* keep them temporary */ -+ {Opt_ignore_silent, "nodlgt"}, -+ {Opt_ignore, "clean_plink"}, -+ -+#ifdef CONFIG_AUFS_SHWH -+ {Opt_shwh, "shwh"}, -+#endif -+ {Opt_noshwh, "noshwh"}, -+ -+ {Opt_dirperm1, "dirperm1"}, -+ {Opt_nodirperm1, "nodirperm1"}, -+ -+ {Opt_verbose, "verbose"}, -+ {Opt_verbose, "v"}, -+ {Opt_noverbose, "noverbose"}, -+ {Opt_noverbose, "quiet"}, -+ {Opt_noverbose, "q"}, -+ {Opt_noverbose, "silent"}, -+ -+ {Opt_sum, "sum"}, -+ {Opt_nosum, "nosum"}, -+ {Opt_wsum, "wsum"}, -+ -+ {Opt_rdcache, "rdcache=%d"}, -+ {Opt_rdblk, "rdblk=%d"}, -+ {Opt_rdblk_def, "rdblk=def"}, -+ {Opt_rdhash, "rdhash=%d"}, -+ {Opt_rdhash_def, "rdhash=def"}, -+ -+ {Opt_wbr_create, "create=%s"}, -+ {Opt_wbr_create, "create_policy=%s"}, -+ {Opt_wbr_copyup, "cpup=%s"}, -+ {Opt_wbr_copyup, "copyup=%s"}, -+ {Opt_wbr_copyup, "copyup_policy=%s"}, -+ -+ /* generic VFS flag */ -+#ifdef CONFIG_FS_POSIX_ACL -+ {Opt_acl, "acl"}, -+ {Opt_noacl, "noacl"}, -+#else -+ {Opt_ignore, "acl"}, -+ {Opt_ignore_silent, "noacl"}, -+#endif -+ -+ /* internal use for the scripts */ -+ {Opt_ignore_silent, "si=%s"}, -+ -+ {Opt_br, "dirs=%s"}, -+ {Opt_ignore, "debug=%d"}, -+ {Opt_ignore, "delete=whiteout"}, -+ {Opt_ignore, "delete=all"}, -+ {Opt_ignore, "imap=%s"}, -+ -+ /* temporary workaround, due to old mount(8)? */ -+ {Opt_ignore_silent, "relatime"}, -+ -+ {Opt_err, NULL} -+}; -+ -+/* ---------------------------------------------------------------------- */ -+ +static const char *au_parser_pattern(int val, match_table_t tbl) +{ + struct match_token *p; @@ -25895,7 +26978,7 @@ diff -urN /usr/share/empty/fs/aufs/opts.c linux/fs/aufs/opts.c + return q - str->a; +} + -+static int noinline_for_stack br_perm_val(char *perm) ++int au_br_perm_val(char *perm) +{ + int val, bad, sz; + char *p; @@ -25988,7 +27071,7 @@ diff -urN /usr/share/empty/fs/aufs/opts.c linux/fs/aufs/opts.c + {-1, NULL} +}; + -+static int noinline_for_stack udba_val(char *str) ++int au_udba_val(char *str) +{ + substring_t args[MAX_OPT_ARGS]; + @@ -26059,8 +27142,7 @@ diff -urN /usr/share/empty/fs/aufs/opts.c linux/fs/aufs/opts.c + return err; +} + -+static int noinline_for_stack -+au_wbr_create_val(char *str, struct au_opt_wbr_create *create) ++int au_wbr_create_val(char *str, struct au_opt_wbr_create *create) +{ + int err, e; + substring_t args[MAX_OPT_ARGS]; @@ -26116,7 +27198,7 @@ diff -urN /usr/share/empty/fs/aufs/opts.c linux/fs/aufs/opts.c + {-1, NULL} +}; + -+static int noinline_for_stack au_wbr_copyup_val(char *str) ++int au_wbr_copyup_val(char *str) +{ + substring_t args[MAX_OPT_ARGS]; + @@ -26130,235 +27212,8 @@ diff -urN /usr/share/empty/fs/aufs/opts.c linux/fs/aufs/opts.c + +/* ---------------------------------------------------------------------- */ + -+static const int lkup_dirflags = LOOKUP_FOLLOW | LOOKUP_DIRECTORY; -+ -+static void dump_opts(struct au_opts *opts) -+{ -+#ifdef CONFIG_AUFS_DEBUG -+ /* reduce stack space */ -+ union { -+ struct au_opt_add *add; -+ struct au_opt_del *del; -+ struct au_opt_mod *mod; -+ struct au_opt_xino *xino; -+ struct au_opt_xino_itrunc *xino_itrunc; -+ struct au_opt_wbr_create *create; -+ } u; -+ struct au_opt *opt; -+ -+ opt = opts->opt; -+ while (opt->type != Opt_tail) { -+ switch (opt->type) { -+ case Opt_add: -+ u.add = &opt->add; -+ AuDbg("add {b%d, %s, 0x%x, %p}\n", -+ u.add->bindex, u.add->pathname, u.add->perm, -+ u.add->path.dentry); -+ break; -+ case Opt_del: -+ case Opt_idel: -+ u.del = &opt->del; -+ AuDbg("del {%s, %p}\n", -+ u.del->pathname, u.del->h_path.dentry); -+ break; -+ case Opt_mod: -+ case Opt_imod: -+ u.mod = &opt->mod; -+ AuDbg("mod {%s, 0x%x, %p}\n", -+ u.mod->path, u.mod->perm, u.mod->h_root); -+ break; -+ case Opt_append: -+ u.add = &opt->add; -+ AuDbg("append {b%d, %s, 0x%x, %p}\n", -+ u.add->bindex, u.add->pathname, u.add->perm, -+ u.add->path.dentry); -+ break; -+ case Opt_prepend: -+ u.add = &opt->add; -+ AuDbg("prepend {b%d, %s, 0x%x, %p}\n", -+ u.add->bindex, u.add->pathname, u.add->perm, -+ u.add->path.dentry); -+ break; -+ case Opt_dirwh: -+ AuDbg("dirwh %d\n", opt->dirwh); -+ break; -+ case Opt_rdcache: -+ AuDbg("rdcache %d\n", opt->rdcache); -+ break; -+ case Opt_rdblk: -+ AuDbg("rdblk %u\n", opt->rdblk); -+ break; -+ case Opt_rdblk_def: -+ AuDbg("rdblk_def\n"); -+ break; -+ case Opt_rdhash: -+ AuDbg("rdhash %u\n", opt->rdhash); -+ break; -+ case Opt_rdhash_def: -+ AuDbg("rdhash_def\n"); -+ break; -+ case Opt_xino: -+ u.xino = &opt->xino; -+ AuDbg("xino {%s %pD}\n", u.xino->path, u.xino->file); -+ break; -+ case Opt_trunc_xino: -+ AuLabel(trunc_xino); -+ break; -+ case Opt_notrunc_xino: -+ AuLabel(notrunc_xino); -+ break; -+ case Opt_trunc_xino_path: -+ case Opt_itrunc_xino: -+ u.xino_itrunc = &opt->xino_itrunc; -+ AuDbg("trunc_xino %d\n", u.xino_itrunc->bindex); -+ break; -+ case Opt_noxino: -+ AuLabel(noxino); -+ break; -+ case Opt_trunc_xib: -+ AuLabel(trunc_xib); -+ break; -+ case Opt_notrunc_xib: -+ AuLabel(notrunc_xib); -+ break; -+ case Opt_shwh: -+ AuLabel(shwh); -+ break; -+ case Opt_noshwh: -+ AuLabel(noshwh); -+ break; -+ case Opt_dirperm1: -+ AuLabel(dirperm1); -+ break; -+ case Opt_nodirperm1: -+ AuLabel(nodirperm1); -+ break; -+ case Opt_plink: -+ AuLabel(plink); -+ break; -+ case Opt_noplink: -+ AuLabel(noplink); -+ break; -+ case Opt_list_plink: -+ AuLabel(list_plink); -+ break; -+ case Opt_udba: -+ AuDbg("udba %d, %s\n", -+ opt->udba, au_optstr_udba(opt->udba)); -+ break; -+ case Opt_dio: -+ AuLabel(dio); -+ break; -+ case Opt_nodio: -+ AuLabel(nodio); -+ break; -+ case Opt_diropq_a: -+ AuLabel(diropq_a); -+ break; -+ case Opt_diropq_w: -+ AuLabel(diropq_w); -+ break; -+ case Opt_warn_perm: -+ AuLabel(warn_perm); -+ break; -+ case Opt_nowarn_perm: -+ AuLabel(nowarn_perm); -+ break; -+ case Opt_verbose: -+ AuLabel(verbose); -+ break; -+ case Opt_noverbose: -+ AuLabel(noverbose); -+ break; -+ case Opt_sum: -+ AuLabel(sum); -+ break; -+ case Opt_nosum: -+ AuLabel(nosum); -+ break; -+ case Opt_wsum: -+ AuLabel(wsum); -+ break; -+ case Opt_wbr_create: -+ u.create = &opt->wbr_create; -+ AuDbg("create %d, %s\n", u.create->wbr_create, -+ au_optstr_wbr_create(u.create->wbr_create)); -+ switch (u.create->wbr_create) { -+ case AuWbrCreate_MFSV: -+ case AuWbrCreate_PMFSV: -+ AuDbg("%d sec\n", u.create->mfs_second); -+ break; -+ case AuWbrCreate_MFSRR: -+ case AuWbrCreate_TDMFS: -+ AuDbg("%llu watermark\n", -+ u.create->mfsrr_watermark); -+ break; -+ case AuWbrCreate_MFSRRV: -+ case AuWbrCreate_TDMFSV: -+ case AuWbrCreate_PMFSRRV: -+ AuDbg("%llu watermark, %d sec\n", -+ u.create->mfsrr_watermark, -+ u.create->mfs_second); -+ break; -+ } -+ break; -+ case Opt_wbr_copyup: -+ AuDbg("copyup %d, %s\n", opt->wbr_copyup, -+ au_optstr_wbr_copyup(opt->wbr_copyup)); -+ break; -+ case Opt_fhsm_sec: -+ AuDbg("fhsm_sec %u\n", opt->fhsm_second); -+ break; -+ case Opt_dirren: -+ AuLabel(dirren); -+ break; -+ case Opt_nodirren: -+ AuLabel(nodirren); -+ break; -+ case Opt_acl: -+ AuLabel(acl); -+ break; -+ case Opt_noacl: -+ AuLabel(noacl); -+ break; -+ default: -+ BUG(); -+ } -+ opt++; -+ } -+#endif -+} -+ -+void au_opts_free(struct au_opts *opts) -+{ -+ struct au_opt *opt; -+ -+ opt = opts->opt; -+ while (opt->type != Opt_tail) { -+ switch (opt->type) { -+ case Opt_add: -+ case Opt_append: -+ case Opt_prepend: -+ path_put(&opt->add.path); -+ break; -+ case Opt_del: -+ case Opt_idel: -+ path_put(&opt->del.h_path); -+ break; -+ case Opt_mod: -+ case Opt_imod: -+ dput(opt->mod.h_root); -+ break; -+ case Opt_xino: -+ fput(opt->xino.file); -+ break; -+ } -+ opt++; -+ } -+} -+ -+static int opt_add(struct au_opt *opt, char *opt_str, unsigned long sb_flags, -+ aufs_bindex_t bindex) ++int au_opt_add(struct au_opt *opt, char *opt_str, unsigned long sb_flags, ++ aufs_bindex_t bindex) +{ + int err; + struct au_opt_add *add = &opt->add; @@ -26371,10 +27226,10 @@ diff -urN /usr/share/empty/fs/aufs/opts.c linux/fs/aufs/opts.c + if (p) { + *p++ = 0; + if (*p) -+ add->perm = br_perm_val(p); ++ add->perm = au_br_perm_val(p); + } + -+ err = vfsub_kern_path(add->pathname, lkup_dirflags, &add->path); ++ err = vfsub_kern_path(add->pathname, AuOpt_LkupDirFlags, &add->path); + if (!err) { + if (!p) { + add->perm = AuBrPerm_RO; @@ -26393,460 +27248,6 @@ diff -urN /usr/share/empty/fs/aufs/opts.c linux/fs/aufs/opts.c + return err; +} + -+static int au_opts_parse_del(struct au_opt_del *del, substring_t args[]) -+{ -+ int err; -+ -+ del->pathname = args[0].from; -+ AuDbg("del path %s\n", del->pathname); -+ -+ err = vfsub_kern_path(del->pathname, lkup_dirflags, &del->h_path); -+ if (unlikely(err)) -+ pr_err("lookup failed %s (%d)\n", del->pathname, err); -+ -+ return err; -+} -+ -+#if 0 /* reserved for future use */ -+static int au_opts_parse_idel(struct super_block *sb, aufs_bindex_t bindex, -+ struct au_opt_del *del, substring_t args[]) -+{ -+ int err; -+ struct dentry *root; -+ -+ err = -EINVAL; -+ root = sb->s_root; -+ aufs_read_lock(root, AuLock_FLUSH); -+ if (bindex < 0 || au_sbbot(sb) < bindex) { -+ pr_err("out of bounds, %d\n", bindex); -+ goto out; -+ } -+ -+ err = 0; -+ del->h_path.dentry = dget(au_h_dptr(root, bindex)); -+ del->h_path.mnt = mntget(au_sbr_mnt(sb, bindex)); -+ -+out: -+ aufs_read_unlock(root, !AuLock_IR); -+ return err; -+} -+#endif -+ -+static int noinline_for_stack -+au_opts_parse_mod(struct au_opt_mod *mod, substring_t args[]) -+{ -+ int err; -+ struct path path; -+ char *p; -+ -+ err = -EINVAL; -+ mod->path = args[0].from; -+ p = strchr(mod->path, '='); -+ if (unlikely(!p)) { -+ pr_err("no permission %s\n", args[0].from); -+ goto out; -+ } -+ -+ *p++ = 0; -+ err = vfsub_kern_path(mod->path, lkup_dirflags, &path); -+ if (unlikely(err)) { -+ pr_err("lookup failed %s (%d)\n", mod->path, err); -+ goto out; -+ } -+ -+ mod->perm = br_perm_val(p); -+ AuDbg("mod path %s, perm 0x%x, %s\n", mod->path, mod->perm, p); -+ mod->h_root = dget(path.dentry); -+ path_put(&path); -+ -+out: -+ return err; -+} -+ -+#if 0 /* reserved for future use */ -+static int au_opts_parse_imod(struct super_block *sb, aufs_bindex_t bindex, -+ struct au_opt_mod *mod, substring_t args[]) -+{ -+ int err; -+ struct dentry *root; -+ -+ err = -EINVAL; -+ root = sb->s_root; -+ aufs_read_lock(root, AuLock_FLUSH); -+ if (bindex < 0 || au_sbbot(sb) < bindex) { -+ pr_err("out of bounds, %d\n", bindex); -+ goto out; -+ } -+ -+ err = 0; -+ mod->perm = br_perm_val(args[1].from); -+ AuDbg("mod path %s, perm 0x%x, %s\n", -+ mod->path, mod->perm, args[1].from); -+ mod->h_root = dget(au_h_dptr(root, bindex)); -+ -+out: -+ aufs_read_unlock(root, !AuLock_IR); -+ return err; -+} -+#endif -+ -+static int au_opts_parse_xino(struct super_block *sb, struct au_opt_xino *xino, -+ substring_t args[]) -+{ -+ int err; -+ struct file *file; -+ -+ file = au_xino_create(sb, args[0].from, /*silent*/0, /*wbrtop*/0); -+ err = PTR_ERR(file); -+ if (IS_ERR(file)) -+ goto out; -+ -+ err = -EINVAL; -+ if (unlikely(file->f_path.dentry->d_sb == sb)) { -+ fput(file); -+ pr_err("%s must be outside\n", args[0].from); -+ goto out; -+ } -+ -+ err = 0; -+ xino->file = file; -+ xino->path = args[0].from; -+ -+out: -+ return err; -+} -+ -+static int noinline_for_stack -+au_opts_parse_xino_itrunc_path(struct super_block *sb, -+ struct au_opt_xino_itrunc *xino_itrunc, -+ substring_t args[]) -+{ -+ int err; -+ aufs_bindex_t bbot, bindex; -+ struct path path; -+ struct dentry *root; -+ -+ err = vfsub_kern_path(args[0].from, lkup_dirflags, &path); -+ if (unlikely(err)) { -+ pr_err("lookup failed %s (%d)\n", args[0].from, err); -+ goto out; -+ } -+ -+ xino_itrunc->bindex = -1; -+ root = sb->s_root; -+ aufs_read_lock(root, AuLock_FLUSH); -+ bbot = au_sbbot(sb); -+ for (bindex = 0; bindex <= bbot; bindex++) { -+ if (au_h_dptr(root, bindex) == path.dentry) { -+ xino_itrunc->bindex = bindex; -+ break; -+ } -+ } -+ aufs_read_unlock(root, !AuLock_IR); -+ path_put(&path); -+ -+ if (unlikely(xino_itrunc->bindex < 0)) { -+ pr_err("no such branch %s\n", args[0].from); -+ err = -EINVAL; -+ } -+ -+out: -+ return err; -+} -+ -+/* called without aufs lock */ -+int au_opts_parse(struct super_block *sb, char *str, struct au_opts *opts) -+{ -+ int err, n, token; -+ aufs_bindex_t bindex; -+ unsigned char skipped; -+ struct dentry *root; -+ struct au_opt *opt, *opt_tail; -+ char *opt_str; -+ /* reduce the stack space */ -+ union { -+ struct au_opt_xino_itrunc *xino_itrunc; -+ struct au_opt_wbr_create *create; -+ } u; -+ struct { -+ substring_t args[MAX_OPT_ARGS]; -+ } *a; -+ -+ err = -ENOMEM; -+ a = kmalloc(sizeof(*a), GFP_NOFS); -+ if (unlikely(!a)) -+ goto out; -+ -+ root = sb->s_root; -+ err = 0; -+ bindex = 0; -+ opt = opts->opt; -+ opt_tail = opt + opts->max_opt - 1; -+ opt->type = Opt_tail; -+ while (!err && (opt_str = strsep(&str, ",")) && *opt_str) { -+ err = -EINVAL; -+ skipped = 0; -+ token = match_token(opt_str, options, a->args); -+ switch (token) { -+ case Opt_br: -+ err = 0; -+ while (!err && (opt_str = strsep(&a->args[0].from, ":")) -+ && *opt_str) { -+ err = opt_add(opt, opt_str, opts->sb_flags, -+ bindex++); -+ if (unlikely(!err && ++opt > opt_tail)) { -+ err = -E2BIG; -+ break; -+ } -+ opt->type = Opt_tail; -+ skipped = 1; -+ } -+ break; -+ case Opt_add: -+ if (unlikely(match_int(&a->args[0], &n))) { -+ pr_err("bad integer in %s\n", opt_str); -+ break; -+ } -+ bindex = n; -+ err = opt_add(opt, a->args[1].from, opts->sb_flags, -+ bindex); -+ if (!err) -+ opt->type = token; -+ break; -+ case Opt_append: -+ err = opt_add(opt, a->args[0].from, opts->sb_flags, -+ /*dummy bindex*/1); -+ if (!err) -+ opt->type = token; -+ break; -+ case Opt_prepend: -+ err = opt_add(opt, a->args[0].from, opts->sb_flags, -+ /*bindex*/0); -+ if (!err) -+ opt->type = token; -+ break; -+ case Opt_del: -+ err = au_opts_parse_del(&opt->del, a->args); -+ if (!err) -+ opt->type = token; -+ break; -+#if 0 /* reserved for future use */ -+ case Opt_idel: -+ del->pathname = "(indexed)"; -+ if (unlikely(match_int(&args[0], &n))) { -+ pr_err("bad integer in %s\n", opt_str); -+ break; -+ } -+ err = au_opts_parse_idel(sb, n, &opt->del, a->args); -+ if (!err) -+ opt->type = token; -+ break; -+#endif -+ case Opt_mod: -+ err = au_opts_parse_mod(&opt->mod, a->args); -+ if (!err) -+ opt->type = token; -+ break; -+#ifdef IMOD /* reserved for future use */ -+ case Opt_imod: -+ u.mod->path = "(indexed)"; -+ if (unlikely(match_int(&a->args[0], &n))) { -+ pr_err("bad integer in %s\n", opt_str); -+ break; -+ } -+ err = au_opts_parse_imod(sb, n, &opt->mod, a->args); -+ if (!err) -+ opt->type = token; -+ break; -+#endif -+ case Opt_xino: -+ err = au_opts_parse_xino(sb, &opt->xino, a->args); -+ if (!err) -+ opt->type = token; -+ break; -+ -+ case Opt_trunc_xino_path: -+ err = au_opts_parse_xino_itrunc_path -+ (sb, &opt->xino_itrunc, a->args); -+ if (!err) -+ opt->type = token; -+ break; -+ -+ case Opt_itrunc_xino: -+ u.xino_itrunc = &opt->xino_itrunc; -+ if (unlikely(match_int(&a->args[0], &n))) { -+ pr_err("bad integer in %s\n", opt_str); -+ break; -+ } -+ u.xino_itrunc->bindex = n; -+ aufs_read_lock(root, AuLock_FLUSH); -+ if (n < 0 || au_sbbot(sb) < n) { -+ pr_err("out of bounds, %d\n", n); -+ aufs_read_unlock(root, !AuLock_IR); -+ break; -+ } -+ aufs_read_unlock(root, !AuLock_IR); -+ err = 0; -+ opt->type = token; -+ break; -+ -+ case Opt_dirwh: -+ if (unlikely(match_int(&a->args[0], &opt->dirwh))) -+ break; -+ err = 0; -+ opt->type = token; -+ break; -+ -+ case Opt_rdcache: -+ if (unlikely(match_int(&a->args[0], &n))) { -+ pr_err("bad integer in %s\n", opt_str); -+ break; -+ } -+ if (unlikely(n > AUFS_RDCACHE_MAX)) { -+ pr_err("rdcache must be smaller than %d\n", -+ AUFS_RDCACHE_MAX); -+ break; -+ } -+ opt->rdcache = n; -+ err = 0; -+ opt->type = token; -+ break; -+ case Opt_rdblk: -+ if (unlikely(match_int(&a->args[0], &n) -+ || n < 0 -+ || n > KMALLOC_MAX_SIZE)) { -+ pr_err("bad integer in %s\n", opt_str); -+ break; -+ } -+ if (unlikely(n && n < NAME_MAX)) { -+ pr_err("rdblk must be larger than %d\n", -+ NAME_MAX); -+ break; -+ } -+ opt->rdblk = n; -+ err = 0; -+ opt->type = token; -+ break; -+ case Opt_rdhash: -+ if (unlikely(match_int(&a->args[0], &n) -+ || n < 0 -+ || n * sizeof(struct hlist_head) -+ > KMALLOC_MAX_SIZE)) { -+ pr_err("bad integer in %s\n", opt_str); -+ break; -+ } -+ opt->rdhash = n; -+ err = 0; -+ opt->type = token; -+ break; -+ -+ case Opt_trunc_xino: -+ case Opt_notrunc_xino: -+ case Opt_noxino: -+ case Opt_trunc_xib: -+ case Opt_notrunc_xib: -+ case Opt_shwh: -+ case Opt_noshwh: -+ case Opt_dirperm1: -+ case Opt_nodirperm1: -+ case Opt_plink: -+ case Opt_noplink: -+ case Opt_list_plink: -+ case Opt_dio: -+ case Opt_nodio: -+ case Opt_diropq_a: -+ case Opt_diropq_w: -+ case Opt_warn_perm: -+ case Opt_nowarn_perm: -+ case Opt_verbose: -+ case Opt_noverbose: -+ case Opt_sum: -+ case Opt_nosum: -+ case Opt_wsum: -+ case Opt_rdblk_def: -+ case Opt_rdhash_def: -+ case Opt_dirren: -+ case Opt_nodirren: -+ case Opt_acl: -+ case Opt_noacl: -+ err = 0; -+ opt->type = token; -+ break; -+ -+ case Opt_udba: -+ opt->udba = udba_val(a->args[0].from); -+ if (opt->udba >= 0) { -+ err = 0; -+ opt->type = token; -+ } else -+ pr_err("wrong value, %s\n", opt_str); -+ break; -+ -+ case Opt_wbr_create: -+ u.create = &opt->wbr_create; -+ u.create->wbr_create -+ = au_wbr_create_val(a->args[0].from, u.create); -+ if (u.create->wbr_create >= 0) { -+ err = 0; -+ opt->type = token; -+ } else -+ pr_err("wrong value, %s\n", opt_str); -+ break; -+ case Opt_wbr_copyup: -+ opt->wbr_copyup = au_wbr_copyup_val(a->args[0].from); -+ if (opt->wbr_copyup >= 0) { -+ err = 0; -+ opt->type = token; -+ } else -+ pr_err("wrong value, %s\n", opt_str); -+ break; -+ -+ case Opt_fhsm_sec: -+ if (unlikely(match_int(&a->args[0], &n) -+ || n < 0)) { -+ pr_err("bad integer in %s\n", opt_str); -+ break; -+ } -+ if (sysaufs_brs) { -+ opt->fhsm_second = n; -+ opt->type = token; -+ } else -+ pr_warn("ignored %s\n", opt_str); -+ err = 0; -+ break; -+ -+ case Opt_ignore: -+ pr_warn("ignored %s\n", opt_str); -+ fallthrough; -+ case Opt_ignore_silent: -+ skipped = 1; -+ err = 0; -+ break; -+ case Opt_err: -+ pr_err("unknown option %s\n", opt_str); -+ break; -+ } -+ -+ if (!err && !skipped) { -+ if (unlikely(++opt > opt_tail)) { -+ err = -E2BIG; -+ opt--; -+ opt->type = Opt_tail; -+ break; -+ } -+ opt->type = Opt_tail; -+ } -+ } -+ -+ au_kfree_rcu(a); -+ dump_opts(opts); -+ if (unlikely(err)) -+ au_opts_free(opts); -+ -+out: -+ return err; -+} -+ +static int au_opt_wbr_create(struct super_block *sb, + struct au_opt_wbr_create *create) +{ @@ -26912,12 +27313,13 @@ diff -urN /usr/share/empty/fs/aufs/opts.c linux/fs/aufs/opts.c + break; + + case Opt_plink: -+ au_opt_set(sbinfo->si_mntflags, PLINK); -+ break; -+ case Opt_noplink: -+ if (au_opt_test(sbinfo->si_mntflags, PLINK)) -+ au_plink_put(sb, /*verbose*/1); -+ au_opt_clr(sbinfo->si_mntflags, PLINK); ++ if (opt->tf) ++ au_opt_set(sbinfo->si_mntflags, PLINK); ++ else { ++ if (au_opt_test(sbinfo->si_mntflags, PLINK)) ++ au_plink_put(sb, /*verbose*/1); ++ au_opt_clr(sbinfo->si_mntflags, PLINK); ++ } + break; + case Opt_list_plink: + if (au_opt_test(sbinfo->si_mntflags, PLINK)) @@ -26925,12 +27327,13 @@ diff -urN /usr/share/empty/fs/aufs/opts.c linux/fs/aufs/opts.c + break; + + case Opt_dio: -+ au_opt_set(sbinfo->si_mntflags, DIO); -+ au_fset_opts(opts->flags, REFRESH_DYAOP); -+ break; -+ case Opt_nodio: -+ au_opt_clr(sbinfo->si_mntflags, DIO); -+ au_fset_opts(opts->flags, REFRESH_DYAOP); ++ if (opt->tf) { ++ au_opt_set(sbinfo->si_mntflags, DIO); ++ au_fset_opts(opts->flags, REFRESH_DYAOP); ++ } else { ++ au_opt_clr(sbinfo->si_mntflags, DIO); ++ au_fset_opts(opts->flags, REFRESH_DYAOP); ++ } + break; + + case Opt_fhsm_sec: @@ -26945,30 +27348,31 @@ diff -urN /usr/share/empty/fs/aufs/opts.c linux/fs/aufs/opts.c + break; + + case Opt_warn_perm: -+ au_opt_set(sbinfo->si_mntflags, WARN_PERM); -+ break; -+ case Opt_nowarn_perm: -+ au_opt_clr(sbinfo->si_mntflags, WARN_PERM); ++ if (opt->tf) ++ au_opt_set(sbinfo->si_mntflags, WARN_PERM); ++ else ++ au_opt_clr(sbinfo->si_mntflags, WARN_PERM); + break; + + case Opt_verbose: -+ au_opt_set(sbinfo->si_mntflags, VERBOSE); -+ break; -+ case Opt_noverbose: -+ au_opt_clr(sbinfo->si_mntflags, VERBOSE); ++ if (opt->tf) ++ au_opt_set(sbinfo->si_mntflags, VERBOSE); ++ else ++ au_opt_clr(sbinfo->si_mntflags, VERBOSE); + break; + + case Opt_sum: -+ au_opt_set(sbinfo->si_mntflags, SUM); ++ if (opt->tf) ++ au_opt_set(sbinfo->si_mntflags, SUM); ++ else { ++ au_opt_clr(sbinfo->si_mntflags, SUM); ++ au_opt_clr(sbinfo->si_mntflags, SUM_W); ++ } + break; + case Opt_wsum: + au_opt_clr(sbinfo->si_mntflags, SUM); + au_opt_set(sbinfo->si_mntflags, SUM_W); + break; -+ case Opt_nosum: -+ au_opt_clr(sbinfo->si_mntflags, SUM); -+ au_opt_clr(sbinfo->si_mntflags, SUM_W); -+ break; + + case Opt_wbr_create: + err = au_opt_wbr_create(sb, &opt->wbr_create); @@ -26989,35 +27393,29 @@ diff -urN /usr/share/empty/fs/aufs/opts.c linux/fs/aufs/opts.c + case Opt_rdblk: + sbinfo->si_rdblk = opt->rdblk; + break; -+ case Opt_rdblk_def: -+ sbinfo->si_rdblk = AUFS_RDBLK_DEF; -+ break; + case Opt_rdhash: + sbinfo->si_rdhash = opt->rdhash; + break; -+ case Opt_rdhash_def: -+ sbinfo->si_rdhash = AUFS_RDHASH_DEF; -+ break; + + case Opt_shwh: -+ au_opt_set(sbinfo->si_mntflags, SHWH); -+ break; -+ case Opt_noshwh: -+ au_opt_clr(sbinfo->si_mntflags, SHWH); ++ if (opt->tf) ++ au_opt_set(sbinfo->si_mntflags, SHWH); ++ else ++ au_opt_clr(sbinfo->si_mntflags, SHWH); + break; + + case Opt_dirperm1: -+ au_opt_set(sbinfo->si_mntflags, DIRPERM1); -+ break; -+ case Opt_nodirperm1: -+ au_opt_clr(sbinfo->si_mntflags, DIRPERM1); ++ if (opt->tf) ++ au_opt_set(sbinfo->si_mntflags, DIRPERM1); ++ else ++ au_opt_clr(sbinfo->si_mntflags, DIRPERM1); + break; + + case Opt_trunc_xino: -+ au_opt_set(sbinfo->si_mntflags, TRUNC_XINO); -+ break; -+ case Opt_notrunc_xino: -+ au_opt_clr(sbinfo->si_mntflags, TRUNC_XINO); ++ if (opt->tf) ++ au_opt_set(sbinfo->si_mntflags, TRUNC_XINO); ++ else ++ au_opt_clr(sbinfo->si_mntflags, TRUNC_XINO); + break; + + case Opt_trunc_xino_path: @@ -27029,39 +27427,39 @@ diff -urN /usr/share/empty/fs/aufs/opts.c linux/fs/aufs/opts.c + break; + + case Opt_trunc_xib: -+ au_fset_opts(opts->flags, TRUNC_XIB); -+ break; -+ case Opt_notrunc_xib: -+ au_fclr_opts(opts->flags, TRUNC_XIB); ++ if (opt->tf) ++ au_fset_opts(opts->flags, TRUNC_XIB); ++ else ++ au_fclr_opts(opts->flags, TRUNC_XIB); + break; + + case Opt_dirren: + err = 1; -+ if (!au_opt_test(sbinfo->si_mntflags, DIRREN)) { -+ err = au_dr_opt_set(sb); -+ if (!err) -+ err = 1; -+ } -+ if (err == 1) -+ au_opt_set(sbinfo->si_mntflags, DIRREN); -+ break; -+ case Opt_nodirren: -+ err = 1; -+ if (au_opt_test(sbinfo->si_mntflags, DIRREN)) { -+ err = au_dr_opt_clr(sb, au_ftest_opts(opts->flags, -+ DR_FLUSHED)); -+ if (!err) -+ err = 1; ++ if (opt->tf) { ++ if (!au_opt_test(sbinfo->si_mntflags, DIRREN)) { ++ err = au_dr_opt_set(sb); ++ if (!err) ++ err = 1; ++ } ++ if (err == 1) ++ au_opt_set(sbinfo->si_mntflags, DIRREN); ++ } else { ++ if (au_opt_test(sbinfo->si_mntflags, DIRREN)) { ++ err = au_dr_opt_clr(sb, au_ftest_opts(opts->flags, ++ DR_FLUSHED)); ++ if (!err) ++ err = 1; ++ } ++ if (err == 1) ++ au_opt_clr(sbinfo->si_mntflags, DIRREN); + } -+ if (err == 1) -+ au_opt_clr(sbinfo->si_mntflags, DIRREN); + break; + + case Opt_acl: -+ sb->s_flags |= SB_POSIXACL; -+ break; -+ case Opt_noacl: -+ sb->s_flags &= ~SB_POSIXACL; ++ if (opt->tf) ++ sb->s_flags |= SB_POSIXACL; ++ else ++ sb->s_flags &= ~SB_POSIXACL; + break; + + default: @@ -27141,12 +27539,9 @@ diff -urN /usr/share/empty/fs/aufs/opts.c linux/fs/aufs/opts.c + case Opt_xino: + err = au_xino_set(sb, &opt->xino, + !!au_ftest_opts(opts->flags, REMOUNT)); -+ if (unlikely(err)) -+ break; -+ -+ *opt_xino = &opt->xino; ++ if (!err) ++ *opt_xino = &opt->xino; + break; -+ + case Opt_noxino: + au_xino_clr(sb); + *opt_xino = (void *)-1; @@ -27458,8 +27853,8 @@ diff -urN /usr/share/empty/fs/aufs/opts.c linux/fs/aufs/opts.c +} diff -urN /usr/share/empty/fs/aufs/opts.h linux/fs/aufs/opts.h --- /usr/share/empty/fs/aufs/opts.h 1970-01-01 01:00:00.000000000 +0100 -+++ linux/fs/aufs/opts.h 2021-12-03 15:38:59.939980643 +0100 -@@ -0,0 +1,225 @@ ++++ linux/fs/aufs/opts.h 2022-03-21 14:49:05.729966343 +0100 +@@ -0,0 +1,263 @@ +/* SPDX-License-Identifier: GPL-2.0 */ +/* + * Copyright (C) 2005-2021 Junjiro R. Okajima @@ -27487,9 +27882,34 @@ diff -urN /usr/share/empty/fs/aufs/opts.h linux/fs/aufs/opts.h + +#ifdef __KERNEL__ + ++#include ++#include +#include + -+struct file; ++enum { ++ Opt_br, ++ Opt_add, Opt_del, Opt_mod, Opt_append, Opt_prepend, ++ Opt_idel, Opt_imod, ++ Opt_dirwh, Opt_rdcache, Opt_rdblk, Opt_rdhash, ++ Opt_xino, Opt_noxino, ++ Opt_trunc_xino, Opt_trunc_xino_v, ++ Opt_trunc_xino_path, Opt_itrunc_xino, ++ Opt_trunc_xib, ++ Opt_shwh, ++ Opt_plink, Opt_list_plink, ++ Opt_udba, ++ Opt_dio, ++ Opt_diropq, Opt_diropq_a, Opt_diropq_w, ++ Opt_warn_perm, ++ Opt_wbr_copyup, Opt_wbr_create, ++ Opt_fhsm_sec, ++ Opt_verbose, Opt_noverbose, ++ Opt_sum, Opt_wsum, ++ Opt_dirperm1, ++ Opt_dirren, ++ Opt_acl, ++ Opt_tail, Opt_ignore, Opt_ignore_silent, Opt_err ++}; + +/* ---------------------------------------------------------------------- */ + @@ -27534,6 +27954,8 @@ diff -urN /usr/share/empty/fs/aufs/opts.h linux/fs/aufs/opts.h + | AuOpt_UDBA_REVAL \ + | AuOpt_UDBA_HNOTIFY) + ++#define AuOpt_LkupDirFlags (LOOKUP_FOLLOW | LOOKUP_DIRECTORY) ++ +#define au_opt_test(flags, name) (flags & AuOpt_##name) +#define au_opt_set(flags, name) do { \ + BUILD_BUG_ON(AuOpt_##name & AuOptMask_UDBA); \ @@ -27586,6 +28008,8 @@ diff -urN /usr/share/empty/fs/aufs/opts.h linux/fs/aufs/opts.h + +/* ---------------------------------------------------------------------- */ + ++struct file; ++ +struct au_opt_add { + aufs_bindex_t bindex; + char *pathname; @@ -27635,6 +28059,7 @@ diff -urN /usr/share/empty/fs/aufs/opts.h linux/fs/aufs/opts.h + struct au_opt_wbr_create wbr_create; + int wbr_copyup; + unsigned int fhsm_second; ++ bool tf; /* generic flag, true or false */ + }; +}; + @@ -27668,14 +28093,18 @@ diff -urN /usr/share/empty/fs/aufs/opts.h linux/fs/aufs/opts.h +/* ---------------------------------------------------------------------- */ + +/* opts.c */ ++int au_br_perm_val(char *perm); +void au_optstr_br_perm(au_br_perm_str_t *str, int perm); ++int au_udba_val(char *str); +const char *au_optstr_udba(int udba); -+const char *au_optstr_wbr_copyup(int wbr_copyup); ++int au_wbr_create_val(char *str, struct au_opt_wbr_create *create); +const char *au_optstr_wbr_create(int wbr_create); ++int au_wbr_copyup_val(char *str); ++const char *au_optstr_wbr_copyup(int wbr_copyup); + -+void au_opts_free(struct au_opts *opts); ++int au_opt_add(struct au_opt *opt, char *opt_str, unsigned long sb_flags, ++ aufs_bindex_t bindex); +struct super_block; -+int au_opts_parse(struct super_block *sb, char *str, struct au_opts *opts); +int au_opts_verify(struct super_block *sb, unsigned long sb_flags, + unsigned int pending); +int au_opts_mount(struct super_block *sb, struct au_opts *opts); @@ -27683,11 +28112,15 @@ diff -urN /usr/share/empty/fs/aufs/opts.h linux/fs/aufs/opts.h + +unsigned int au_opt_udba(struct super_block *sb); + ++/* fsctx.c */ ++int aufs_fsctx_init(struct fs_context *fc); ++extern const struct fs_parameter_spec aufs_fsctx_paramspec[]; ++ +#endif /* __KERNEL__ */ +#endif /* __AUFS_OPTS_H__ */ diff -urN /usr/share/empty/fs/aufs/plink.c linux/fs/aufs/plink.c --- /usr/share/empty/fs/aufs/plink.c 1970-01-01 01:00:00.000000000 +0100 -+++ linux/fs/aufs/plink.c 2021-12-03 15:38:59.939980643 +0100 ++++ linux/fs/aufs/plink.c 2022-03-21 14:49:05.729966343 +0100 @@ -0,0 +1,516 @@ +// SPDX-License-Identifier: GPL-2.0 +/* @@ -28207,7 +28640,7 @@ diff -urN /usr/share/empty/fs/aufs/plink.c linux/fs/aufs/plink.c +} diff -urN /usr/share/empty/fs/aufs/poll.c linux/fs/aufs/poll.c --- /usr/share/empty/fs/aufs/poll.c 1970-01-01 01:00:00.000000000 +0100 -+++ linux/fs/aufs/poll.c 2021-12-03 15:38:59.939980643 +0100 ++++ linux/fs/aufs/poll.c 2022-03-21 14:49:05.729966343 +0100 @@ -0,0 +1,51 @@ +// SPDX-License-Identifier: GPL-2.0 +/* @@ -28262,7 +28695,7 @@ diff -urN /usr/share/empty/fs/aufs/poll.c linux/fs/aufs/poll.c +} diff -urN /usr/share/empty/fs/aufs/posix_acl.c linux/fs/aufs/posix_acl.c --- /usr/share/empty/fs/aufs/posix_acl.c 1970-01-01 01:00:00.000000000 +0100 -+++ linux/fs/aufs/posix_acl.c 2021-12-03 15:40:58.236647297 +0100 ++++ linux/fs/aufs/posix_acl.c 2022-03-21 14:49:05.729966343 +0100 @@ -0,0 +1,111 @@ +// SPDX-License-Identifier: GPL-2.0 +/* @@ -28377,7 +28810,7 @@ diff -urN /usr/share/empty/fs/aufs/posix_acl.c linux/fs/aufs/posix_acl.c +} diff -urN /usr/share/empty/fs/aufs/procfs.c linux/fs/aufs/procfs.c --- /usr/share/empty/fs/aufs/procfs.c 1970-01-01 01:00:00.000000000 +0100 -+++ linux/fs/aufs/procfs.c 2021-12-03 15:38:59.939980643 +0100 ++++ linux/fs/aufs/procfs.c 2022-03-21 14:49:05.729966343 +0100 @@ -0,0 +1,170 @@ +// SPDX-License-Identifier: GPL-2.0 +/* @@ -28551,7 +28984,7 @@ diff -urN /usr/share/empty/fs/aufs/procfs.c linux/fs/aufs/procfs.c +} diff -urN /usr/share/empty/fs/aufs/rdu.c linux/fs/aufs/rdu.c --- /usr/share/empty/fs/aufs/rdu.c 1970-01-01 01:00:00.000000000 +0100 -+++ linux/fs/aufs/rdu.c 2021-12-03 15:38:59.939980643 +0100 ++++ linux/fs/aufs/rdu.c 2022-03-21 14:49:05.729966343 +0100 @@ -0,0 +1,384 @@ +// SPDX-License-Identifier: GPL-2.0 +/* @@ -28939,7 +29372,7 @@ diff -urN /usr/share/empty/fs/aufs/rdu.c linux/fs/aufs/rdu.c +#endif diff -urN /usr/share/empty/fs/aufs/rwsem.h linux/fs/aufs/rwsem.h --- /usr/share/empty/fs/aufs/rwsem.h 1970-01-01 01:00:00.000000000 +0100 -+++ linux/fs/aufs/rwsem.h 2021-12-03 15:40:58.236647297 +0100 ++++ linux/fs/aufs/rwsem.h 2022-03-21 14:49:05.729966343 +0100 @@ -0,0 +1,85 @@ +/* SPDX-License-Identifier: GPL-2.0 */ +/* @@ -29028,8 +29461,8 @@ diff -urN /usr/share/empty/fs/aufs/rwsem.h linux/fs/aufs/rwsem.h +#endif /* __AUFS_RWSEM_H__ */ diff -urN /usr/share/empty/fs/aufs/sbinfo.c linux/fs/aufs/sbinfo.c --- /usr/share/empty/fs/aufs/sbinfo.c 1970-01-01 01:00:00.000000000 +0100 -+++ linux/fs/aufs/sbinfo.c 2021-12-03 15:38:59.939980643 +0100 -@@ -0,0 +1,314 @@ ++++ linux/fs/aufs/sbinfo.c 2022-03-21 14:49:05.729966343 +0100 +@@ -0,0 +1,316 @@ +// SPDX-License-Identifier: GPL-2.0 +/* + * Copyright (C) 2005-2021 Junjiro R. Okajima @@ -29088,10 +29521,10 @@ diff -urN /usr/share/empty/fs/aufs/sbinfo.c linux/fs/aufs/sbinfo.c + au_kfree_rcu(sbinfo); +} + -+int au_si_alloc(struct super_block *sb) ++struct au_sbinfo *au_si_alloc(struct super_block *sb) +{ -+ int err, i; + struct au_sbinfo *sbinfo; ++ int err, i; + + err = -ENOMEM; + sbinfo = kzalloc(sizeof(*sbinfo), GFP_NOFS); @@ -29156,16 +29589,18 @@ diff -urN /usr/share/empty/fs/aufs/sbinfo.c linux/fs/aufs/sbinfo.c + + /* leave other members for sysaufs and si_mnt. */ + sbinfo->si_sb = sb; -+ sb->s_fs_info = sbinfo; -+ si_pid_set(sb); -+ return 0; /* success */ ++ if (sb) { ++ sb->s_fs_info = sbinfo; ++ si_pid_set(sb); ++ } ++ return sbinfo; /* success */ + +out_br: + au_kfree_try_rcu(sbinfo->si_branch); +out_sbinfo: + au_kfree_rcu(sbinfo); +out: -+ return err; ++ return ERR_PTR(err); +} + +int au_sbr_realloc(struct au_sbinfo *sbinfo, int nbr, int may_shrink) @@ -29346,8 +29781,8 @@ diff -urN /usr/share/empty/fs/aufs/sbinfo.c linux/fs/aufs/sbinfo.c +} diff -urN /usr/share/empty/fs/aufs/super.c linux/fs/aufs/super.c --- /usr/share/empty/fs/aufs/super.c 1970-01-01 01:00:00.000000000 +0100 -+++ linux/fs/aufs/super.c 2022-01-13 12:42:15.932899468 +0100 -@@ -0,0 +1,1050 @@ ++++ linux/fs/aufs/super.c 2022-03-21 14:49:05.729966343 +0100 +@@ -0,0 +1,871 @@ +// SPDX-License-Identifier: GPL-2.0 +/* + * Copyright (C) 2005-2021 Junjiro R. Okajima @@ -30051,7 +30486,7 @@ diff -urN /usr/share/empty/fs/aufs/super.c linux/fs/aufs/super.c + return err; +} + -+static void au_remount_refresh(struct super_block *sb, unsigned int do_idop) ++void au_remount_refresh(struct super_block *sb, unsigned int do_idop) +{ + int err, e; + unsigned int udba; @@ -30112,92 +30547,7 @@ diff -urN /usr/share/empty/fs/aufs/super.c linux/fs/aufs/super.c + AuIOErr("refresh failed, ignored, %d\n", err); +} + -+/* stop extra interpretation of errno in mount(8), and strange error messages */ -+static int cvt_err(int err) -+{ -+ AuTraceErr(err); -+ -+ switch (err) { -+ case -ENOENT: -+ case -ENOTDIR: -+ case -EEXIST: -+ case -EIO: -+ err = -EINVAL; -+ } -+ return err; -+} -+ -+static int aufs_remount_fs(struct super_block *sb, int *flags, char *data) -+{ -+ int err, do_dx; -+ unsigned int mntflags; -+ struct au_opts opts = { -+ .opt = NULL -+ }; -+ struct dentry *root; -+ struct inode *inode; -+ struct au_sbinfo *sbinfo; -+ -+ err = 0; -+ root = sb->s_root; -+ if (!data || !*data) { -+ err = si_write_lock(sb, AuLock_FLUSH | AuLock_NOPLM); -+ if (!err) { -+ di_write_lock_child(root); -+ err = au_opts_verify(sb, *flags, /*pending*/0); -+ aufs_write_unlock(root); -+ } -+ goto out; -+ } -+ -+ err = -ENOMEM; -+ opts.opt = (void *)__get_free_page(GFP_NOFS); -+ if (unlikely(!opts.opt)) -+ goto out; -+ opts.max_opt = PAGE_SIZE / sizeof(*opts.opt); -+ opts.flags = AuOpts_REMOUNT; -+ opts.sb_flags = *flags; -+ -+ /* parse it before aufs lock */ -+ err = au_opts_parse(sb, data, &opts); -+ if (unlikely(err)) -+ goto out_opts; -+ -+ sbinfo = au_sbi(sb); -+ inode = d_inode(root); -+ inode_lock(inode); -+ err = si_write_lock(sb, AuLock_FLUSH | AuLock_NOPLM); -+ if (unlikely(err)) -+ goto out_mtx; -+ di_write_lock_child(root); -+ -+ /* au_opts_remount() may return an error */ -+ err = au_opts_remount(sb, &opts); -+ au_opts_free(&opts); -+ -+ if (au_ftest_opts(opts.flags, REFRESH)) -+ au_remount_refresh(sb, au_ftest_opts(opts.flags, REFRESH_IDOP)); -+ -+ if (au_ftest_opts(opts.flags, REFRESH_DYAOP)) { -+ mntflags = au_mntflags(sb); -+ do_dx = !!au_opt_test(mntflags, DIO); -+ au_dy_arefresh(do_dx); -+ } -+ -+ au_fhsm_wrote_all(sb, /*force*/1); /* ?? */ -+ aufs_write_unlock(root); -+ -+out_mtx: -+ inode_unlock(inode); -+out_opts: -+ free_page((unsigned long)opts.opt); -+out: -+ err = cvt_err(err); -+ AuTraceErr(err); -+ return err; -+} -+ -+static const struct super_operations aufs_sop = { ++const struct super_operations aufs_sop = { + .alloc_inode = aufs_alloc_inode, + .destroy_inode = aufs_destroy_inode, + .free_inode = aufs_free_inode, @@ -30206,13 +30556,12 @@ diff -urN /usr/share/empty/fs/aufs/super.c linux/fs/aufs/super.c + .show_options = aufs_show_options, + .statfs = aufs_statfs, + .put_super = aufs_put_super, -+ .sync_fs = aufs_sync_fs, -+ .remount_fs = aufs_remount_fs ++ .sync_fs = aufs_sync_fs +}; + +/* ---------------------------------------------------------------------- */ + -+static int alloc_root(struct super_block *sb) ++int au_alloc_root(struct super_block *sb) +{ + int err; + struct inode *inode; @@ -30248,141 +30597,47 @@ diff -urN /usr/share/empty/fs/aufs/super.c linux/fs/aufs/super.c + return err; +} + -+static int aufs_fill_super(struct super_block *sb, void *raw_data, -+ int silent __maybe_unused) ++/* ---------------------------------------------------------------------- */ ++ ++static void aufs_kill_sb(struct super_block *sb) +{ -+ int err; -+ struct au_opts opts = { -+ .opt = NULL -+ }; + struct au_sbinfo *sbinfo; + struct dentry *root; -+ struct inode *inode; -+ char *arg = raw_data; -+ -+ if (unlikely(!arg || !*arg)) { -+ err = -EINVAL; -+ pr_err("no arg\n"); -+ goto out; -+ } -+ -+ err = -ENOMEM; -+ opts.opt = (void *)__get_free_page(GFP_NOFS); -+ if (unlikely(!opts.opt)) -+ goto out; -+ opts.max_opt = PAGE_SIZE / sizeof(*opts.opt); -+ opts.sb_flags = sb->s_flags; + -+ err = au_si_alloc(sb); -+ if (unlikely(err)) -+ goto out_opts; + sbinfo = au_sbi(sb); ++ if (!sbinfo) ++ goto out; + -+ /* all timestamps always follow the ones on the branch */ -+ sb->s_flags |= SB_NOATIME | SB_NODIRATIME; -+ sb->s_flags |= SB_I_VERSION; /* do we really need this? */ -+ sb->s_op = &aufs_sop; -+ sb->s_d_op = &aufs_dop; -+ sb->s_magic = AUFS_SUPER_MAGIC; -+ sb->s_maxbytes = 0; -+ sb->s_stack_depth = 1; -+ au_export_init(sb); -+ au_xattr_init(sb); ++ au_sbilist_del(sb); + -+ err = alloc_root(sb); -+ if (unlikely(err)) { -+ si_write_unlock(sb); -+ goto out_info; -+ } + root = sb->s_root; -+ inode = d_inode(root); -+ -+ /* -+ * actually we can parse options regardless aufs lock here. -+ * but at remount time, parsing must be done before aufs lock. -+ * so we follow the same rule. -+ */ -+ ii_write_lock_parent(inode); -+ aufs_write_unlock(root); -+ err = au_opts_parse(sb, arg, &opts); -+ if (unlikely(err)) -+ goto out_root; ++ if (root) ++ aufs_write_lock(root); ++ else ++ __si_write_lock(sb); + -+ /* lock vfs_inode first, then aufs. */ -+ inode_lock(inode); -+ aufs_write_lock(root); -+ err = au_opts_mount(sb, &opts); -+ au_opts_free(&opts); -+ if (!err && au_ftest_si(sbinfo, NO_DREVAL)) { -+ sb->s_d_op = &aufs_dop_noreval; -+ pr_info("%ps\n", sb->s_d_op); -+ au_refresh_dop(root, /*force_reval*/0); -+ sbinfo->si_iop_array = aufs_iop_nogetattr; -+ au_refresh_iop(inode, /*force_getattr*/0); ++ au_fhsm_fin(sb); ++ if (sbinfo->si_wbr_create_ops->fin) ++ sbinfo->si_wbr_create_ops->fin(sb); ++ if (au_opt_test(sbinfo->si_mntflags, UDBA_HNOTIFY)) { ++ au_opt_set_udba(sbinfo->si_mntflags, UDBA_NONE); ++ au_remount_refresh(sb, /*do_idop*/0); + } -+ aufs_write_unlock(root); -+ inode_unlock(inode); -+ if (!err) -+ goto out_opts; /* success */ -+ -+out_root: -+ dput(root); -+ sb->s_root = NULL; -+out_info: -+ kobject_put(&sbinfo->si_kobj); -+ sb->s_fs_info = NULL; -+out_opts: -+ free_page((unsigned long)opts.opt); -+out: -+ AuTraceErr(err); -+ err = cvt_err(err); -+ AuTraceErr(err); -+ return err; -+} -+ -+/* ---------------------------------------------------------------------- */ -+ -+static struct dentry *aufs_mount(struct file_system_type *fs_type, int flags, -+ const char *dev_name __maybe_unused, -+ void *raw_data) -+{ -+ struct dentry *root; ++ if (au_opt_test(sbinfo->si_mntflags, PLINK)) ++ au_plink_put(sb, /*verbose*/1); ++ au_xino_clr(sb); ++ if (root) ++ au_dr_opt_flush(sb); + -+ /* all timestamps always follow the ones on the branch */ -+ /* mnt->mnt_flags |= MNT_NOATIME | MNT_NODIRATIME; */ -+ root = mount_nodev(fs_type, flags, raw_data, aufs_fill_super); -+ if (IS_ERR(root)) -+ goto out; ++ if (root) ++ aufs_write_unlock(root); ++ else ++ __si_write_unlock(sb); + -+ au_sbilist_add(root->d_sb); ++ sbinfo->si_sb = NULL; ++ au_nwt_flush(&sbinfo->si_nowait); + +out: -+ return root; -+} -+ -+static void aufs_kill_sb(struct super_block *sb) -+{ -+ struct au_sbinfo *sbinfo; -+ -+ sbinfo = au_sbi(sb); -+ if (sbinfo) { -+ au_sbilist_del(sb); -+ aufs_write_lock(sb->s_root); -+ au_fhsm_fin(sb); -+ if (sbinfo->si_wbr_create_ops->fin) -+ sbinfo->si_wbr_create_ops->fin(sb); -+ if (au_opt_test(sbinfo->si_mntflags, UDBA_HNOTIFY)) { -+ au_opt_set_udba(sbinfo->si_mntflags, UDBA_NONE); -+ au_remount_refresh(sb, /*do_idop*/0); -+ } -+ if (au_opt_test(sbinfo->si_mntflags, PLINK)) -+ au_plink_put(sb, /*verbose*/1); -+ au_xino_clr(sb); -+ au_dr_opt_flush(sb); -+ sbinfo->si_sb = NULL; -+ aufs_write_unlock(sb->s_root); -+ au_nwt_flush(&sbinfo->si_nowait); -+ } + kill_anon_super(sb); +} + @@ -30393,15 +30648,16 @@ diff -urN /usr/share/empty/fs/aufs/super.c linux/fs/aufs/super.c + /* untested */ + /*| FS_ALLOW_IDMAP*/ + , -+ .mount = aufs_mount, ++ .init_fs_context = aufs_fsctx_init, ++ .parameters = aufs_fsctx_paramspec, + .kill_sb = aufs_kill_sb, + /* no need to __module_get() and module_put(). */ + .owner = THIS_MODULE, +}; diff -urN /usr/share/empty/fs/aufs/super.h linux/fs/aufs/super.h --- /usr/share/empty/fs/aufs/super.h 1970-01-01 01:00:00.000000000 +0100 -+++ linux/fs/aufs/super.h 2021-12-03 15:38:59.939980643 +0100 -@@ -0,0 +1,587 @@ ++++ linux/fs/aufs/super.h 2022-03-21 14:49:05.729966343 +0100 +@@ -0,0 +1,592 @@ +/* SPDX-License-Identifier: GPL-2.0 */ +/* + * Copyright (C) 2005-2021 Junjiro R. Okajima @@ -30665,8 +30921,8 @@ diff -urN /usr/share/empty/fs/aufs/super.h linux/fs/aufs/super.h +/* ---------------------------------------------------------------------- */ + +/* super.c */ -+extern struct file_system_type aufs_fs_type; +struct inode *au_iget_locked(struct super_block *sb, ino_t ino); ++ +typedef unsigned long long (*au_arraycb_t)(struct super_block *sb, void *array, + unsigned long long max, void *arg); +void *au_array_alloc(unsigned long long *hint, au_arraycb_t cb, @@ -30674,9 +30930,14 @@ diff -urN /usr/share/empty/fs/aufs/super.h linux/fs/aufs/super.h +struct inode **au_iarray_alloc(struct super_block *sb, unsigned long long *max); +void au_iarray_free(struct inode **a, unsigned long long max); + ++void au_remount_refresh(struct super_block *sb, unsigned int do_idop); ++extern const struct super_operations aufs_sop; ++int au_alloc_root(struct super_block *sb); ++extern struct file_system_type aufs_fs_type; ++ +/* sbinfo.c */ +void au_si_free(struct kobject *kobj); -+int au_si_alloc(struct super_block *sb); ++struct au_sbinfo *au_si_alloc(struct super_block *sb); +int au_sbr_realloc(struct au_sbinfo *sbinfo, int nbr, int may_shrink); + +unsigned int au_sigen_inc(struct super_block *sb); @@ -30991,7 +31252,7 @@ diff -urN /usr/share/empty/fs/aufs/super.h linux/fs/aufs/super.h +#endif /* __AUFS_SUPER_H__ */ diff -urN /usr/share/empty/fs/aufs/sysaufs.c linux/fs/aufs/sysaufs.c --- /usr/share/empty/fs/aufs/sysaufs.c 1970-01-01 01:00:00.000000000 +0100 -+++ linux/fs/aufs/sysaufs.c 2021-12-03 15:38:59.939980643 +0100 ++++ linux/fs/aufs/sysaufs.c 2022-03-21 14:49:05.729966343 +0100 @@ -0,0 +1,93 @@ +// SPDX-License-Identifier: GPL-2.0 +/* @@ -31088,7 +31349,7 @@ diff -urN /usr/share/empty/fs/aufs/sysaufs.c linux/fs/aufs/sysaufs.c +} diff -urN /usr/share/empty/fs/aufs/sysaufs.h linux/fs/aufs/sysaufs.h --- /usr/share/empty/fs/aufs/sysaufs.h 1970-01-01 01:00:00.000000000 +0100 -+++ linux/fs/aufs/sysaufs.h 2021-12-03 15:38:59.939980643 +0100 ++++ linux/fs/aufs/sysaufs.h 2022-03-21 14:49:05.729966343 +0100 @@ -0,0 +1,102 @@ +/* SPDX-License-Identifier: GPL-2.0 */ +/* @@ -31194,7 +31455,7 @@ diff -urN /usr/share/empty/fs/aufs/sysaufs.h linux/fs/aufs/sysaufs.h +#endif /* __SYSAUFS_H__ */ diff -urN /usr/share/empty/fs/aufs/sysfs.c linux/fs/aufs/sysfs.c --- /usr/share/empty/fs/aufs/sysfs.c 1970-01-01 01:00:00.000000000 +0100 -+++ linux/fs/aufs/sysfs.c 2021-12-03 15:38:59.939980643 +0100 ++++ linux/fs/aufs/sysfs.c 2022-03-21 14:49:05.729966343 +0100 @@ -0,0 +1,374 @@ +// SPDX-License-Identifier: GPL-2.0 +/* @@ -31572,7 +31833,7 @@ diff -urN /usr/share/empty/fs/aufs/sysfs.c linux/fs/aufs/sysfs.c +} diff -urN /usr/share/empty/fs/aufs/sysrq.c linux/fs/aufs/sysrq.c --- /usr/share/empty/fs/aufs/sysrq.c 1970-01-01 01:00:00.000000000 +0100 -+++ linux/fs/aufs/sysrq.c 2021-12-03 15:38:59.939980643 +0100 ++++ linux/fs/aufs/sysrq.c 2022-03-21 14:49:05.729966343 +0100 @@ -0,0 +1,149 @@ +// SPDX-License-Identifier: GPL-2.0 +/* @@ -31725,7 +31986,7 @@ diff -urN /usr/share/empty/fs/aufs/sysrq.c linux/fs/aufs/sysrq.c +} diff -urN /usr/share/empty/fs/aufs/vdir.c linux/fs/aufs/vdir.c --- /usr/share/empty/fs/aufs/vdir.c 1970-01-01 01:00:00.000000000 +0100 -+++ linux/fs/aufs/vdir.c 2021-12-03 15:38:59.939980643 +0100 ++++ linux/fs/aufs/vdir.c 2022-03-21 14:49:05.733299677 +0100 @@ -0,0 +1,896 @@ +// SPDX-License-Identifier: GPL-2.0 +/* @@ -32625,8 +32886,8 @@ diff -urN /usr/share/empty/fs/aufs/vdir.c linux/fs/aufs/vdir.c +} diff -urN /usr/share/empty/fs/aufs/vfsub.c linux/fs/aufs/vfsub.c --- /usr/share/empty/fs/aufs/vfsub.c 1970-01-01 01:00:00.000000000 +0100 -+++ linux/fs/aufs/vfsub.c 2022-01-13 12:42:15.932899468 +0100 -@@ -0,0 +1,919 @@ ++++ linux/fs/aufs/vfsub.c 2022-03-21 14:49:05.733299677 +0100 +@@ -0,0 +1,918 @@ +// SPDX-License-Identifier: GPL-2.0 +/* + * Copyright (C) 2005-2021 Junjiro R. Okajima @@ -32650,7 +32911,6 @@ diff -urN /usr/share/empty/fs/aufs/vfsub.c linux/fs/aufs/vfsub.c + */ + +#include -+#include +#include +#include +#include @@ -33548,7 +33808,7 @@ diff -urN /usr/share/empty/fs/aufs/vfsub.c linux/fs/aufs/vfsub.c +} diff -urN /usr/share/empty/fs/aufs/vfsub.h linux/fs/aufs/vfsub.h --- /usr/share/empty/fs/aufs/vfsub.h 1970-01-01 01:00:00.000000000 +0100 -+++ linux/fs/aufs/vfsub.h 2022-01-13 12:42:15.932899468 +0100 ++++ linux/fs/aufs/vfsub.h 2022-03-21 14:49:05.733299677 +0100 @@ -0,0 +1,358 @@ +/* SPDX-License-Identifier: GPL-2.0 */ +/* @@ -33910,7 +34170,7 @@ diff -urN /usr/share/empty/fs/aufs/vfsub.h linux/fs/aufs/vfsub.h +#endif /* __AUFS_VFSUB_H__ */ diff -urN /usr/share/empty/fs/aufs/wbr_policy.c linux/fs/aufs/wbr_policy.c --- /usr/share/empty/fs/aufs/wbr_policy.c 1970-01-01 01:00:00.000000000 +0100 -+++ linux/fs/aufs/wbr_policy.c 2021-12-03 15:38:59.939980643 +0100 ++++ linux/fs/aufs/wbr_policy.c 2022-03-21 14:49:05.733299677 +0100 @@ -0,0 +1,830 @@ +// SPDX-License-Identifier: GPL-2.0 +/* @@ -34744,7 +35004,7 @@ diff -urN /usr/share/empty/fs/aufs/wbr_policy.c linux/fs/aufs/wbr_policy.c +}; diff -urN /usr/share/empty/fs/aufs/whout.c linux/fs/aufs/whout.c --- /usr/share/empty/fs/aufs/whout.c 1970-01-01 01:00:00.000000000 +0100 -+++ linux/fs/aufs/whout.c 2021-12-03 15:40:58.236647297 +0100 ++++ linux/fs/aufs/whout.c 2022-03-21 14:49:05.733299677 +0100 @@ -0,0 +1,1072 @@ +// SPDX-License-Identifier: GPL-2.0 +/* @@ -35820,7 +36080,7 @@ diff -urN /usr/share/empty/fs/aufs/whout.c linux/fs/aufs/whout.c +} diff -urN /usr/share/empty/fs/aufs/whout.h linux/fs/aufs/whout.h --- /usr/share/empty/fs/aufs/whout.h 1970-01-01 01:00:00.000000000 +0100 -+++ linux/fs/aufs/whout.h 2021-12-03 15:40:58.236647297 +0100 ++++ linux/fs/aufs/whout.h 2022-03-21 14:49:05.733299677 +0100 @@ -0,0 +1,87 @@ +/* SPDX-License-Identifier: GPL-2.0 */ +/* @@ -35911,7 +36171,7 @@ diff -urN /usr/share/empty/fs/aufs/whout.h linux/fs/aufs/whout.h +#endif /* __AUFS_WHOUT_H__ */ diff -urN /usr/share/empty/fs/aufs/wkq.c linux/fs/aufs/wkq.c --- /usr/share/empty/fs/aufs/wkq.c 1970-01-01 01:00:00.000000000 +0100 -+++ linux/fs/aufs/wkq.c 2021-12-03 15:38:59.943313977 +0100 ++++ linux/fs/aufs/wkq.c 2022-03-21 14:49:05.733299677 +0100 @@ -0,0 +1,372 @@ +// SPDX-License-Identifier: GPL-2.0 +/* @@ -36287,7 +36547,7 @@ diff -urN /usr/share/empty/fs/aufs/wkq.c linux/fs/aufs/wkq.c +} diff -urN /usr/share/empty/fs/aufs/wkq.h linux/fs/aufs/wkq.h --- /usr/share/empty/fs/aufs/wkq.h 1970-01-01 01:00:00.000000000 +0100 -+++ linux/fs/aufs/wkq.h 2021-12-03 15:38:59.943313977 +0100 ++++ linux/fs/aufs/wkq.h 2022-03-21 14:49:05.733299677 +0100 @@ -0,0 +1,89 @@ +/* SPDX-License-Identifier: GPL-2.0 */ +/* @@ -36380,7 +36640,7 @@ diff -urN /usr/share/empty/fs/aufs/wkq.h linux/fs/aufs/wkq.h +#endif /* __AUFS_WKQ_H__ */ diff -urN /usr/share/empty/fs/aufs/xattr.c linux/fs/aufs/xattr.c --- /usr/share/empty/fs/aufs/xattr.c 1970-01-01 01:00:00.000000000 +0100 -+++ linux/fs/aufs/xattr.c 2021-12-03 15:40:58.236647297 +0100 ++++ linux/fs/aufs/xattr.c 2022-03-21 14:49:05.733299677 +0100 @@ -0,0 +1,368 @@ +// SPDX-License-Identifier: GPL-2.0 +/* @@ -36752,7 +37012,7 @@ diff -urN /usr/share/empty/fs/aufs/xattr.c linux/fs/aufs/xattr.c +} diff -urN /usr/share/empty/fs/aufs/xino.c linux/fs/aufs/xino.c --- /usr/share/empty/fs/aufs/xino.c 1970-01-01 01:00:00.000000000 +0100 -+++ linux/fs/aufs/xino.c 2021-12-03 15:40:58.236647297 +0100 ++++ linux/fs/aufs/xino.c 2022-03-21 14:49:05.733299677 +0100 @@ -0,0 +1,1926 @@ +// SPDX-License-Identifier: GPL-2.0 +/* @@ -36965,7 +37225,7 @@ diff -urN /usr/share/empty/fs/aufs/xino.c linux/fs/aufs/xino.c + } + + err = -EINVAL; -+ if (unlikely(sb == d->d_sb)) { ++ if (unlikely(sb && sb == d->d_sb)) { + if (!silent) + pr_err("%s must be outside\n", fpath); + goto out; @@ -38682,7 +38942,7 @@ diff -urN /usr/share/empty/fs/aufs/xino.c linux/fs/aufs/xino.c +} diff -urN /usr/share/empty/include/uapi/linux/aufs_type.h linux/include/uapi/linux/aufs_type.h --- /usr/share/empty/include/uapi/linux/aufs_type.h 1970-01-01 01:00:00.000000000 +0100 -+++ linux/include/uapi/linux/aufs_type.h 2022-01-13 12:42:15.932899468 +0100 ++++ linux/include/uapi/linux/aufs_type.h 2022-03-21 14:49:05.733299677 +0100 @@ -0,0 +1,452 @@ +/* SPDX-License-Identifier: GPL-2.0 WITH Linux-syscall-note */ +/* @@ -38726,7 +38986,7 @@ diff -urN /usr/share/empty/include/uapi/linux/aufs_type.h linux/include/uapi/lin +#include +#endif /* __KERNEL__ */ + -+#define AUFS_VERSION "5.x-rcN-20211129" ++#define AUFS_VERSION "5.x-rcN-20220314" + +/* todo? move this to linux-2.6.19/include/magic.h */ +#define AUFS_SUPER_MAGIC ('a' << 24 | 'u' << 16 | 'f' << 8 | 's') @@ -39140,10 +39400,10 @@ SPDX-License-Identifier: GPL-2.0 aufs5.x-rcN loopback patch diff --git a/drivers/block/loop.c b/drivers/block/loop.c -index 52776d48e306a..64112f1cf8b18 100644 +index 9009a0efc4b28..60307b90fbead 100644 --- a/drivers/block/loop.c +++ b/drivers/block/loop.c -@@ -509,6 +509,15 @@ static inline void loop_update_dio(struct loop_device *lo) +@@ -510,6 +510,15 @@ static inline void loop_update_dio(struct loop_device *lo) lo->use_dio); } @@ -39159,7 +39419,7 @@ index 52776d48e306a..64112f1cf8b18 100644 static void loop_reread_partitions(struct loop_device *lo) { int rc; -@@ -566,6 +575,7 @@ static int loop_change_fd(struct loop_device *lo, struct block_device *bdev, +@@ -567,6 +576,7 @@ static int loop_change_fd(struct loop_device *lo, struct block_device *bdev, { struct file *file = fget(arg); struct file *old_file; @@ -39167,7 +39427,7 @@ index 52776d48e306a..64112f1cf8b18 100644 int error; bool partscan; bool is_loop; -@@ -585,11 +595,19 @@ static int loop_change_fd(struct loop_device *lo, struct block_device *bdev, +@@ -586,11 +596,19 @@ static int loop_change_fd(struct loop_device *lo, struct block_device *bdev, if (!(lo->lo_flags & LO_FLAGS_READ_ONLY)) goto out_err; @@ -39187,7 +39447,7 @@ index 52776d48e306a..64112f1cf8b18 100644 error = -EINVAL; -@@ -602,6 +620,7 @@ static int loop_change_fd(struct loop_device *lo, struct block_device *bdev, +@@ -603,6 +621,7 @@ static int loop_change_fd(struct loop_device *lo, struct block_device *bdev, blk_mq_freeze_queue(lo->lo_queue); mapping_set_gfp_mask(old_file->f_mapping, lo->old_gfp_mask); lo->lo_backing_file = file; @@ -39195,7 +39455,7 @@ index 52776d48e306a..64112f1cf8b18 100644 lo->old_gfp_mask = mapping_gfp_mask(file->f_mapping); mapping_set_gfp_mask(file->f_mapping, lo->old_gfp_mask & ~(__GFP_IO|__GFP_FS)); -@@ -624,6 +643,8 @@ static int loop_change_fd(struct loop_device *lo, struct block_device *bdev, +@@ -625,6 +644,8 @@ static int loop_change_fd(struct loop_device *lo, struct block_device *bdev, * dependency. */ fput(old_file); @@ -39204,7 +39464,7 @@ index 52776d48e306a..64112f1cf8b18 100644 if (partscan) loop_reread_partitions(lo); return 0; -@@ -632,6 +653,8 @@ static int loop_change_fd(struct loop_device *lo, struct block_device *bdev, +@@ -633,6 +654,8 @@ static int loop_change_fd(struct loop_device *lo, struct block_device *bdev, loop_global_unlock(lo, is_loop); out_putf: fput(file); @@ -39213,7 +39473,7 @@ index 52776d48e306a..64112f1cf8b18 100644 return error; } -@@ -965,6 +988,7 @@ static int loop_configure(struct loop_device *lo, fmode_t mode, +@@ -971,6 +994,7 @@ static int loop_configure(struct loop_device *lo, fmode_t mode, const struct loop_config *config) { struct file *file = fget(config->fd); @@ -39221,7 +39481,7 @@ index 52776d48e306a..64112f1cf8b18 100644 struct inode *inode; struct address_space *mapping; int error; -@@ -980,6 +1004,13 @@ static int loop_configure(struct loop_device *lo, fmode_t mode, +@@ -986,6 +1010,13 @@ static int loop_configure(struct loop_device *lo, fmode_t mode, /* This is safe, since we have a reference from open(). */ __module_get(THIS_MODULE); @@ -39235,7 +39495,7 @@ index 52776d48e306a..64112f1cf8b18 100644 /* * If we don't hold exclusive handle for the device, upgrade to it * here to avoid changing device under exclusive owner. -@@ -1045,6 +1076,7 @@ static int loop_configure(struct loop_device *lo, fmode_t mode, +@@ -1051,6 +1082,7 @@ static int loop_configure(struct loop_device *lo, fmode_t mode, lo->use_dio = lo->lo_flags & LO_FLAGS_DIRECT_IO; lo->lo_device = bdev; lo->lo_backing_file = file; @@ -39243,7 +39503,7 @@ index 52776d48e306a..64112f1cf8b18 100644 lo->old_gfp_mask = mapping_gfp_mask(mapping); mapping_set_gfp_mask(mapping, lo->old_gfp_mask & ~(__GFP_IO|__GFP_FS)); -@@ -1095,6 +1127,8 @@ static int loop_configure(struct loop_device *lo, fmode_t mode, +@@ -1101,6 +1133,8 @@ static int loop_configure(struct loop_device *lo, fmode_t mode, bd_abort_claiming(bdev, loop_configure); out_putf: fput(file); @@ -39252,31 +39512,31 @@ index 52776d48e306a..64112f1cf8b18 100644 /* This is safe: open() is still holding a reference. */ module_put(THIS_MODULE); return error; -@@ -1103,6 +1137,7 @@ static int loop_configure(struct loop_device *lo, fmode_t mode, - static int __loop_clr_fd(struct loop_device *lo, bool release) +@@ -1109,6 +1143,7 @@ static int loop_configure(struct loop_device *lo, fmode_t mode, + static void __loop_clr_fd(struct loop_device *lo, bool release) { - struct file *filp = NULL; + struct file *filp; + struct file *virt_filp = lo->lo_backing_virt_file; gfp_t gfp = lo->old_gfp_mask; - int err = 0; - bool partscan = false; -@@ -1153,6 +1188,7 @@ static int __loop_clr_fd(struct loop_device *lo, bool release) + struct loop_worker *pos, *worker; +@@ -1154,6 +1189,7 @@ static void __loop_clr_fd(struct loop_device *lo, bool release) spin_lock_irq(&lo->lo_lock); + filp = lo->lo_backing_file; lo->lo_backing_file = NULL; + lo->lo_backing_virt_file = NULL; spin_unlock_irq(&lo->lo_lock); lo->lo_device = NULL; -@@ -1220,6 +1256,8 @@ static int __loop_clr_fd(struct loop_device *lo, bool release) +@@ -1215,6 +1251,8 @@ static void __loop_clr_fd(struct loop_device *lo, bool release) + * fput can take open_mutex which is usually taken before lo_mutex. */ - if (filp) - fput(filp); + fput(filp); + if (virt_filp) + fput(virt_filp); - return err; } + static int loop_clr_fd(struct loop_device *lo) diff --git a/drivers/block/loop.h b/drivers/block/loop.h index 082d4b6bfc6a6..61feca64688df 100644 --- a/drivers/block/loop.h @@ -39350,15 +39610,15 @@ index 7293bee427f96..3345c098d0d47 100644 #endif /* __KERNEL__ */ diff --git a/fs/aufs/super.c b/fs/aufs/super.c -index cfa90537d9d38..028ee1ceeed1a 100644 +index 90043afec51c1..0835f6da42d97 100644 --- a/fs/aufs/super.c +++ b/fs/aufs/super.c -@@ -844,7 +844,10 @@ static const struct super_operations aufs_sop = { +@@ -758,7 +758,10 @@ const struct super_operations aufs_sop = { + .show_options = aufs_show_options, .statfs = aufs_statfs, .put_super = aufs_put_super, - .sync_fs = aufs_sync_fs, -- .remount_fs = aufs_remount_fs -+ .remount_fs = aufs_remount_fs, +- .sync_fs = aufs_sync_fs ++ .sync_fs = aufs_sync_fs, +#ifdef CONFIG_AUFS_BDEV_LOOP + .real_loop = aufs_real_loop +#endif @@ -39366,10 +39626,10 @@ index cfa90537d9d38..028ee1ceeed1a 100644 /* ---------------------------------------------------------------------- */ diff --git a/include/linux/fs.h b/include/linux/fs.h -index 02ce64c28ef15..eed5ad4a414ac 100644 +index 5479e6dc18a23..05fe92d076c19 100644 --- a/include/linux/fs.h +++ b/include/linux/fs.h -@@ -2225,6 +2225,10 @@ struct super_operations { +@@ -2137,6 +2137,10 @@ struct super_operations { struct shrink_control *); long (*free_cached_objects)(struct super_block *, struct shrink_control *); diff --git a/kernel-layer7.patch b/kernel-layer7.patch index fe1526c9..8795f11f 100644 --- a/kernel-layer7.patch +++ b/kernel-layer7.patch @@ -114,7 +114,7 @@ diff -urNp -x '*.orig' linux-5.11/net/netfilter/nf_conntrack_standalone.c linux- + return -ENOSPC; +#endif + - seq_printf(s, "use=%u\n", atomic_read(&ct->ct_general.use)); + seq_printf(s, "use=%u\n", refcount_read(&ct->ct_general.use)); if (seq_has_overflowed(s)) diff -urNp -x '*.orig' linux-5.11/net/netfilter/regexp/regexp.c linux-5.11/net/netfilter/regexp/regexp.c diff --git a/kernel-multiarch.config b/kernel-multiarch.config index 9853857b..da28fb5b 100644 --- a/kernel-multiarch.config +++ b/kernel-multiarch.config @@ -301,7 +301,6 @@ CRYPTO_USER_API_RNG_CAVP all=n CRYPTO_USER_API_AEAD all=m CRYPTO_USER_API_ENABLE_OBSOLETE all=y CRYPTO_STATS all=y -#- file lib/crypto/Kconfig goes here #- file drivers/crypto/Kconfig goes here #- file crypto/asymmetric_keys/Kconfig goes here #- file certs/Kconfig goes here @@ -384,7 +383,9 @@ ACPI_BGRT all=y #- file drivers/acpi/dptf/Kconfig goes here ACPI_EXTLOG all=m ACPI_CONFIGFS all=m +ACPI_PFRUT all=m #- file drivers/acpi/arm64/Kconfig goes here +ACPI_PCC all=y #- file drivers/acpi/pmic/Kconfig goes here X86_PM_TIMER x86=y ACPI_PRMT=y @@ -464,7 +465,6 @@ ATA_BMDMA all=y ATA_PIIX all=m sparc=n SATA_DWC all=m SATA_DWC_OLD_DMA all=y -SATA_DWC_DEBUG all=n SATA_HIGHBANK all=m SATA_MV all=m sparc=n SATA_NV all=m sparc=n @@ -597,6 +597,7 @@ UEVENT_HELPER all=y UEVENT_HELPER_PATH all="" DEVTMPFS all=y DEVTMPFS_MOUNT all=y +DEVTMPFS_SAFE all=y STANDALONE all=n PREVENT_FIRMWARE_BUILD all=y #- file drivers/base/firmware_loader/Kconfig goes here @@ -672,7 +673,6 @@ XEN_BLKDEV_FRONTEND all=m XEN_BLKDEV_BACKEND all=m VIRTIO_BLK all=m BLK_DEV_RBD all=m -BLK_DEV_RSXX all=m #- file drivers/block/rnbd/Kconfig goes here #- @@ -947,6 +947,7 @@ COMMON_CLK_SI514 arm=m arm64=m COMMON_CLK_SI544 all=m COMMON_CLK_SI570 arm=m arm64=m COMMON_CLK_CDCE706 all=m +COMMON_CLK_TPS68470 all=m COMMON_CLK_CDCE925 arm=m arm64=m COMMON_CLK_CS2000_CP all=m COMMON_CLK_AXI_CLKGEN arm=m arm64=m @@ -978,11 +979,13 @@ COMMON_CLK_FIXED_MMIO arm=n arm64=n #- file drivers/clk/sifive/Kconfig goes here #- file drivers/clk/socfpga/Kconfig goes here #- file drivers/clk/sprd/Kconfig goes here +#- file drivers/clk/starfive/Kconfig goes here #- file drivers/clk/sunxi/Kconfig goes here #- file drivers/clk/sunxi-ng/Kconfig goes here #- file drivers/clk/tegra/Kconfig goes here #- file drivers/clk/ti/Kconfig goes here #- file drivers/clk/uniphier/Kconfig goes here +#- file drivers/clk/visconti/Kconfig goes here #- file drivers/clk/x86/Kconfig goes here #- file drivers/clk/xilinx/Kconfig goes here #- file drivers/clk/zynqmp/Kconfig goes here @@ -1236,6 +1239,7 @@ CPU_FREQ_GOV_SCHEDUTIL all=y #- *** FILE: drivers/cpufreq/Kconfig.x86 *** #- X86_INTEL_PSTATE all=y +X86_AMD_PSTATE all=m X86_AMD_FREQ_SENSITIVITY all=m #- shared options @@ -1360,7 +1364,6 @@ DEV_DAX all=m DEV_DAX_PMEM all=m DEV_DAX_HMEM all=m DEV_DAX_KMEM all=m -DEV_DAX_PMEM_COMPAT all=m #- #- *** FILE: drivers/devfreq/Kconfig *** @@ -1703,6 +1706,7 @@ GNSS all=m GNSS_MTK_SERIAL all=m GNSS_SIRF_SERIAL all=m GNSS_UBX_SERIAL all=m +GNSS_USB all=m #- #- *** FILE: drivers/gpio/Kconfig *** @@ -1810,6 +1814,7 @@ GPIO_VIPERBOARD all=m GPIO_AGGREGATOR all=m GPIO_MOCKUP all=m GPIO_VIRTIO all=m +GPIO_SIM all=m #- #- *** FILE: drivers/gpu/drm/Kconfig *** @@ -1876,6 +1881,7 @@ DRM_VKMS all=m #- file drivers/gpu/drm/tidss/Kconfig goes here #- file drivers/gpu/drm/xlnx/Kconfig goes here #- file drivers/gpu/drm/gud/Kconfig goes here +#- file drivers/gpu/drm/sprd/Kconfig goes here DRM_HYPERV=m DRM_LEGACY all=y DRM_TDFX all=m @@ -2284,6 +2290,7 @@ DRM_CIRRUS_QEMU all=m DRM_GM12U320 all=m DRM_SIMPLEDRM=m TINYDRM_HX8357D all=m +TINYDRM_ILI9163 all=m TINYDRM_ILI9225 all=m TINYDRM_ILI9341 all=m TINYDRM_ILI9486 all=m @@ -2413,6 +2420,7 @@ HID_TWINHAN all=m HID_KENSINGTON all=m HID_LCPOWER all=m HID_LENOVO all=m +HID_LETSKETCH all=m HID_LOGITECH all=m HID_LOGITECH_DJ all=m HID_LOGITECH_HIDPP all=m @@ -2664,6 +2672,7 @@ SENSORS_NCT7802 all=m SENSORS_NCT7904 all=m SENSORS_NPCM7XX all=m SENSORS_NZXT_KRAKEN2 all=m +SENSORS_NZXT_SMART2 all=m #- file drivers/hwmon/occ/Kconfig goes here SENSORS_PCF8591 all=m #- file drivers/hwmon/pmbus/Kconfig goes here @@ -2695,6 +2704,7 @@ SENSORS_ADS7871 all=m SENSORS_AMC6821 all=m SENSORS_INA209 all=m SENSORS_INA2XX all=m +SENSORS_INA238 all=m SENSORS_INA3221 all=m SENSORS_TC74 all=m SENSORS_THMC50 all=m @@ -2728,6 +2738,8 @@ SENSORS_INTEL_M10_BMC_HWMON all=m #- ACPI drivers SENSORS_ACPI_POWER all=m SENSORS_ATK0110 all=m +SENSORS_ASUS_WMI all=m +SENSORS_ASUS_WMI_EC all=m #- #- *** FILE: drivers/hwmon/occ/Kconfig *** @@ -2744,6 +2756,7 @@ SENSORS_ADM1266 all=m SENSORS_ADM1275 all=m SENSORS_BEL_PFE all=m SENSORS_BPA_RS600 all=m +SENSORS_DELTA_AHE50DC_FAN all=m SENSORS_FSP_3Y all=m SENSORS_IBM_CFFPS all=m SENSORS_DPS920AB=m @@ -2751,6 +2764,7 @@ SENSORS_INSPUR_IPSPS all=m SENSORS_IR35221 all=m SENSORS_IR36021 all=m SENSORS_IR38064 all=m +SENSORS_IR38064_REGULATOR all=y SENSORS_IRPS5401 all=m SENSORS_ISL68137 all=m SENSORS_LM25066 all=m @@ -2767,6 +2781,7 @@ SENSORS_MAX34440 all=m SENSORS_MAX8688 all=m SENSORS_MP2888=m SENSORS_MP2975 all=m +SENSORS_MP5023 all=m SENSORS_PIM4328=m SENSORS_PM6764TR all=m SENSORS_PXE1610 all=m @@ -2961,6 +2976,7 @@ IIO_SW_DEVICE all=m IIO_SW_TRIGGER all=m #- file drivers/iio/accel/Kconfig goes here #- file drivers/iio/adc/Kconfig goes here +#- file drivers/iio/addac/Kconfig goes here #- file drivers/iio/afe/Kconfig goes here #- file drivers/iio/amplifiers/Kconfig goes here #- file drivers/iio/cdc/Kconfig goes here @@ -2968,6 +2984,7 @@ IIO_SW_TRIGGER all=m #- file drivers/iio/common/Kconfig goes here #- file drivers/iio/dac/Kconfig goes here #- file drivers/iio/dummy/Kconfig goes here +#- file drivers/iio/filter/Kconfig goes here #- file drivers/iio/frequency/Kconfig goes here #- file drivers/iio/gyro/Kconfig goes here #- file drivers/iio/health/Kconfig goes here @@ -3104,9 +3121,9 @@ TI_ADC128S052 all=m TI_ADC161S626 all=m TI_ADS1015 all=m TI_ADS7950 all=m -TI_ADS8344 arm=m arm64=m -TI_ADS8688 arm=m arm64=m -TI_ADS124S08 arm=m arm64=m +TI_ADS8344 all=m +TI_ADS8688 all=m +TI_ADS124S08 all=m TI_ADS131E08 all=m TI_AM335X_ADC all=m TI_TLC4541 all=m @@ -3115,6 +3132,11 @@ VF610_ADC arm=m arm64=m VIPERBOARD_ADC all=m XILINX_XADC all=m +#- +#- *** FILE: drivers/iio/addac/Kconfig *** +#- +AD74413R all=m + #- #- *** FILE: drivers/iio/afe/Kconfig *** #- @@ -3177,6 +3199,7 @@ IIO_SSP_SENSORHUB all=m #- #- *** FILE: drivers/iio/dac/Kconfig *** #- +AD3552R all=m AD5064 all=m AD5360 all=m AD5380 all=m @@ -3197,6 +3220,7 @@ AD5764 all=m AD5766 all=m AD5770R all=m AD5791 all=m +AD7293 all=m AD7303 all=m AD8801 all=m CIO_DAC all=m @@ -3206,7 +3230,7 @@ LTC1660 all=m LTC2632 all=m M62332 all=m MAX517 all=m -MAX5821 arm=m arm64=m +MAX5821 all=m MCP4725 all=m MCP4922 all=m TI_DAC082S085 all=m @@ -3222,12 +3246,18 @@ IIO_SIMPLE_DUMMY all=m IIO_SIMPLE_DUMMY_EVENTS all=y IIO_SIMPLE_DUMMY_BUFFER all=y +#- +#- *** FILE: drivers/iio/filter/Kconfig *** +#- +ADMV8818 all=m + #- #- *** FILE: drivers/iio/frequency/Kconfig *** #- AD9523 all=m ADF4350 all=m ADF4371 all=m +ADMV1013 all=m ADRF6780 all=m #- @@ -3559,7 +3589,6 @@ SDMA_VERBOSITY all=n #- *** FILE: drivers/infiniband/hw/hns/Kconfig *** #- INFINIBAND_HNS arm64=m -INFINIBAND_HNS_HIP06 arm64=n INFINIBAND_HNS_HIP08 arm64=n #- @@ -4234,6 +4263,8 @@ LEDS_TPS6105X all=m #- file drivers/leds/flash/Kconfig goes here #- LED Triggers #- file drivers/leds/trigger/Kconfig goes here +#- Simple LED drivers +#- file drivers/leds/simple/Kconfig goes here #- #- *** FILE: drivers/leds/flash/Kconfig *** @@ -4247,6 +4278,11 @@ LEDS_RT4505 arm=m arm64=m LEDS_RT8515 all=m LEDS_SGM3140 all=m +#- +#- *** FILE: drivers/leds/simple/Kconfig *** +#- +LEDS_SIEMENS_SIMATIC_IPC all=m + #- #- *** FILE: drivers/leds/trigger/Kconfig *** #- @@ -4626,6 +4662,7 @@ VIDEO_OV5648 all=m VIDEO_OV6650 all=m VIDEO_OV5670 all=m VIDEO_OV5675 all=m +VIDEO_OV5693 all=m VIDEO_OV5695 all=m VIDEO_OV7251 all=m VIDEO_OV772X all=m @@ -5511,7 +5548,6 @@ INTEL_SOC_PMIC_MRFLD all=m MFD_INTEL_LPSS_ACPI all=m MFD_INTEL_LPSS_PCI all=m MFD_INTEL_PMC_BXT all=m -MFD_INTEL_PMT all=m MFD_IQS62X all=m MFD_JANZ_CMODIO all=m MFD_KEMPLD all=m @@ -6431,6 +6467,7 @@ DNET all=m #- file drivers/net/ethernet/dec/Kconfig goes here #- file drivers/net/ethernet/dlink/Kconfig goes here #- file drivers/net/ethernet/emulex/Kconfig goes here +#- file drivers/net/ethernet/engleder/Kconfig goes here #- file drivers/net/ethernet/ezchip/Kconfig goes here #- file drivers/net/ethernet/faraday/Kconfig goes here #- file drivers/net/ethernet/freescale/Kconfig goes here @@ -6487,6 +6524,7 @@ ETHOC all=m #- file drivers/net/ethernet/ti/Kconfig goes here #- file drivers/net/ethernet/toshiba/Kconfig goes here #- file drivers/net/ethernet/tundra/Kconfig goes here +#- file drivers/net/ethernet/vertexcom/Kconfig goes here #- file drivers/net/ethernet/via/Kconfig goes here #- file drivers/net/ethernet/wiznet/Kconfig goes here #- file drivers/net/ethernet/xilinx/Kconfig goes here @@ -6737,6 +6775,13 @@ BE2NET_LANCER all=y BE2NET_SKYHAWK all=y #- WARNING: be2net is useless without any enabled chip +#- +#- *** FILE: drivers/net/ethernet/engleder/Kconfig *** +#- +NET_VENDOR_ENGLEDER all=y +TSNEP all=m +TSNEP_SELFTESTS all=n + #- #- *** FILE: drivers/net/ethernet/ezchip/Kconfig *** #- @@ -6838,6 +6883,7 @@ I40E_DCB all=y I40EVF all=m ICE all=m ICE_SWITCHDEV all=y +ICE_HWTS all=y FM10K all=m IGC all=m @@ -6960,6 +7006,7 @@ ENC28J60 all=m ENC28J60_WRITEVERIFY all=n ENCX24J600 all=m LAN743X all=m +#- file drivers/net/ethernet/microchip/lan966x/Kconfig goes here #- file drivers/net/ethernet/microchip/sparx5/Kconfig goes here #- @@ -7223,6 +7270,12 @@ GELIC_NET ppc64=m GELIC_WIRELESS ppc64=y SPIDER_NET ppc64=m +#- +#- *** FILE: drivers/net/ethernet/vertexcom/Kconfig *** +#- +NET_VENDOR_VERTEXCOM all=y +MSE102X all=m + #- #- *** FILE: drivers/net/ethernet/via/Kconfig *** #- @@ -7307,6 +7360,11 @@ IEEE802154_CA8210_DEBUGFS all=y IEEE802154_MCR20A all=m IEEE802154_HWSIM all=m +#- +#- *** FILE: drivers/net/mctp/Kconfig *** +#- +MCTP_SERIAL all=m + #- #- *** FILE: drivers/net/mdio/Kconfig *** #- @@ -7734,9 +7792,9 @@ IWLWIFI all=m IWLDVM all=m IWLMVM all=m #- WARNING: iwlwifi is useless without IWLDVM or IWLMVM -IWLWIFI_BCAST_FILTERING all=y IWLWIFI_DEBUG all=y IWLWIFI_DEVICE_TRACING all=n +IWLMEI all=m #- #- *** FILE: drivers/net/wireless/intersil/Kconfig *** @@ -8549,22 +8607,26 @@ PINMUX all=y PINCONF all=y GENERIC_PINCONF all=y DEBUG_PINCTRL all=n -PINCTRL_AXP209 arm=m arm64=m PINCTRL_AMD all=y +PINCTRL_AXP209 arm=m arm64=m PINCTRL_DA9062 all=m +PINCTRL_EQUILIBRIUM arm64=m PINCTRL_MCP23S08 all=m +PINCTRL_MICROCHIP_SGPIO arm=n arm64=n +PINCTRL_OCELOT arm=n arm64=n +PINCTRL_RK805 arm=m arm64=m PINCTRL_ROCKCHIP arm64=m PINCTRL_SINGLE arm=m arm64=m PINCTRL_STMFX arm=m arm64=m -PINCTRL_RK805 arm=m arm64=m -PINCTRL_OCELOT arm=n arm64=n -PINCTRL_MICROCHIP_SGPIO arm=n arm64=n #- file drivers/pinctrl/actions/Kconfig goes here #- file drivers/pinctrl/aspeed/Kconfig goes here #- file drivers/pinctrl/bcm/Kconfig goes here #- file drivers/pinctrl/berlin/Kconfig goes here +#- file drivers/pinctrl/cirrus/Kconfig goes here #- file drivers/pinctrl/freescale/Kconfig goes here #- file drivers/pinctrl/intel/Kconfig goes here +#- file drivers/pinctrl/mediatek/Kconfig goes here +#- file drivers/pinctrl/meson/Kconfig goes here #- file drivers/pinctrl/mvebu/Kconfig goes here #- file drivers/pinctrl/nomadik/Kconfig goes here #- file drivers/pinctrl/nuvoton/Kconfig goes here @@ -8580,12 +8642,8 @@ PINCTRL_MICROCHIP_SGPIO arm=n arm64=n #- file drivers/pinctrl/tegra/Kconfig goes here #- file drivers/pinctrl/ti/Kconfig goes here #- file drivers/pinctrl/uniphier/Kconfig goes here -#- file drivers/pinctrl/vt8500/Kconfig goes here -#- file drivers/pinctrl/mediatek/Kconfig goes here -#- file drivers/pinctrl/meson/Kconfig goes here -#- file drivers/pinctrl/cirrus/Kconfig goes here #- file drivers/pinctrl/visconti/Kconfig goes here -PINCTRL_EQUILIBRIUM arm64=m +#- file drivers/pinctrl/vt8500/Kconfig goes here #- #- *** FILE: drivers/pinctrl/bcm/Kconfig *** @@ -8709,6 +8767,7 @@ PEAQ_WMI all=m NVIDIA_WMI_EC_BACKLIGHT all=m XIAOMI_WMI all=m GIGABYTE_WMI all=m +YOGABOOK_WMI all=m ACERHDF all=m ACER_WIRELESS all=m ACER_WMI all=m @@ -8719,6 +8778,7 @@ ASUS_LAPTOP i386=m x86_64=m ASUS_WIRELESS all=m ASUS_WMI all=m ASUS_NB_WMI all=m +ASUS_TF103C_DOCK all=m MERAKI_MX100 all=m EEEPC_LAPTOP all=m EEEPC_WMI all=m @@ -8764,11 +8824,13 @@ SYSTEM76_ACPI all=m TOPSTAR_LAPTOP all=m I2C_MULTI_INSTANTIATE all=m MLX_PLATFORM all=m +X86_ANDROID_TABLETS all=m INTEL_IPS all=m INTEL_SCU_IPC i386=y INTEL_SCU_PCI all=y INTEL_SCU_PLATFORM all=m INTEL_SCU_IPC_UTIL all=m +SIEMENS_SIMATIC_IPC all=m #- #- *** FILE: drivers/platform/x86/dell/Kconfig *** @@ -8814,6 +8876,7 @@ INTEL_RST all=m INTEL_SMARTCONNECT all=m INTEL_TURBO_MAX_3 all=y INTEL_UNCORE_FREQ_CONTROL all=m +INTEL_VSEC all=m #- #- *** FILE: drivers/platform/x86/intel/atomisp2/Kconfig *** @@ -8968,6 +9031,7 @@ CHARGER_MAX14577 all=m CHARGER_DETECTOR_MAX14656 arm=m arm64=m CHARGER_MAX77650 arm=m arm64=m CHARGER_MAX77693 all=m +CHARGER_MAX77976 all=m CHARGER_MP2629 all=m CHARGER_MT6360 all=m CHARGER_BQ2415X all=m @@ -9078,9 +9142,7 @@ RAPIDIO_TSI721 all=m #- #- *** FILE: drivers/rapidio/switches/Kconfig *** #- -RAPIDIO_TSI57X all=m RAPIDIO_CPS_XX all=m -RAPIDIO_TSI568 all=m RAPIDIO_CPS_GEN2 all=m RAPIDIO_RXS_GEN3 all=m @@ -9140,6 +9202,7 @@ REGULATOR_MAX8893=m REGULATOR_MAX8907 all=m REGULATOR_MAX8952 all=m REGULATOR_MAX8973 all=m +REGULATOR_MAX20086 all=m REGULATOR_MAX77686 arm=m arm64=m REGULATOR_MAX77693 all=m REGULATOR_MAX77802 arm=m arm64=m @@ -9197,6 +9260,7 @@ REGULATOR_TPS65218 arm=m arm64=m REGULATOR_TPS6524X all=m REGULATOR_TPS6586X all=m REGULATOR_TPS65912 all=m +REGULATOR_TPS68470 all=m REGULATOR_TWL4030 powerpc=y REGULATOR_VCTRL arm=m arm64=m REGULATOR_VEXPRESS arm=m arm64=m @@ -9865,8 +9929,6 @@ STAGING all=y #- file drivers/staging/greybus/Kconfig goes here #- file drivers/staging/vc04_services/Kconfig goes here #- file drivers/staging/pi433/Kconfig goes here -#- file drivers/staging/mt7621-dma/Kconfig goes here -#- file drivers/staging/ralink-gdma/Kconfig goes here #- file drivers/staging/mt7621-dts/Kconfig goes here #- file drivers/staging/axis-fifo/Kconfig goes here #- file drivers/staging/fieldbus/Kconfig goes here @@ -9923,7 +9985,6 @@ FB_TFT_TLS8204 all=m FB_TFT_UC1611 all=m FB_TFT_UC1701 all=m FB_TFT_UPD161704 all=m -FB_TFT_WATTEROTT all=m #- #- *** FILE: drivers/staging/fieldbus/Kconfig *** @@ -10037,6 +10098,7 @@ STAGING_MEDIA all=y #- file drivers/staging/media/atomisp/Kconfig goes here #- file drivers/staging/media/hantro/Kconfig goes here #- file drivers/staging/media/imx/Kconfig goes here +#- file drivers/staging/media/max96712/Kconfig goes here #- file drivers/staging/media/meson/vdec/Kconfig goes here #- file drivers/staging/media/omap4iss/Kconfig goes here #- file drivers/staging/media/rkvdec/Kconfig goes here @@ -10469,6 +10531,7 @@ SERIAL_8250_EM arm=m SERIAL_8250_RT288X all=y SERIAL_8250_LPSS all=y SERIAL_8250_MID all=m +SERIAL_8250_PERICOM all=m SERIAL_OF_PLATFORM arm=m arm64=m ppc=m ppc64=m #- @@ -10818,6 +10881,7 @@ USB_RENESAS_USBHS_HCD all=m USB_HCD_BCMA all=m USB_HCD_SSB arm=m arm64=m USB_HCD_TEST_MODE all=n +USB_XEN_HCD all=m #- #- *** FILE: drivers/usb/image/Kconfig *** @@ -11528,6 +11592,7 @@ SBC_EPX_C3_WATCHDOG i386=m x86_64=m INTEL_MEI_WDT all=m NI903X_WDT all=m NIC7018_WDT all=m +SIEMENS_SIMATIC_IPC_WDT all=m BCM2835_WDT arm=m BCM7038_WDT all=m MPC5200_WDT ppc=m @@ -11743,6 +11808,7 @@ BTRFS_FS_REF_VERIFY all=n #- CACHEFILES all=m CACHEFILES_DEBUG all=n +CACHEFILES_ERROR_INJECTION all=n #- #- *** FILE: fs/ceph/Kconfig *** @@ -12449,6 +12515,7 @@ MODULE_COMPRESS_NONE all=n MODULE_COMPRESS_GZIP all=n MODULE_COMPRESS_XZ all=y MODULE_COMPRESS_ZSTD all=n +MODULE_DECOMPRESS all=y MODULE_ALLOW_MISSING_NAMESPACE_IMPORTS all=n MODPROBE_PATH="/sbin/modprobe" #- file tree. goes here @@ -12555,7 +12622,6 @@ RCU_EXPERT all=n TASKS_RCU all=y RCU_FANOUT all=32 alpha=64 ia64=64 ppc64=64 sparc64=64 x86_64=64 RCU_FANOUT_LEAF all=16 -RCU_FAST_NO_HZ all=y RCU_NOCB_CPU all=n #- @@ -12618,6 +12684,7 @@ RING_BUFFER_BENCHMARK all=m TRACE_EVAL_MAP_FILE all=n FTRACE_RECORD_RECURSION all=n FTRACE_STARTUP_TEST all=n +FTRACE_SORT_STARTUP_TEST all=n RING_BUFFER_STARTUP_TEST all=n RING_BUFFER_VALIDATE_TIME_DELTAS all=n PREEMPTIRQ_DELAY_TEST all=m @@ -12632,6 +12699,7 @@ PACKING arm=y arm64=y BITREVERSE all=y #- file lib/math/Kconfig goes here INDIRECT_PIO arm64=n +#- file lib/crypto/Kconfig goes here CRC_CCITT all=y CRC16 all=m CRC_T10DIF all=y @@ -12670,6 +12738,7 @@ GLOB_SELFTEST all=n IRQ_POLL arm=y arm64=y #- file lib/vdso/Kconfig goes here #- file lib/fonts/Kconfig goes here +STACK_HASH_ORDER all="20" #- #- *** FILE: lib/Kconfig.debug *** @@ -12717,6 +12786,7 @@ DEBUG_FS_ALLOW_NONE all=n #- file lib/Kconfig.kcsan goes here DEBUG_KERNEL all=y DEBUG_MISC all=y +#- file net/Kconfig.debug goes here #- file mm/Kconfig.debug goes here DEBUG_OBJECTS all=n DEBUG_SLAB all=n @@ -12805,6 +12875,7 @@ TEST_SORT all=n TEST_DIV64 all=m KPROBES_SANITY_TEST all=n BACKTRACE_SELF_TEST all=m +TEST_REF_TRACKER all=m RBTREE_TEST all=m REED_SOLOMON_TEST all=m INTERVAL_TREE_TEST all=m @@ -12823,7 +12894,7 @@ TEST_UUID all=m TEST_XARRAY all=m TEST_OVERFLOW all=m TEST_RHASHTABLE all=n -TEST_HASH all=m +TEST_SIPHASH all=m TEST_IDA all=m TEST_PARMAN all=m TEST_LKM all=m @@ -12892,8 +12963,6 @@ UBSAN all=n #- #- *** FILE: lib/crypto/Kconfig *** #- -#- Crypto library routines -CRYPTO_LIB_BLAKE2S all=m CRYPTO_LIB_CHACHA all=m CRYPTO_LIB_CURVE25519 all=m CRYPTO_LIB_POLY1305 all=m @@ -12963,7 +13032,6 @@ HWPOISON_INJECT all=m TRANSPARENT_HUGEPAGE all=y TRANSPARENT_HUGEPAGE_ALWAYS all=y TRANSPARENT_HUGEPAGE_MADVISE all=n -CLEANCACHE all=y FRONTSWAP all=y CMA all=y CMA_DEBUG all=n @@ -12995,6 +13063,7 @@ PERCPU_STATS all=n GUP_TEST all=n #- GUP_TEST needs to have DEBUG_FS enabled READ_ONLY_THP_FOR_FS all=n +ANON_VMA_NAME all=n #- file mm/damon/Kconfig goes here #- @@ -13003,6 +13072,7 @@ READ_ONLY_THP_FOR_FS all=n PAGE_EXTENSION all=n DEBUG_PAGEALLOC all=n PAGE_OWNER all=n +PAGE_TABLE_CHECK all=n PAGE_POISONING all=n DEBUG_PAGE_REF all=n DEBUG_RODATA_TEST all=n @@ -13049,6 +13119,7 @@ VLAN_8021Q_MVRP all=y #- *** FILE: net/9p/Kconfig *** #- NET_9P all=m +NET_9P_FD all=m NET_9P_VIRTIO all=m NET_9P_XEN all=m NET_9P_RDMA all=m @@ -13144,6 +13215,12 @@ NET_DEVLINK all=y FAILOVER all=m ETHTOOL_NETLINK all=y +#- +#- *** FILE: net/Kconfig.debug *** +#- +NET_DEV_REFCNT_TRACKER all=n +NET_NS_REFCNT_TRACKER all=n + #- #- *** FILE: net/atm/Kconfig *** #- @@ -13441,7 +13518,6 @@ NFT_REJECT_IPV4 all=m NFT_DUP_IPV4 all=m NFT_FIB_IPV4 all=m NF_TABLES_ARP all=y -NF_FLOW_TABLE_IPV4 all=m NF_LOG_ARP all=m NF_LOG_IPV4 all=m NF_REJECT_IPV4 all=m @@ -13507,7 +13583,6 @@ NF_TPROXY_IPV6 all=m NF_TABLES_IPV6 all=y NFT_DUP_IPV6 all=m NFT_FIB_IPV6 all=m -NF_FLOW_TABLE_IPV6 all=m NF_REJECT_IPV6 all=m NF_LOG_IPV6 all=m IP6_NF_IPTABLES all=m @@ -13651,7 +13726,6 @@ NF_TABLES_NETDEV all=y NFT_NUMGEN all=m NFT_CT all=m NFT_FLOW_OFFLOAD all=m -NFT_COUNTER all=m NFT_CONNLIMIT all=m NFT_LOG all=m NFT_LIMIT all=m @@ -14545,6 +14619,10 @@ SND_HDA_RECONFIG all=y SND_HDA_INPUT_BEEP all=y SND_HDA_INPUT_BEEP_MODE all=1 SND_HDA_PATCH_LOADER all=y +SND_HDA_SCODEC_CS35L41_I2C all=m +#- Set to Y if you want auto-loading the side codec driver +SND_HDA_SCODEC_CS35L41_SPI all=m +#- Set to Y if you want auto-loading the side codec driver SND_HDA_CODEC_REALTEK all=m #- Set to Y if you want auto-loading the codec driver SND_HDA_CODEC_ANALOG all=m @@ -14673,9 +14751,6 @@ SND_SOC_MIKROE_PROTO arm=m arm64=m #- SND_BCM2835_SOC_I2S arm=m SND_BCM63XX_I2S_WHISTLER all=m -SND_BCM2708_SOC_HIFIBERRY_DAC arm=m arm64=m -SND_RPI_SIMPLE_SOUNDCARD arm=m arm64=m -SND_RPI_WM8804_SOUNDCARD arm=m arm64=m #- #- *** FILE: sound/soc/codecs/Kconfig *** @@ -14692,6 +14767,7 @@ SND_SOC_ADAU7118_HW all=m SND_SOC_ADAU7118_I2C all=m SND_SOC_AK4104 all=m SND_SOC_AK4118 all=m +SND_SOC_AK4375 all=m SND_SOC_AK4458 all=m SND_SOC_AK4554 all=m SND_SOC_AK4613 all=m @@ -14811,6 +14887,7 @@ SND_SOC_TAS6424 all=m SND_SOC_TDA7419 all=m SND_SOC_TFA9879 all=m SND_SOC_TFA989X=m +SND_SOC_TLV320ADC3XXX all=m SND_SOC_TLV320AIC23 all=m SND_SOC_TLV320AIC23_I2C all=m SND_SOC_TLV320AIC23_SPI all=m @@ -14981,6 +15058,7 @@ SND_SOC_INTEL_SOF_RT5682_MACH all=m SND_SOC_INTEL_SOF_CS42L42_MACH=m SND_SOC_INTEL_SOF_PCM512x_MACH all=m SND_SOC_INTEL_SOF_ES8336_MACH all=m +SND_SOC_INTEL_SOF_NAU8825_MACH all=m SND_SOC_INTEL_CML_LP_DA7219_MAX98357A_MACH all=m SND_SOC_INTEL_SOF_CML_RT1011_RT5682_MACH all=m SND_SOC_INTEL_SOF_DA7219_MAX98373_MACH all=m @@ -15044,10 +15122,18 @@ SND_SOC_SOF_DEBUG_PROBES all=n SND_SOC_SOF_NOCODEC_SUPPORT all=n SND_SOC_SOF_STRICT_ABI_CHECKS all=n SND_SOC_SOF_DEBUG all=n +#- file sound/soc/sof/amd/Kconfig goes here #- file sound/soc/sof/imx/Kconfig goes here #- file sound/soc/sof/intel/Kconfig goes here +#- file sound/soc/sof/mediatek/Kconfig goes here #- file sound/soc/sof/xtensa/Kconfig goes here +#- +#- *** FILE: sound/soc/sof/amd/Kconfig *** +#- +SND_SOC_SOF_AMD_TOPLEVEL all=m +SND_SOC_SOF_AMD_RENOIR all=m + #- #- *** FILE: sound/soc/sof/imx/Kconfig *** #- @@ -15209,6 +15295,7 @@ BLK_DEV_PDC202XX_OLD all=m BLK_DEV_PIIX all=m BLK_DEV_PLATFORM all=n BLK_DEV_QD65XX alpha=m i386=m +BLK_DEV_RSXX all=m BLK_DEV_RZ1000 i386=m x86_64=n BLK_DEV_SC1200 all=m BLK_DEV_SIIMAGE all=m @@ -15225,12 +15312,15 @@ BLK_DEV_VIA82CXXX all=m CACHEFILES_HISTOGRAM all=n CAIF_HSI all=m CIFS_WEAK_PW_HASH all=y +CLEANCACHE all=y +CRYPTO_LIB_BLAKE2S all=m CYCLADES all=m CYZ_INTR all=n DEBUG_BLOCK_EXT_DEVT all=n DEFCONFIG_LIST all="/lib/modules/$UNAME_RELEASE/.config" DEFXX_MMIO all=n DEVKMEM all=y +DEV_DAX_PMEM_COMPAT all=m DISCONTIGMEM_MANUAL all=n DRM_AMDGPU_GART_DEBUGFS all=n DRM_GMA600 all=y @@ -15238,6 +15328,7 @@ DSCC4_PCISYNC all=y DSCC4_PCI_RST all=y EROFS_FS_CLUSTER_PAGE_LIMIT all=1 EXTCON_ARIZONA all=m +FB_TFT_WATTEROTT all=m FSCACHE_HISTOGRAM all=n FSCACHE_OBJECT_LIST all=n GCC_PLUGIN_CYC_COMPLEXITY all=n @@ -15253,18 +15344,24 @@ IDE_GD_ATAPI all=y IDE_GENERIC all=m IDE_PROC_FS all=y IDE_TASK_IOCTL all=y +INFINIBAND_HNS_HIP06 arm64=n INFINIBAND_I40IW all=m IR_SIR all=m ISI all=m +IWLWIFI_BCAST_FILTERING all=y KPC2000 all=n LEDS_BLINK all=y MANDATORY_FILE_LOCKING all=y MAX_RAW_DEVS all=1024 +MFD_INTEL_PMT all=m MLXSW_SWITCHIB all=m MLXSW_SWITCHX2 all=m MODULE_COMPRESS all=y MOST_SOUND all=m NET_DSA_TAG_8021Q all=m +NFT_COUNTER all=m +NF_FLOW_TABLE_IPV4 all=m +NF_FLOW_TABLE_IPV6 all=m NF_LOG_BRIDGE all=m NF_LOG_NETDEV all=m NVM all=y @@ -15272,15 +15369,23 @@ NVM_PBLK all=m NVM_PBLK_DEBUG all=n PRISM54 all=m R3964 all=m +RAPIDIO_TSI568 all=m +RAPIDIO_TSI57X all=m RAW_DRIVER all=m +RCU_FAST_NO_HZ all=y ROCKETPORT all=m +SATA_DWC_DEBUG all=n SBNI i386=m x86_64=m SBNI_MULTILINE i386=y x86_64=y SENSORS_AMD_ENERGY all=m +SND_BCM2708_SOC_HIFIBERRY_DAC arm=m arm64=m +SND_RPI_SIMPLE_SOUNDCARD arm=m arm64=m +SND_RPI_WM8804_SOUNDCARD arm=m arm64=m SND_SOC_SOF_HDA_ALWAYS_ENABLE_DMI_L1 all=y SND_SOC_ZX_AUD96P22 all=m STAGING_APEX_DRIVER all=m STAGING_GASKET_FRAMEWORK all=m +TEST_HASH all=m TRACE_ROUTER all=m TRACE_SINK all=m VFIO_MDEV_DEVICE all=m diff --git a/kernel-x86.config b/kernel-x86.config index 2aff2e68..0a7146fb 100644 --- a/kernel-x86.config +++ b/kernel-x86.config @@ -76,7 +76,6 @@ X86_PMEM_LEGACY x86=y HIGHPTE i386=n X86_CHECK_BIOS_CORRUPTION x86=y X86_BOOTPARAM_MEMORY_CORRUPTION_CHECK x86=y -X86_RESERVE_LOW x86=64 MATH_EMULATION i386=y i686=n pentium3=n pentium4=n athlon=n MTRR x86=y MTRR_SANITIZER x86=y @@ -132,7 +131,6 @@ GEOS i486=y i586=y i686=y IA32_EMULATION x86_64=y IA32_AOUT x86_64=y X86_X32 x86_64=y -#- file drivers/firmware/Kconfig goes here #- file arch/x86/kvm/Kconfig goes here #- file arch/x86/Kconfig.assembler goes here @@ -225,6 +223,7 @@ X86_E_POWERSAVER i386=m X86_SPEEDSTEP_RELAXED_CAP_CHECK i386=y #- -#- *** FILE: drivers/firmware/efi/Kconfig *** +#- *** PROBABLY REMOVED OPTIONS *** #- EFI_CAPSULE_QUIRK_QUARK_CSH i386=y +X86_RESERVE_LOW x86=64 diff --git a/kernel.spec b/kernel.spec index a132bdd1..5574e093 100644 --- a/kernel.spec +++ b/kernel.spec @@ -66,8 +66,8 @@ %endif %define rel 1 -%define basever 5.16 -%define postver .15 +%define basever 5.17 +%define postver .0 # define this to '-%{basever}' for longterm branch %define versuffix %{nil} @@ -118,7 +118,7 @@ Epoch: 3 License: GPL v2 Group: Base/Kernel Source0: https://www.kernel.org/pub/linux/kernel/v5.x/linux-%{basever}.tar.xz -# Source0-md5: e6680ce7c989a3efe58b51e3f3f0bf93 +# Source0-md5: 07321a70a48d062cebd0358132f11771 %if "%{postver}" != ".0" Patch0: https://www.kernel.org/pub/linux/kernel/v5.x/patch-%{version}.xz # Patch0-md5: 2728ee431a8e0192b9a7806033f07332 diff --git a/update-source.sh b/update-source.sh index 8b26547e..5056908d 100755 --- a/update-source.sh +++ b/update-source.sh @@ -5,7 +5,7 @@ BRANCH=aufs5.x-rcN #BRANCH=aufs5.16 # aufs5 -[ -d aufs5-standalone ] || git clone git://github.com/sfjro/aufs5-standalone.git +[ -d aufs5-standalone ] || git clone https://github.com/sfjro/aufs5-standalone.git cd aufs5-standalone git checkout -b ${BRANCH} origin/${BRANCH} git pull -- 2.44.0