diff --git a/.abf.yml b/.abf.yml index 12fb1f6..caa0885 100644 --- a/.abf.yml +++ b/.abf.yml @@ -1,3 +1,3 @@ sources: linux-4.17.tar.xz: 82826f02dd6d5bae5ccb802cc319a605b65111dc - patch-4.16.18.xz: 3316fac73d047b93dac0a8234022c87384c623e9 + patch-4.17.4.xz: bf6a07069dd55e4ff1b64124cd385c6e3424b793 diff --git a/disable-mrproper-prepare-scripts-configs-in-devel-rpms.patch b/disable-mrproper-prepare-scripts-configs-in-devel-rpms.patch index 60b4245..c4932ab 100644 --- a/disable-mrproper-prepare-scripts-configs-in-devel-rpms.patch +++ b/disable-mrproper-prepare-scripts-configs-in-devel-rpms.patch @@ -1,19 +1,19 @@ diff --git a/Makefile b/Makefile -index 38df392e45e4..bedb70959edc 100644 +index 1d740dbe676d..99d04dea3e2d 100644 --- a/Makefile +++ b/Makefile -@@ -561,9 +561,7 @@ ifeq ($(KBUILD_EXTMOD),) +@@ -1074,9 +1074,7 @@ include/config/kernel.release: include/config/auto.conf FORCE # Carefully list dependencies so we do not try to build scripts twice # in parallel PHONY += scripts -scripts: scripts_basic include/config/auto.conf include/config/tristate.conf \ -- asm-generic gcc-plugins +- asm-generic gcc-plugins $(autoksyms_h) - $(Q)$(MAKE) $(build)=$(@) +scripts: - # Objects we will link into vmlinux / subdirs we need to visit - init-y := init/ -@@ -1105,7 +1103,7 @@ prepare0: archprepare gcc-plugins + # Things we need to do before we recursively start building the kernel + # or the modules are listed in "prepare". +@@ -1115,7 +1113,7 @@ prepare0: archprepare gcc-plugins $(Q)$(MAKE) $(build)=. # All the preparing.. @@ -22,8 +22,8 @@ index 38df392e45e4..bedb70959edc 100644 # Support for using generic headers in asm-generic PHONY += asm-generic uapi-asm-generic -@@ -1337,13 +1335,8 @@ endif # CONFIG_MODULES - CLEAN_DIRS += $(MODVERDIR) +@@ -1347,13 +1345,8 @@ endif # CONFIG_MODULES + CLEAN_DIRS += $(MODVERDIR) include/ksym # Directories & files removed with 'make mrproper' -MRPROPER_DIRS += include/config usr/include include/generated \ @@ -38,7 +38,7 @@ index 38df392e45e4..bedb70959edc 100644 # clean - Delete most, but leave enough to build external modules # -@@ -1365,13 +1358,10 @@ clean: archclean vmlinuxclean +@@ -1375,13 +1368,10 @@ clean: archclean vmlinuxclean # mrproper: rm-dirs := $(wildcard $(MRPROPER_DIRS)) mrproper: rm-files := $(wildcard $(MRPROPER_FILES)) @@ -55,10 +55,10 @@ index 38df392e45e4..bedb70959edc 100644 $(call cmd,rmfiles) diff --git a/scripts/kconfig/Makefile b/scripts/kconfig/Makefile -index cb3ec53a7c29..2008d2079435 100644 +index 5def8779d7d8..9de582ed13f6 100644 --- a/scripts/kconfig/Makefile +++ b/scripts/kconfig/Makefile -@@ -20,27 +20,18 @@ endif +@@ -20,25 +20,18 @@ endif unexport CONFIG_ xconfig: $(obj)/qconf @@ -78,24 +78,22 @@ index cb3ec53a7c29..2008d2079435 100644 # This has become an internal implementation detail and is now deprecated # for external use. - silentoldconfig: $(obj)/conf + syncconfig: $(obj)/conf - $(Q)mkdir -p include/config include/generated -- $(Q)test -e include/generated/autoksyms.h || \ -- touch include/generated/autoksyms.h - $< $(silent) --$@ $(Kconfig) - localyesconfig localmodconfig: $(obj)/streamline_config.pl $(obj)/conf + localyesconfig localmodconfig: $(obj)/conf $(Q)mkdir -p include/config include/generated -@@ -86,7 +77,6 @@ simple-targets := oldconfig allnoconfig allyesconfig allmodconfig \ +@@ -84,7 +77,6 @@ simple-targets := oldconfig allnoconfig allyesconfig allmodconfig \ PHONY += $(simple-targets) $(simple-targets): $(obj)/conf - $< $(silent) --$@ $(Kconfig) - PHONY += oldnoconfig savedefconfig defconfig + PHONY += oldnoconfig silentoldconfig savedefconfig defconfig -@@ -98,23 +88,10 @@ oldnoconfig: olddefconfig - @echo " Please use \"olddefconfig\" instead, which is an alias." +@@ -103,23 +95,10 @@ silentoldconfig: syncconfig + @echo " \"silentoldconfig\" will be removed after Linux 4.19" savedefconfig: $(obj)/conf - $< $(silent) --$@=defconfig $(Kconfig) diff --git a/fs-aufs4.patch b/fs-aufs4.patch index 0637ec2..104984e 100644 --- a/fs-aufs4.patch +++ b/fs-aufs4.patch @@ -93,7 +93,7 @@ index 000000000000..82f9518495ea + will be empty. About XINO files, see the aufs manual. diff --git a/Documentation/filesystems/aufs/README b/Documentation/filesystems/aufs/README new file mode 100644 -index 000000000000..fa82b6394f69 +index 000000000000..013ea14d0665 --- /dev/null +++ b/Documentation/filesystems/aufs/README @@ -0,0 +1,393 @@ @@ -470,7 +470,7 @@ index 000000000000..fa82b6394f69 +James B made a donation (2014/7 and 2015/7). +Stefano Di Biase made a donation (2014/8). +Daniel Epellei made a donation (2015/1). -+OmegaPhil made a donation (2016/1). ++OmegaPhil made a donation (2016/1, 2018/4). +Tomasz Szewczyk made a donation (2016/4). +James Burry made a donation (2016/12). + @@ -1918,10 +1918,10 @@ index 000000000000..710313c08f85 +Currently this approach is applied to address_space_operations for +regular files only. diff --git a/MAINTAINERS b/MAINTAINERS -index 6e950b8b4a41..7324ece14a54 100644 +index 9c125f705f78..4616bbf26e5d 100644 --- a/MAINTAINERS +++ b/MAINTAINERS -@@ -2485,6 +2485,19 @@ F: include/linux/audit.h +@@ -2519,6 +2519,19 @@ F: include/linux/audit.h F: include/uapi/linux/audit.h F: kernel/audit* @@ -1942,10 +1942,10 @@ index 6e950b8b4a41..7324ece14a54 100644 M: Miguel Ojeda Sandonis W: http://miguelojeda.es/auxdisplay.htm diff --git a/drivers/block/loop.c b/drivers/block/loop.c -index fe92cb972dd1..44017835e4c1 100644 +index 55cf554bc914..bc965e5f608a 100644 --- a/drivers/block/loop.c +++ b/drivers/block/loop.c -@@ -691,6 +691,24 @@ static inline int is_loop_device(struct file *file) +@@ -713,6 +713,24 @@ static inline int is_loop_device(struct file *file) return i && S_ISBLK(i->i_mode) && MAJOR(i->i_rdev) == LOOP_MAJOR; } @@ -1983,7 +1983,7 @@ index bc821a86d965..7ae814c0844d 100644 endif # MISC_FILESYSTEMS diff --git a/fs/Makefile b/fs/Makefile -index add789ea270a..26100d68afa8 100644 +index c9375fd2c8c4..8af56710f1cd 100644 --- a/fs/Makefile +++ b/fs/Makefile @@ -128,3 +128,4 @@ obj-y += exofs/ # Multiple modules @@ -2316,10 +2316,10 @@ index 000000000000..bcf0a2e405e7 +#endif /* __AUFS_H__ */ diff --git a/fs/aufs/branch.c b/fs/aufs/branch.c new file mode 100644 -index 000000000000..eeca66c000ed +index 000000000000..916b5b787c0a --- /dev/null +++ b/fs/aufs/branch.c -@@ -0,0 +1,1432 @@ +@@ -0,0 +1,1421 @@ +/* + * Copyright (C) 2005-2018 Junjiro R. Okajima + * @@ -2357,12 +2357,7 @@ index 000000000000..eeca66c000ed + au_hnotify_fin_br(br); + /* always, regardless the mount option */ + au_dr_hino_free(&br->br_dirren); -+ -+ if (br->br_xino.xi_file) -+ fput(br->br_xino.xi_file); -+ for (i = br->br_xino.xi_nondir.total - 1; i >= 0; i--) -+ AuDebugOn(br->br_xino.xi_nondir.array[i]); -+ kfree(br->br_xino.xi_nondir.array); ++ au_xino_put(br); + + AuDebugOn(au_br_count(br)); + au_br_count_fin(br); @@ -2459,16 +2454,12 @@ index 000000000000..eeca66c000ed + add_branch = kzalloc(sizeof(*add_branch), GFP_NOFS); + if (unlikely(!add_branch)) + goto out; -+ add_branch->br_xino.xi_nondir.total = 8; /* initial size */ -+ add_branch->br_xino.xi_nondir.array -+ = kcalloc(add_branch->br_xino.xi_nondir.total, sizeof(ino_t), -+ GFP_NOFS); -+ if (unlikely(!add_branch->br_xino.xi_nondir.array)) ++ add_branch->br_xino = au_xino_alloc(); ++ if (unlikely(!add_branch->br_xino)) + goto out_br; -+ + err = au_hnotify_init_br(add_branch, perm); + if (unlikely(err)) -+ goto out_xinondir; ++ goto out_xino; + + if (au_br_writable(perm)) { + /* may be freed separately at changing the branch permission */ @@ -2500,8 +2491,8 @@ index 000000000000..eeca66c000ed + kfree(add_branch->br_wbr); +out_hnotify: + au_hnotify_fin_br(add_branch); -+out_xinondir: -+ kfree(add_branch->br_xino.xi_nondir.array); ++out_xino: ++ au_xino_put(add_branch); +out_br: + kfree(add_branch); +out: @@ -2712,16 +2703,15 @@ index 000000000000..eeca66c000ed + struct au_opt_add *add) +{ + int err; ++ struct au_branch *brbase; ++ struct file *xf; + struct inode *h_inode; + + err = 0; -+ spin_lock_init(&br->br_xino.xi_nondir.spin); -+ init_waitqueue_head(&br->br_xino.xi_nondir.wqh); + br->br_perm = add->perm; + br->br_path = add->path; /* set first, path_get() later */ + spin_lock_init(&br->br_dykey_lock); + au_br_count_init(br); -+ atomic_set(&br->br_xino_running, 0); + br->br_id = au_new_br_id(sb); + AuDebugOn(br->br_id < 0); + @@ -2737,11 +2727,13 @@ index 000000000000..eeca66c000ed + } + + if (au_opt_test(au_mntflags(sb), XINO)) { ++ brbase = au_sbr(sb, 0); ++ xf = au_xino_file(brbase); ++ AuDebugOn(!xf); + h_inode = d_inode(add->path.dentry); -+ err = au_xino_br(sb, br, h_inode->i_ino, -+ au_sbr(sb, 0)->br_xino.xi_file, /*do_test*/1); ++ err = au_xino_init_br(sb, br, h_inode->i_ino, &xf->f_path); + if (unlikely(err)) { -+ AuDebugOn(br->br_xino.xi_file); ++ AuDebugOn(au_xino_file(br)); + goto out_err; + } + } @@ -2831,6 +2823,7 @@ index 000000000000..eeca66c000ed + struct dentry *root, *h_dentry; + struct inode *root_inode; + struct au_branch *add_branch; ++ struct file *xf; + + root = sb->s_root; + root_inode = d_inode(root); @@ -2857,13 +2850,10 @@ index 000000000000..eeca66c000ed + } + + add_bindex = add->bindex; -+ if (!remount) -+ au_br_do_add(sb, add_branch, add_bindex); -+ else { -+ sysaufs_brs_del(sb, add_bindex); -+ au_br_do_add(sb, add_branch, add_bindex); -+ sysaufs_brs_add(sb, add_bindex); -+ } ++ sysaufs_brs_del(sb, add_bindex); /* remove successors */ ++ au_br_do_add(sb, add_branch, add_bindex); ++ sysaufs_brs_add(sb, add_bindex); /* append successors */ ++ dbgaufs_brs_add(sb, add_bindex, /*topdown*/0); /* rename successors */ + + h_dentry = add->path.dentry; + if (!add_bindex) { @@ -2873,16 +2863,17 @@ index 000000000000..eeca66c000ed + au_add_nlink(root_inode, d_inode(h_dentry)); + + /* -+ * this test/set prevents aufs from handling unnecesary notify events ++ * this test/set prevents aufs from handling unnecessary notify events + * of xino files, in case of re-adding a writable branch which was + * once detached from aufs. + */ + if (au_xino_brid(sb) < 0 + && au_br_writable(add_branch->br_perm) -+ && !au_test_fs_bad_xino(h_dentry->d_sb) -+ && add_branch->br_xino.xi_file -+ && add_branch->br_xino.xi_file->f_path.dentry->d_parent == h_dentry) -+ au_xino_brid_set(sb, add_branch->br_id); ++ && !au_test_fs_bad_xino(h_dentry->d_sb)) { ++ xf = au_xino_file(add_branch); ++ if (xf && xf->f_path.dentry->d_parent == h_dentry) ++ au_xino_brid_set(sb, add_branch->br_id); ++ } + +out: + return err; @@ -3185,7 +3176,7 @@ index 000000000000..eeca66c000ed +} + +static void br_del_file(struct file **to_free, unsigned long long opened, -+ aufs_bindex_t br_id) ++ aufs_bindex_t br_id) +{ + unsigned long long ull; + aufs_bindex_t bindex, btop, bbot, bfound; @@ -3412,13 +3403,11 @@ index 000000000000..eeca66c000ed + di_write_lock_child(root); + } + -+ if (!remount) -+ au_br_do_del(sb, bindex, br); -+ else { -+ sysaufs_brs_del(sb, bindex); -+ au_br_do_del(sb, bindex, br); -+ sysaufs_brs_add(sb, bindex); -+ } ++ sysaufs_brs_del(sb, bindex); /* remove successors */ ++ dbgaufs_xino_del(br); /* remove one */ ++ au_br_do_del(sb, bindex, br); ++ sysaufs_brs_add(sb, bindex); /* append successors */ ++ dbgaufs_brs_add(sb, bindex, /*topdown*/1); /* rename successors */ + + if (!bindex) { + au_cpup_attr_all(d_inode(root), /*force*/1); @@ -3754,10 +3743,10 @@ index 000000000000..eeca66c000ed +} diff --git a/fs/aufs/branch.h b/fs/aufs/branch.h new file mode 100644 -index 000000000000..65fdd2aa6939 +index 000000000000..012bdfa0474e --- /dev/null +++ b/fs/aufs/branch.h -@@ -0,0 +1,333 @@ +@@ -0,0 +1,373 @@ +/* + * Copyright (C) 2005-2018 Junjiro R. Okajima + * @@ -3793,7 +3782,7 @@ index 000000000000..65fdd2aa6939 +/* ---------------------------------------------------------------------- */ + +/* a xino file */ -+struct au_xino_file { ++struct au_xino { + struct file *xi_file; + struct { + spinlock_t spin; @@ -3804,11 +3793,11 @@ index 000000000000..65fdd2aa6939 + wait_queue_head_t wqh; + } xi_nondir; + -+ /* todo: make xino files an array to support huge inode number */ ++ atomic_t xi_truncating; + -+#ifdef CONFIG_DEBUG_FS -+ struct dentry *xi_dbgaufs; -+#endif ++ struct kref xi_kref; ++ ++ /* todo: make xino files an array to support huge inode number */ +}; + +/* File-based Hierarchical Storage Management */ @@ -3859,7 +3848,7 @@ index 000000000000..65fdd2aa6939 + +/* protected by superblock rwsem */ +struct au_branch { -+ struct au_xino_file br_xino; ++ struct au_xino *br_xino; + + aufs_bindex_t br_id; + @@ -3872,9 +3861,6 @@ index 000000000000..65fdd2aa6939 + struct au_wbr *br_wbr; + struct au_br_fhsm *br_fhsm; + -+ /* xino truncation */ -+ atomic_t br_xino_running; -+ +#ifdef CONFIG_AUFS_HFSNOTIFY + struct au_br_hfsnotify *br_hfsn; +#endif @@ -3884,6 +3870,10 @@ index 000000000000..65fdd2aa6939 + struct au_brsysfs br_sysfs[AuBrSysfs_Last]; +#endif + ++#ifdef CONFIG_DEBUG_FS ++ struct dentry *br_dbgaufs; /* xino */ ++#endif ++ + struct au_dr_br br_dirren; +}; + @@ -3957,6 +3947,36 @@ index 000000000000..65fdd2aa6939 + return err; +} + ++static inline void au_xino_get(struct au_branch *br) ++{ ++ struct au_xino *xi; ++ ++ xi = br->br_xino; ++ if (xi) ++ kref_get(&xi->xi_kref); ++} ++ ++static inline int au_xino_count(struct au_branch *br) ++{ ++ int v; ++ struct au_xino *xi; ++ ++ v = 0; ++ xi = br->br_xino; ++ if (xi) ++ v = kref_read(&xi->xi_kref); ++ ++ return v; ++} ++ ++static inline struct file *au_xino_file(struct au_branch *br) ++{ ++ struct au_xino *xi; ++ ++ xi = br->br_xino; ++ return xi ? xi->xi_file : NULL; ++} ++ +/* ---------------------------------------------------------------------- */ + +/* branch.c */ @@ -3980,34 +4000,43 @@ index 000000000000..65fdd2aa6939 +/* xino.c */ +static const loff_t au_loff_max = LLONG_MAX; + -+int au_xib_trunc(struct super_block *sb); ++struct file *au_xino_create(struct super_block *sb, char *fpath, int silent); ++struct file *au_xino_create2(struct super_block *sb, struct path *base, ++ struct file *copy_src); ++ ++int au_xino_read(struct super_block *sb, aufs_bindex_t bindex, ino_t h_ino, ++ ino_t *ino); ++int au_xino_write(struct super_block *sb, aufs_bindex_t bindex, ino_t h_ino, ++ ino_t ino); +ssize_t xino_fread(vfs_readf_t func, struct file *file, void *buf, size_t size, + loff_t *pos); +ssize_t xino_fwrite(vfs_writef_t func, struct file *file, void *buf, + size_t size, loff_t *pos); -+struct file *au_xino_create2(struct file *base_file, struct file *copy_src); -+struct file *au_xino_create(struct super_block *sb, char *fname, int silent); -+ino_t au_xino_new_ino(struct super_block *sb); -+void au_xino_delete_inode(struct inode *inode, const int unlinked); -+int au_xino_write(struct super_block *sb, aufs_bindex_t bindex, ino_t h_ino, -+ ino_t ino); -+int au_xino_read(struct super_block *sb, aufs_bindex_t bindex, ino_t h_ino, -+ ino_t *ino); -+int au_xino_br(struct super_block *sb, struct au_branch *br, ino_t hino, -+ struct file *base_file, int do_test); ++ ++int au_xib_trunc(struct super_block *sb); +int au_xino_trunc(struct super_block *sb, aufs_bindex_t bindex); + ++struct au_xino *au_xino_alloc(void); ++int au_xino_put(struct au_branch *br); ++void au_xino_file_set(struct au_branch *br, struct file *file); ++ +struct au_opt_xino; -+int au_xino_set(struct super_block *sb, struct au_opt_xino *xino, int remount); +void au_xino_clr(struct super_block *sb); ++int au_xino_set(struct super_block *sb, struct au_opt_xino *xiopt, int remount); +struct file *au_xino_def(struct super_block *sb); -+int au_xino_path(struct seq_file *seq, struct file *file); ++int au_xino_init_br(struct super_block *sb, struct au_branch *br, ino_t hino, ++ struct path *base); ++ ++ino_t au_xino_new_ino(struct super_block *sb); ++void au_xino_delete_inode(struct inode *inode, const int unlinked); + +void au_xinondir_leave(struct super_block *sb, aufs_bindex_t bindex, + ino_t h_ino, int idx); +int au_xinondir_enter(struct super_block *sb, aufs_bindex_t bindex, ino_t h_ino, + int *idx); + ++int au_xino_path(struct seq_file *seq, struct file *file); ++ +/* ---------------------------------------------------------------------- */ + +/* Superblock to branch */ @@ -4139,7 +4168,7 @@ index 000000000000..12782f8e0f38 +-include ${srctree}/${src}/conf_priv.mk diff --git a/fs/aufs/cpup.c b/fs/aufs/cpup.c new file mode 100644 -index 000000000000..30c5fefe8f4d +index 000000000000..d1b407d4b627 --- /dev/null +++ b/fs/aufs/cpup.c @@ -0,0 +1,1441 @@ @@ -4618,7 +4647,7 @@ index 000000000000..30c5fefe8f4d + if (tsk->flags & PF_KTHREAD) + __fput_sync(file[DST].file); + else { -+ /* it happend actually */ ++ /* it happened actually */ + fput(file[DST].file); + /* + * too bad. @@ -5691,10 +5720,10 @@ index 000000000000..99295266c4a0 +#endif /* __AUFS_CPUP_H__ */ diff --git a/fs/aufs/dbgaufs.c b/fs/aufs/dbgaufs.c new file mode 100644 -index 000000000000..b85f0694b7fd +index 000000000000..3727d112bbde --- /dev/null +++ b/fs/aufs/dbgaufs.c -@@ -0,0 +1,437 @@ +@@ -0,0 +1,477 @@ +/* + * Copyright (C) 2005-2018 Junjiro R. Okajima + * @@ -5742,7 +5771,8 @@ index 000000000000..b85f0694b7fd + return 0; +} + -+static int dbgaufs_xi_open(struct file *xf, struct file *file, int do_fcnt) ++static int dbgaufs_xi_open(struct file *xf, struct file *file, int do_fcnt, ++ int cnt) +{ + int err; + struct kstat st; @@ -5763,8 +5793,8 @@ index 000000000000..b85f0694b7fd + if (!err) { + if (do_fcnt) + p->n = snprintf -+ (p->a, sizeof(p->a), "%ld, %llux%u %lld\n", -+ (long)file_count(xf), st.blocks, st.blksize, ++ (p->a, sizeof(p->a), "%d, %llux%u %lld\n", ++ cnt, st.blocks, st.blksize, + (long long)st.size); + else + p->n = snprintf(p->a, sizeof(p->a), "%llux%u %lld\n", @@ -5895,7 +5925,7 @@ index 000000000000..b85f0694b7fd + sbinfo = inode->i_private; + sb = sbinfo->si_sb; + si_noflush_read_lock(sb); -+ err = dbgaufs_xi_open(sbinfo->si_xib, file, /*do_fcnt*/0); ++ err = dbgaufs_xi_open(sbinfo->si_xib, file, /*do_fcnt*/0, /*cnt*/0); + si_read_unlock(sb); + return err; +} @@ -5919,6 +5949,7 @@ index 000000000000..b85f0694b7fd + struct super_block *sb; + struct file *xf; + struct qstr *name; ++ struct au_branch *br; + + err = -ENOENT; + xf = NULL; @@ -5935,8 +5966,10 @@ index 000000000000..b85f0694b7fd + sb = sbinfo->si_sb; + si_noflush_read_lock(sb); + if (l <= au_sbbot(sb)) { -+ xf = au_sbr(sb, (aufs_bindex_t)l)->br_xino.xi_file; -+ err = dbgaufs_xi_open(xf, file, /*do_fcnt*/1); ++ br = au_sbr(sb, (aufs_bindex_t)l); ++ xf = au_xino_file(br); ++ err = dbgaufs_xi_open(xf, file, /*do_fcnt*/1, ++ au_xino_count(br)); + } else + err = -ENOENT; + si_read_unlock(sb); @@ -5952,11 +5985,25 @@ index 000000000000..b85f0694b7fd + .read = dbgaufs_xi_read +}; + ++void dbgaufs_xino_del(struct au_branch *br) ++{ ++ struct dentry *dbgaufs; ++ ++ dbgaufs = br->br_dbgaufs; ++ if (!dbgaufs) ++ return; ++ ++ br->br_dbgaufs = NULL; ++ /* debugfs acquires the parent i_mutex */ ++ lockdep_off(); ++ debugfs_remove(dbgaufs); ++ lockdep_on(); ++} ++ +void dbgaufs_brs_del(struct super_block *sb, aufs_bindex_t bindex) +{ + aufs_bindex_t bbot; + struct au_branch *br; -+ struct au_xino_file *xi; + + if (!au_sbi(sb)->si_dbgaufs) + return; @@ -5964,23 +6011,51 @@ index 000000000000..b85f0694b7fd + bbot = au_sbbot(sb); + for (; bindex <= bbot; bindex++) { + br = au_sbr(sb, bindex); -+ xi = &br->br_xino; -+ /* debugfs acquires the parent i_mutex */ -+ lockdep_off(); -+ debugfs_remove(xi->xi_dbgaufs); -+ lockdep_on(); -+ xi->xi_dbgaufs = NULL; ++ dbgaufs_xino_del(br); + } +} + -+void dbgaufs_brs_add(struct super_block *sb, aufs_bindex_t bindex) ++static void dbgaufs_br_add(struct super_block *sb, aufs_bindex_t bindex, ++ struct dentry *parent, struct au_sbinfo *sbinfo) ++{ ++ struct au_branch *br; ++ struct dentry *d; ++ char name[sizeof(DbgaufsXi_PREFIX) + 5]; /* "xi" bindex NULL */ ++ ++ snprintf(name, sizeof(name), DbgaufsXi_PREFIX "%d", bindex); ++ br = au_sbr(sb, bindex); ++ if (br->br_dbgaufs) { ++ struct qstr qstr = QSTR_INIT(name, strlen(name)); ++ ++ if (!au_qstreq(&br->br_dbgaufs->d_name, &qstr)) { ++ /* debugfs acquires the parent i_mutex */ ++ lockdep_off(); ++ d = debugfs_rename(parent, br->br_dbgaufs, parent, ++ name); ++ lockdep_on(); ++ if (unlikely(!d)) ++ pr_warn("failed renaming %pd/%s, ignored.\n", ++ parent, name); ++ } ++ } else { ++ lockdep_off(); ++ br->br_dbgaufs = debugfs_create_file(name, dbgaufs_mode, parent, ++ sbinfo, &dbgaufs_xino_fop); ++ lockdep_on(); ++ if (unlikely(!br->br_dbgaufs)) ++ pr_warn("failed creaiting %pd/%s, ignored.\n", ++ parent, name); ++ } ++} ++ ++void dbgaufs_brs_add(struct super_block *sb, aufs_bindex_t bindex, int topdown) +{ + struct au_sbinfo *sbinfo; + struct dentry *parent; -+ struct au_branch *br; -+ struct au_xino_file *xi; + aufs_bindex_t bbot; -+ char name[sizeof(DbgaufsXi_PREFIX) + 5]; /* "xi" bindex NULL */ ++ ++ if (!au_opt_test(au_mntflags(sb), XINO)) ++ return; + + sbinfo = au_sbi(sb); + parent = sbinfo->si_dbgaufs; @@ -5988,20 +6063,12 @@ index 000000000000..b85f0694b7fd + return; + + bbot = au_sbbot(sb); -+ for (; bindex <= bbot; bindex++) { -+ snprintf(name, sizeof(name), DbgaufsXi_PREFIX "%d", bindex); -+ br = au_sbr(sb, bindex); -+ xi = &br->br_xino; -+ AuDebugOn(xi->xi_dbgaufs); -+ /* debugfs acquires the parent i_mutex */ -+ lockdep_off(); -+ xi->xi_dbgaufs = debugfs_create_file(name, dbgaufs_mode, parent, -+ sbinfo, &dbgaufs_xino_fop); -+ lockdep_on(); -+ /* ignore an error */ -+ if (unlikely(!xi->xi_dbgaufs)) -+ AuWarn1("failed %s under debugfs\n", name); -+ } ++ if (topdown) ++ for (; bindex <= bbot; bindex++) ++ dbgaufs_br_add(sb, bindex, parent, sbinfo); ++ else ++ for (; bbot >= bindex; bbot--) ++ dbgaufs_br_add(sb, bbot, parent, sbinfo); +} + +/* ---------------------------------------------------------------------- */ @@ -6016,7 +6083,7 @@ index 000000000000..b85f0694b7fd + sbinfo = inode->i_private; + sb = sbinfo->si_sb; + si_noflush_read_lock(sb); -+ err = dbgaufs_xi_open(sbinfo->si_xigen, file, /*do_fcnt*/0); ++ err = dbgaufs_xi_open(sbinfo->si_xigen, file, /*do_fcnt*/0, /*cnt*/0); + si_read_unlock(sb); + return err; +} @@ -6066,7 +6133,6 @@ index 000000000000..b85f0694b7fd + + debugfs_remove_recursive(sbinfo->si_dbgaufs); + sbinfo->si_dbgaufs = NULL; -+ kobject_put(&sbinfo->si_kobj); +} + +int dbgaufs_si_init(struct au_sbinfo *sbinfo) @@ -6091,20 +6157,21 @@ index 000000000000..b85f0694b7fd + sbinfo->si_dbgaufs = debugfs_create_dir(name, dbgaufs); + if (unlikely(!sbinfo->si_dbgaufs)) + goto out; -+ kobject_get(&sbinfo->si_kobj); -+ -+ sbinfo->si_dbgaufs_xib = debugfs_create_file -+ ("xib", dbgaufs_mode, sbinfo->si_dbgaufs, sbinfo, -+ &dbgaufs_xib_fop); -+ if (unlikely(!sbinfo->si_dbgaufs_xib)) -+ goto out_dir; + ++ /* regardless plink/noplink option */ + sbinfo->si_dbgaufs_plink = debugfs_create_file + ("plink", dbgaufs_mode, sbinfo->si_dbgaufs, sbinfo, + &dbgaufs_plink_fop); + if (unlikely(!sbinfo->si_dbgaufs_plink)) + goto out_dir; + ++ /* regardless xino/noxino option */ ++ sbinfo->si_dbgaufs_xib = debugfs_create_file ++ ("xib", dbgaufs_mode, sbinfo->si_dbgaufs, sbinfo, ++ &dbgaufs_xib_fop); ++ if (unlikely(!sbinfo->si_dbgaufs_xib)) ++ goto out_dir; ++ + err = dbgaufs_xigen_init(sbinfo); + if (!err) + goto out; /* success */ @@ -6112,6 +6179,8 @@ index 000000000000..b85f0694b7fd +out_dir: + dbgaufs_si_fin(sbinfo); +out: ++ if (unlikely(err)) ++ pr_err("debugfs/aufs failed\n"); + return err; +} + @@ -6134,10 +6203,10 @@ index 000000000000..b85f0694b7fd +} diff --git a/fs/aufs/dbgaufs.h b/fs/aufs/dbgaufs.h new file mode 100644 -index 000000000000..f8d7b74e8d61 +index 000000000000..dcb0522e08cd --- /dev/null +++ b/fs/aufs/dbgaufs.h -@@ -0,0 +1,48 @@ +@@ -0,0 +1,52 @@ +/* + * Copyright (C) 2005-2018 Junjiro R. Okajima + * @@ -6166,18 +6235,22 @@ index 000000000000..f8d7b74e8d61 + +struct super_block; +struct au_sbinfo; ++struct au_branch; + +#ifdef CONFIG_DEBUG_FS +/* dbgaufs.c */ ++void dbgaufs_xino_del(struct au_branch *br); +void dbgaufs_brs_del(struct super_block *sb, aufs_bindex_t bindex); -+void dbgaufs_brs_add(struct super_block *sb, aufs_bindex_t bindex); ++void dbgaufs_brs_add(struct super_block *sb, aufs_bindex_t bindex, int topdown); +void dbgaufs_si_fin(struct au_sbinfo *sbinfo); +int dbgaufs_si_init(struct au_sbinfo *sbinfo); +void dbgaufs_fin(void); +int __init dbgaufs_init(void); +#else ++AuStubVoid(dbgaufs_xino_del, struct au_branch *br) +AuStubVoid(dbgaufs_brs_del, struct super_block *sb, aufs_bindex_t bindex) -+AuStubVoid(dbgaufs_brs_add, struct super_block *sb, aufs_bindex_t bindex) ++AuStubVoid(dbgaufs_brs_add, struct super_block *sb, aufs_bindex_t bindex, ++ int topdown) +AuStubVoid(dbgaufs_si_fin, struct au_sbinfo *sbinfo) +AuStubInt0(dbgaufs_si_init, struct au_sbinfo *sbinfo) +AuStubVoid(dbgaufs_fin, void) @@ -6561,7 +6634,7 @@ index 000000000000..50e81bf68a5f +#endif /* __AUFS_DCSUB_H__ */ diff --git a/fs/aufs/debug.c b/fs/aufs/debug.c new file mode 100644 -index 000000000000..9fe5cb0c40ea +index 000000000000..06ac9352280d --- /dev/null +++ b/fs/aufs/debug.c @@ -0,0 +1,440 @@ @@ -6872,7 +6945,7 @@ index 000000000000..9fe5cb0c40ea + bindex, br->br_perm, br->br_id, au_br_count(br), + br->br_wbr, au_sbtype(sb), MAJOR(sb->s_dev), MINOR(sb->s_dev), + sb->s_flags, sb->s_count, -+ atomic_read(&sb->s_active), !!br->br_xino.xi_file); ++ atomic_read(&sb->s_active), !!au_xino_file(br)); + return 0; + +out: @@ -12050,10 +12123,10 @@ index 000000000000..81a770505115 +#endif /* __AUFS_DYNOP_H__ */ diff --git a/fs/aufs/export.c b/fs/aufs/export.c new file mode 100644 -index 000000000000..155e07a8ebaa +index 000000000000..4cf60fce3116 --- /dev/null +++ b/fs/aufs/export.c -@@ -0,0 +1,836 @@ +@@ -0,0 +1,837 @@ +/* + * Copyright (C) 2005-2018 Junjiro R. Okajima + * @@ -12237,7 +12310,7 @@ index 000000000000..155e07a8ebaa + return err; +} + -+int au_xigen_set(struct super_block *sb, struct file *base) ++int au_xigen_set(struct super_block *sb, struct path *path) +{ + int err; + struct au_sbinfo *sbinfo; @@ -12246,7 +12319,7 @@ index 000000000000..155e07a8ebaa + SiMustWriteLock(sb); + + sbinfo = au_sbi(sb); -+ file = au_xino_create2(base, sbinfo->si_xigen); ++ file = au_xino_create2(sb, path, sbinfo->si_xigen); + err = PTR_ERR(file); + if (IS_ERR(file)) + goto out; @@ -12256,6 +12329,7 @@ index 000000000000..155e07a8ebaa + sbinfo->si_xigen = file; + +out: ++ AuTraceErr(err); + return err; +} + @@ -23225,10 +23299,10 @@ index 000000000000..7bc9eef3ffec +endif diff --git a/fs/aufs/module.c b/fs/aufs/module.c new file mode 100644 -index 000000000000..9eeec710ae5f +index 000000000000..bba8a5762a26 --- /dev/null +++ b/fs/aufs/module.c -@@ -0,0 +1,266 @@ +@@ -0,0 +1,272 @@ +/* + * Copyright (C) 2005-2018 Junjiro R. Okajima + * @@ -23433,9 +23507,12 @@ index 000000000000..9eeec710ae5f + err = sysaufs_init(); + if (unlikely(err)) + goto out; -+ err = au_procfs_init(); ++ err = dbgaufs_init(); + if (unlikely(err)) + goto out_sysaufs; ++ err = au_procfs_init(); ++ if (unlikely(err)) ++ goto out_dbgaufs; + err = au_wkq_init(); + if (unlikely(err)) + goto out_procfs; @@ -23473,6 +23550,8 @@ index 000000000000..9eeec710ae5f + au_wkq_fin(); +out_procfs: + au_procfs_fin(); ++out_dbgaufs: ++ dbgaufs_fin(); +out_sysaufs: + sysaufs_fin(); + au_dy_fin(); @@ -23489,6 +23568,7 @@ index 000000000000..9eeec710ae5f + au_loopback_fin(); + au_wkq_fin(); + au_procfs_fin(); ++ dbgaufs_fin(); + sysaufs_fin(); + au_dy_fin(); +} @@ -24314,10 +24394,10 @@ index 000000000000..b51219658aa8 +} diff --git a/fs/aufs/opts.c b/fs/aufs/opts.c new file mode 100644 -index 000000000000..eb3fe3fb4e75 +index 000000000000..45fa31653ff5 --- /dev/null +++ b/fs/aufs/opts.c -@@ -0,0 +1,1891 @@ +@@ -0,0 +1,1890 @@ +/* + * Copyright (C) 2005-2018 Junjiro R. Okajima + * @@ -25878,14 +25958,7 @@ index 000000000000..eb3fe3fb4e75 + err = 0; + switch (opt->type) { + case Opt_xino: -+ err = au_xino_set(sb, &opt->xino, -+ !!au_ftest_opts(opts->flags, REMOUNT)); -+ if (unlikely(err)) -+ break; -+ -+ *opt_xino = &opt->xino; + au_xino_brid_set(sb, -1); -+ + /* safe d_parent access */ + parent = opt->xino.file->f_path.dentry->d_parent; + root = sb->s_root; @@ -25897,11 +25970,17 @@ index 000000000000..eb3fe3fb4e75 + break; + } + } ++ ++ err = au_xino_set(sb, &opt->xino, ++ !!au_ftest_opts(opts->flags, REMOUNT)); ++ if (unlikely(err)) ++ break; ++ ++ *opt_xino = &opt->xino; + break; + + case Opt_noxino: + au_xino_clr(sb); -+ au_xino_brid_set(sb, -1); + *opt_xino = (void *)-1; + break; + } @@ -26962,7 +27041,7 @@ index 000000000000..f1a569f2337e +} diff --git a/fs/aufs/poll.c b/fs/aufs/poll.c new file mode 100644 -index 000000000000..374b46db7b2b +index 000000000000..b7847c3f3a44 --- /dev/null +++ b/fs/aufs/poll.c @@ -0,0 +1,53 @@ @@ -26993,7 +27072,6 @@ index 000000000000..374b46db7b2b +__poll_t aufs_poll(struct file *file, poll_table *wait) +{ + __poll_t mask; -+ int err; + struct file *h_file; + struct super_block *sb; + @@ -27003,9 +27081,10 @@ index 000000000000..374b46db7b2b + 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)) ++ if (IS_ERR(h_file)) { ++ AuDbg("h_file %ld\n", PTR_ERR(h_file)); + goto out; ++ } + + /* it is not an error if h_file has no operation */ + mask = DEFAULT_POLLMASK; @@ -27015,7 +27094,7 @@ index 000000000000..374b46db7b2b + +out: + si_read_unlock(sb); -+ if (mask & POLLERR) ++ if (mask & EPOLLERR) + AuDbg("mask 0x%x\n", mask); + return mask; +} @@ -27770,10 +27849,10 @@ index 000000000000..e4711f6f7ab5 +#endif /* __AUFS_RWSEM_H__ */ diff --git a/fs/aufs/sbinfo.c b/fs/aufs/sbinfo.c new file mode 100644 -index 000000000000..bf8877f33cf1 +index 000000000000..2f7c6aeb1f26 --- /dev/null +++ b/fs/aufs/sbinfo.c -@@ -0,0 +1,304 @@ +@@ -0,0 +1,311 @@ +/* + * Copyright (C) 2005-2018 Junjiro R. Okajima + * @@ -27816,6 +27895,7 @@ index 000000000000..bf8877f33cf1 + AuDebugOn(percpu_counter_sum(&sbinfo->si_nfiles)); + percpu_counter_destroy(&sbinfo->si_nfiles); + ++ dbgaufs_si_fin(sbinfo); + au_rw_write_lock(&sbinfo->si_rwsem); + au_br_free(sbinfo); + au_rw_write_unlock(&sbinfo->si_rwsem); @@ -27843,6 +27923,12 @@ index 000000000000..bf8877f33cf1 + goto out_sbinfo; + + err = sysaufs_si_init(sbinfo); ++ if (!err) { ++ dbgaufs_si_null(sbinfo); ++ err = dbgaufs_si_init(sbinfo); ++ if (unlikely(err)) ++ kobject_put(&sbinfo->si_kobj); ++ } + if (unlikely(err)) + goto out_br; + @@ -28080,10 +28166,10 @@ index 000000000000..bf8877f33cf1 +} diff --git a/fs/aufs/super.c b/fs/aufs/super.c new file mode 100644 -index 000000000000..56313e7599e6 +index 000000000000..4d0abfbd8dfb --- /dev/null +++ b/fs/aufs/super.c -@@ -0,0 +1,1051 @@ +@@ -0,0 +1,1042 @@ +/* + * Copyright (C) 2005-2018 Junjiro R. Okajima + * @@ -28556,11 +28642,8 @@ index 000000000000..56313e7599e6 + struct au_sbinfo *sbinfo; + + sbinfo = au_sbi(sb); -+ if (!sbinfo) -+ return; -+ -+ dbgaufs_si_fin(sbinfo); -+ kobject_put(&sbinfo->si_kobj); ++ if (sbinfo) ++ kobject_put(&sbinfo->si_kobj); +} + +/* ---------------------------------------------------------------------- */ @@ -29063,7 +29146,6 @@ index 000000000000..56313e7599e6 + dput(root); + sb->s_root = NULL; +out_info: -+ dbgaufs_si_fin(sbinfo); + kobject_put(&sbinfo->si_kobj); + sb->s_fs_info = NULL; +out_opts: @@ -29082,7 +29164,6 @@ index 000000000000..56313e7599e6 + void *raw_data) +{ + struct dentry *root; -+ struct super_block *sb; + + /* all timestamps always follow the ones on the branch */ + /* mnt->mnt_flags |= MNT_NOATIME | MNT_NODIRATIME; */ @@ -29090,11 +29171,7 @@ index 000000000000..56313e7599e6 + if (IS_ERR(root)) + goto out; + -+ sb = root->d_sb; -+ si_write_lock(sb, !AuLock_FLUSH); -+ sysaufs_brs_add(sb, 0); -+ si_write_unlock(sb); -+ au_sbilist_add(sb); ++ au_sbilist_add(root->d_sb); + +out: + return root; @@ -29137,7 +29214,7 @@ index 000000000000..56313e7599e6 +}; diff --git a/fs/aufs/super.h b/fs/aufs/super.h new file mode 100644 -index 000000000000..e6da60317264 +index 000000000000..d23de85ea1a4 --- /dev/null +++ b/fs/aufs/super.h @@ -0,0 +1,626 @@ @@ -29347,7 +29424,7 @@ index 000000000000..e6da60317264 +/* + * set true when refresh_dirs() failed at remount time. + * then try refreshing dirs at access time again. -+ * if it is false, refreshing dirs at access time is unnecesary ++ * if it is false, refreshing dirs at access time is unnecessary + */ +#define AuSi_FAILED_REFRESH_DIR 1 +#define AuSi_FHSM (1 << 1) /* fhsm is active now */ @@ -29488,7 +29565,7 @@ index 000000000000..e6da60317264 +void au_export_init(struct super_block *sb); +void au_xigen_inc(struct inode *inode); +int au_xigen_new(struct inode *inode); -+int au_xigen_set(struct super_block *sb, struct file *base); ++int au_xigen_set(struct super_block *sb, struct path *path); +void au_xigen_clr(struct super_block *sb); + +static inline int au_busy_or_stale(void) @@ -29502,7 +29579,7 @@ index 000000000000..e6da60317264 +AuStubVoid(au_export_init, struct super_block *sb) +AuStubVoid(au_xigen_inc, struct inode *inode) +AuStubInt0(au_xigen_new, struct inode *inode) -+AuStubInt0(au_xigen_set, struct super_block *sb, struct file *base) ++AuStubInt0(au_xigen_set, struct super_block *sb, struct path *path) +AuStubVoid(au_xigen_clr, struct super_block *sb) +AuStub(int, au_busy_or_stale, return -EBUSY, void) +#endif /* CONFIG_AUFS_EXPORT */ @@ -29769,10 +29846,10 @@ index 000000000000..e6da60317264 +#endif /* __AUFS_SUPER_H__ */ diff --git a/fs/aufs/sysaufs.c b/fs/aufs/sysaufs.c new file mode 100644 -index 000000000000..d87a20d4de55 +index 000000000000..798645bac624 --- /dev/null +++ b/fs/aufs/sysaufs.c -@@ -0,0 +1,104 @@ +@@ -0,0 +1,92 @@ +/* + * Copyright (C) 2005-2018 Junjiro R. Okajima + * @@ -29834,18 +29911,11 @@ index 000000000000..d87a20d4de55 + (&sbinfo->si_kobj, &au_sbi_ktype, /*&sysaufs_kset->kobj*/NULL, + SysaufsSiNamePrefix "%lx", sysaufs_si_id(sbinfo)); + -+ dbgaufs_si_null(sbinfo); -+ if (!err) { -+ err = dbgaufs_si_init(sbinfo); -+ if (unlikely(err)) -+ kobject_put(&sbinfo->si_kobj); -+ } + return err; +} + +void sysaufs_fin(void) +{ -+ dbgaufs_fin(); + sysfs_remove_group(&sysaufs_kset->kobj, sysaufs_attr_group); + kset_unregister(sysaufs_kset); +} @@ -29866,14 +29936,9 @@ index 000000000000..d87a20d4de55 + if (IS_ERR(sysaufs_kset)) + goto out; + err = sysfs_create_group(&sysaufs_kset->kobj, sysaufs_attr_group); -+ if (unlikely(err)) { -+ kset_unregister(sysaufs_kset); -+ goto out; -+ } -+ -+ err = dbgaufs_init(); + if (unlikely(err)) -+ sysaufs_fin(); ++ kset_unregister(sysaufs_kset); ++ +out: + return err; +} @@ -29986,10 +30051,10 @@ index 000000000000..50aca1dc8318 +#endif /* __SYSAUFS_H__ */ diff --git a/fs/aufs/sysfs.c b/fs/aufs/sysfs.c new file mode 100644 -index 000000000000..58e1486021da +index 000000000000..0fef3a3cc4d2 --- /dev/null +++ b/fs/aufs/sysfs.c -@@ -0,0 +1,376 @@ +@@ -0,0 +1,372 @@ +/* + * Copyright (C) 2005-2018 Junjiro R. Okajima + * @@ -30318,8 +30383,6 @@ index 000000000000..58e1486021da + int i; + aufs_bindex_t bbot; + -+ dbgaufs_brs_del(sb, bindex); -+ + if (!sysaufs_brs) + return; + @@ -30343,8 +30406,6 @@ index 000000000000..58e1486021da + struct au_branch *br; + struct au_brsysfs *br_sysfs; + -+ dbgaufs_brs_add(sb, bindex); -+ + if (!sysaufs_brs) + return; + @@ -35542,10 +35603,10 @@ index 000000000000..792317c7f364 +} diff --git a/fs/aufs/xino.c b/fs/aufs/xino.c new file mode 100644 -index 000000000000..29f53f9e5968 +index 000000000000..08b7aa9da1f6 --- /dev/null +++ b/fs/aufs/xino.c -@@ -0,0 +1,1469 @@ +@@ -0,0 +1,1598 @@ +/* + * Copyright (C) 2005-2018 Junjiro R. Okajima + * @@ -35565,12 +35626,531 @@ index 000000000000..29f53f9e5968 + +/* + * external inode number translation table and bitmap ++ * ++ * things to consider ++ * - the lifetime ++ * + au_xino object ++ * + XINO files (xino, xib, xigen) ++ * + dynamic debugfs entries (xiN) ++ * + static debugfs entries (xib, xigen) ++ * + static sysfs entry (xi_path) ++ * - several entry points to handle them. ++ * + mount(2) without xino option (default) ++ * + mount(2) with xino option ++ * + mount(2) with noxino option ++ * + umount(2) ++ * + remount with add/del branches ++ * + remount with xino/noxino options + */ + +#include +#include +#include "aufs.h" + ++static aufs_bindex_t sbr_find_shared(struct super_block *sb, aufs_bindex_t btop, ++ aufs_bindex_t bbot, ++ struct super_block *h_sb) ++{ ++ /* todo: try binary-search if the branches are many */ ++ for (; btop <= bbot; btop++) ++ if (h_sb == au_sbr_sb(sb, btop)) ++ return btop; ++ return -1; ++} ++ ++/* ++ * find another branch who is on the same filesystem of the specified ++ * branch{@btgt}. search until @bbot. ++ */ ++static aufs_bindex_t is_sb_shared(struct super_block *sb, aufs_bindex_t btgt, ++ aufs_bindex_t bbot) ++{ ++ aufs_bindex_t bindex; ++ struct super_block *tgt_sb; ++ ++ tgt_sb = au_sbr_sb(sb, btgt); ++ bindex = sbr_find_shared(sb, /*btop*/0, btgt - 1, tgt_sb); ++ if (bindex < 0) ++ bindex = sbr_find_shared(sb, btgt + 1, bbot, tgt_sb); ++ ++ return bindex; ++} ++ ++/* ---------------------------------------------------------------------- */ ++ ++/* ++ * stop unnecessary notify events at creating xino files ++ */ ++struct au_xino_lock_dir { ++ struct au_hinode *hdir; ++ struct dentry *parent; ++ struct inode *dir; ++}; ++ ++static struct dentry *au_dget_parent_lock(struct dentry *dentry, ++ unsigned int lsc) ++{ ++ struct dentry *parent; ++ struct inode *dir; ++ ++ parent = dget_parent(dentry); ++ dir = d_inode(parent); ++ inode_lock_nested(dir, lsc); ++#if 0 /* it should not happen */ ++ spin_lock(&dentry->d_lock); ++ if (unlikely(dentry->d_parent != parent)) { ++ spin_unlock(&dentry->d_lock); ++ inode_unlock(dir); ++ dput(parent); ++ parent = NULL; ++ goto out; ++ } ++ spin_unlock(&dentry->d_lock); ++ ++out: ++#endif ++ return parent; ++} ++ ++static void au_xino_lock_dir(struct super_block *sb, struct path *xipath, ++ struct au_xino_lock_dir *ldir) ++{ ++ aufs_bindex_t brid, bindex; ++ ++ ldir->hdir = NULL; ++ bindex = -1; ++ brid = au_xino_brid(sb); ++ if (brid >= 0) ++ bindex = au_br_index(sb, brid); ++ if (bindex >= 0) { ++ /* rw branch root */ ++ ldir->hdir = au_hi(d_inode(sb->s_root), bindex); ++ au_hn_inode_lock_nested(ldir->hdir, AuLsc_I_PARENT); ++ } else { ++ /* other */ ++ ldir->parent = au_dget_parent_lock(xipath->dentry, ++ AuLsc_I_PARENT); ++ ldir->dir = d_inode(ldir->parent); ++ } ++} ++ ++static void au_xino_unlock_dir(struct au_xino_lock_dir *ldir) ++{ ++ if (ldir->hdir) ++ au_hn_inode_unlock(ldir->hdir); ++ else { ++ inode_unlock(ldir->dir); ++ dput(ldir->parent); ++ } ++} ++ ++/* ---------------------------------------------------------------------- */ ++ ++/* ++ * create and set a new xino file ++ */ ++struct file *au_xino_create(struct super_block *sb, char *fpath, int silent) ++{ ++ struct file *file; ++ struct dentry *h_parent, *d; ++ struct inode *h_dir, *inode; ++ int err; ++ ++ /* ++ * at mount-time, and the xino file is the default path, ++ * hnotify is disabled so we have no notify events to ignore. ++ * when a user specified the xino, we cannot get au_hdir to be ignored. ++ */ ++ file = vfsub_filp_open(fpath, O_RDWR | O_CREAT | O_EXCL | O_LARGEFILE ++ /* | __FMODE_NONOTIFY */, ++ S_IRUGO | S_IWUGO); ++ if (IS_ERR(file)) { ++ if (!silent) ++ pr_err("open %s(%ld)\n", fpath, PTR_ERR(file)); ++ return file; ++ } ++ ++ /* keep file count */ ++ err = 0; ++ d = file->f_path.dentry; ++ h_parent = au_dget_parent_lock(d, AuLsc_I_PARENT); ++ /* mnt_want_write() is unnecessary here */ ++ h_dir = d_inode(h_parent); ++ inode = file_inode(file); ++ /* no delegation since it is just created */ ++ if (inode->i_nlink) ++ err = vfsub_unlink(h_dir, &file->f_path, /*delegated*/NULL, ++ /*force*/0); ++ inode_unlock(h_dir); ++ dput(h_parent); ++ if (unlikely(err)) { ++ if (!silent) ++ pr_err("unlink %s(%d)\n", fpath, err); ++ goto out; ++ } ++ ++ err = -EINVAL; ++ if (unlikely(sb == d->d_sb)) { ++ if (!silent) ++ pr_err("%s must be outside\n", fpath); ++ goto out; ++ } ++ if (unlikely(au_test_fs_bad_xino(d->d_sb))) { ++ if (!silent) ++ pr_err("xino doesn't support %s(%s)\n", ++ fpath, au_sbtype(d->d_sb)); ++ goto out; ++ } ++ return file; /* success */ ++ ++out: ++ fput(file); ++ file = ERR_PTR(err); ++ return file; ++} ++ ++/* ++ * create a new xinofile at the same place/path as @base. ++ */ ++struct file *au_xino_create2(struct super_block *sb, struct path *base, ++ struct file *copy_src) ++{ ++ struct file *file; ++ struct dentry *dentry, *parent; ++ struct inode *dir, *delegated; ++ struct qstr *name; ++ struct path path; ++ int err, do_unlock; ++ struct au_xino_lock_dir ldir; ++ ++ do_unlock = 1; ++ au_xino_lock_dir(sb, base, &ldir); ++ dentry = base->dentry; ++ parent = dentry->d_parent; /* dir inode is locked */ ++ dir = d_inode(parent); ++ IMustLock(dir); ++ ++ name = &dentry->d_name; ++ path.dentry = vfsub_lookup_one_len(name->name, parent, name->len); ++ if (IS_ERR(path.dentry)) { ++ file = (void *)path.dentry; ++ pr_err("%pd lookup err %ld\n", dentry, PTR_ERR(path.dentry)); ++ goto out; ++ } ++ ++ /* no need to mnt_want_write() since we call dentry_open() later */ ++ err = vfs_create(dir, path.dentry, S_IRUGO | S_IWUGO, NULL); ++ if (unlikely(err)) { ++ file = ERR_PTR(err); ++ pr_err("%pd create err %d\n", dentry, err); ++ goto out_dput; ++ } ++ ++ path.mnt = base->mnt; ++ file = vfsub_dentry_open(&path, ++ O_RDWR | O_CREAT | O_EXCL | O_LARGEFILE ++ /* | __FMODE_NONOTIFY */); ++ if (IS_ERR(file)) { ++ pr_err("%pd open err %ld\n", dentry, PTR_ERR(file)); ++ goto out_dput; ++ } ++ ++ delegated = NULL; ++ err = vfsub_unlink(dir, &file->f_path, &delegated, /*force*/0); ++ au_xino_unlock_dir(&ldir); ++ do_unlock = 0; ++ if (unlikely(err == -EWOULDBLOCK)) { ++ pr_warn("cannot retry for NFSv4 delegation" ++ " for an internal unlink\n"); ++ iput(delegated); ++ } ++ if (unlikely(err)) { ++ pr_err("%pd unlink err %d\n", dentry, err); ++ goto out_fput; ++ } ++ ++ if (copy_src) { ++ /* no one can touch copy_src xino */ ++ err = au_copy_file(file, copy_src, vfsub_f_size_read(copy_src)); ++ if (unlikely(err)) { ++ pr_err("%pd copy err %d\n", dentry, err); ++ goto out_fput; ++ } ++ } ++ goto out_dput; /* success */ ++ ++out_fput: ++ fput(file); ++ file = ERR_PTR(err); ++out_dput: ++ dput(path.dentry); ++out: ++ if (do_unlock) ++ au_xino_unlock_dir(&ldir); ++ return file; ++} ++ ++/* ---------------------------------------------------------------------- */ ++ ++/* ++ * truncate xino files ++ */ ++int au_xino_trunc(struct super_block *sb, aufs_bindex_t bindex) ++{ ++ int err; ++ unsigned long jiffy; ++ blkcnt_t blocks; ++ aufs_bindex_t bbot; ++ struct kstatfs *st; ++ struct au_branch *br; ++ struct file *new_xino, *file; ++ struct path *path; ++ ++ err = -ENOMEM; ++ st = kmalloc(sizeof(*st), GFP_NOFS); ++ if (unlikely(!st)) ++ goto out; ++ ++ err = -EINVAL; ++ bbot = au_sbbot(sb); ++ if (unlikely(bindex < 0 || bbot < bindex)) ++ goto out_st; ++ br = au_sbr(sb, bindex); ++ file = au_xino_file(br); ++ if (!file) ++ goto out_st; ++ ++ path = &file->f_path; ++ err = vfs_statfs(path, st); ++ if (unlikely(err)) ++ AuErr1("statfs err %d, ignored\n", err); ++ jiffy = jiffies; ++ blocks = file_inode(file)->i_blocks; ++ pr_info("begin truncating xino(b%d), ib%llu, %llu/%llu free blks\n", ++ bindex, (u64)blocks, st->f_bfree, st->f_blocks); ++ ++ new_xino = au_xino_create2(sb, path, file); ++ err = PTR_ERR(new_xino); ++ if (IS_ERR(new_xino)) { ++ pr_err("err %d, ignored\n", err); ++ goto out_st; ++ } ++ err = 0; ++ au_xino_file_set(br, new_xino); ++ ++ err = vfs_statfs(&new_xino->f_path, st); ++ if (!err) { ++ pr_info("end truncating xino(b%d), ib%llu, %llu/%llu free blks\n", ++ bindex, (u64)file_inode(new_xino)->i_blocks, ++ st->f_bfree, st->f_blocks); ++ if (file_inode(new_xino)->i_blocks < blocks) ++ au_sbi(sb)->si_xino_jiffy = jiffy; ++ } else ++ AuErr1("statfs err %d, ignored\n", err); ++ fput(new_xino); ++ ++out_st: ++ kfree(st); ++out: ++ return err; ++} ++ ++struct xino_do_trunc_args { ++ struct super_block *sb; ++ struct au_branch *br; ++}; ++ ++static void xino_do_trunc(void *_args) ++{ ++ struct xino_do_trunc_args *args = _args; ++ struct super_block *sb; ++ struct au_branch *br; ++ struct inode *dir; ++ int err; ++ aufs_bindex_t bindex; ++ ++ err = 0; ++ sb = args->sb; ++ dir = d_inode(sb->s_root); ++ br = args->br; ++ ++ si_noflush_write_lock(sb); ++ ii_read_lock_parent(dir); ++ bindex = au_br_index(sb, br->br_id); ++ err = au_xino_trunc(sb, bindex); ++ ii_read_unlock(dir); ++ if (unlikely(err)) ++ pr_warn("err b%d, (%d)\n", bindex, err); ++ atomic_dec(&br->br_xino->xi_truncating); ++ au_br_put(br); ++ si_write_unlock(sb); ++ au_nwt_done(&au_sbi(sb)->si_nowait); ++ kfree(args); ++} ++ ++static int xino_trunc_test(struct super_block *sb, struct au_branch *br) ++{ ++ int err; ++ struct kstatfs st; ++ struct au_sbinfo *sbinfo; ++ struct file *file; ++ ++ /* todo: si_xino_expire and the ratio should be customizable */ ++ sbinfo = au_sbi(sb); ++ if (time_before(jiffies, ++ sbinfo->si_xino_jiffy + sbinfo->si_xino_expire)) ++ return 0; ++ ++ /* truncation border */ ++ file = au_xino_file(br); ++ AuDebugOn(!file); ++ err = vfs_statfs(&file->f_path, &st); ++ if (unlikely(err)) { ++ AuErr1("statfs err %d, ignored\n", err); ++ return 0; ++ } ++ if (div64_u64(st.f_bfree * 100, st.f_blocks) >= AUFS_XINO_DEF_TRUNC) ++ return 0; ++ ++ return 1; ++} ++ ++static void xino_try_trunc(struct super_block *sb, struct au_branch *br) ++{ ++ struct xino_do_trunc_args *args; ++ int wkq_err; ++ ++ if (!xino_trunc_test(sb, br)) ++ return; ++ ++ if (atomic_inc_return(&br->br_xino->xi_truncating) > 1) ++ goto out; ++ ++ /* lock and kfree() will be called in trunc_xino() */ ++ args = kmalloc(sizeof(*args), GFP_NOFS); ++ if (unlikely(!args)) { ++ AuErr1("no memory\n"); ++ goto out; ++ } ++ ++ au_br_get(br); ++ args->sb = sb; ++ args->br = br; ++ wkq_err = au_wkq_nowait(xino_do_trunc, args, sb, /*flags*/0); ++ if (!wkq_err) ++ return; /* success */ ++ ++ pr_err("wkq %d\n", wkq_err); ++ au_br_put(br); ++ kfree(args); ++ ++out: ++ atomic_dec(&br->br_xino->xi_truncating); ++} ++ ++/* ---------------------------------------------------------------------- */ ++ ++/* ++ * read @ino from xinofile for the specified branch{@sb, @bindex} ++ * at the position of @h_ino. ++ */ ++int au_xino_read(struct super_block *sb, aufs_bindex_t bindex, ino_t h_ino, ++ ino_t *ino) ++{ ++ int err; ++ ssize_t sz; ++ loff_t pos; ++ struct au_branch *br; ++ struct file *file; ++ struct au_sbinfo *sbinfo; ++ ++ *ino = 0; ++ if (!au_opt_test(au_mntflags(sb), XINO)) ++ return 0; /* no xino */ ++ ++ err = 0; ++ sbinfo = au_sbi(sb); ++ pos = h_ino; ++ if (unlikely(au_loff_max / sizeof(*ino) - 1 < pos)) { ++ AuIOErr1("too large hi%lu\n", (unsigned long)h_ino); ++ return -EFBIG; ++ } ++ pos *= sizeof(*ino); ++ ++ br = au_sbr(sb, bindex); ++ file = au_xino_file(br); ++ if (vfsub_f_size_read(file) < pos + sizeof(*ino)) ++ return 0; /* no ino */ ++ ++ sz = xino_fread(sbinfo->si_xread, file, ino, sizeof(*ino), &pos); ++ if (sz == sizeof(*ino)) ++ return 0; /* success */ ++ ++ err = sz; ++ if (unlikely(sz >= 0)) { ++ err = -EIO; ++ AuIOErr("xino read error (%zd)\n", sz); ++ } ++ ++ return err; ++} ++ ++static int au_xino_do_write(vfs_writef_t write, struct file *file, ++ ino_t h_ino, ino_t ino) ++{ ++ loff_t pos; ++ ssize_t sz; ++ ++ pos = h_ino; ++ if (unlikely(au_loff_max / sizeof(ino) - 1 < pos)) { ++ AuIOErr1("too large hi%lu\n", (unsigned long)h_ino); ++ return -EFBIG; ++ } ++ pos *= sizeof(ino); ++ sz = xino_fwrite(write, file, &ino, sizeof(ino), &pos); ++ if (sz == sizeof(ino)) ++ return 0; /* success */ ++ ++ AuIOErr("write failed (%zd)\n", sz); ++ return -EIO; ++} ++ ++/* ++ * write @ino to the xinofile for the specified branch{@sb, @bindex} ++ * at the position of @h_ino. ++ * even if @ino is zero, it is written to the xinofile and means no entry. ++ * if the size of the xino file on a specific filesystem exceeds the watermark, ++ * try truncating it. ++ */ ++int au_xino_write(struct super_block *sb, aufs_bindex_t bindex, ino_t h_ino, ++ ino_t ino) ++{ ++ int err; ++ unsigned int mnt_flags; ++ struct au_branch *br; ++ ++ BUILD_BUG_ON(sizeof(long long) != sizeof(au_loff_max) ++ || ((loff_t)-1) > 0); ++ SiMustAnyLock(sb); ++ ++ mnt_flags = au_mntflags(sb); ++ if (!au_opt_test(mnt_flags, XINO)) ++ return 0; ++ ++ br = au_sbr(sb, bindex); ++ err = au_xino_do_write(au_sbi(sb)->si_xwrite, au_xino_file(br), h_ino, ++ ino); ++ if (!err) { ++ if (au_opt_test(mnt_flags, TRUNC_XINO) ++ && au_test_fs_trunc_xino(au_br_sb(br))) ++ xino_try_trunc(sb, br); ++ return 0; /* success */ ++ } ++ ++ AuIOErr("write failed (%d)\n", err); ++ return -EIO; ++} ++ +static ssize_t xino_fread_wkq(vfs_readf_t func, struct file *file, void *buf, + size_t size, loff_t *pos); + @@ -35630,7 +36210,7 @@ index 000000000000..29f53f9e5968 +} + +static ssize_t xino_fread_wkq(vfs_readf_t func, struct file *file, void *buf, -+ size_t size, loff_t *pos) ++ size_t size, loff_t *pos) +{ + ssize_t err; + int wkq_err; @@ -35650,8 +36230,6 @@ index 000000000000..29f53f9e5968 + return err; +} + -+/* ---------------------------------------------------------------------- */ -+ +static ssize_t xino_fwrite_wkq(vfs_writef_t func, struct file *file, void *buf, + size_t size, loff_t *pos); + @@ -35755,348 +36333,8 @@ index 000000000000..29f53f9e5968 +/* ---------------------------------------------------------------------- */ + +/* -+ * create a new xinofile at the same place/path as @base_file. ++ * inode number bitmap + */ -+struct file *au_xino_create2(struct file *base_file, struct file *copy_src) -+{ -+ struct file *file; -+ struct dentry *base, *parent; -+ struct inode *dir, *delegated; -+ struct qstr *name; -+ struct path path; -+ int err; -+ -+ base = base_file->f_path.dentry; -+ parent = base->d_parent; /* dir inode is locked */ -+ dir = d_inode(parent); -+ IMustLock(dir); -+ -+ file = ERR_PTR(-EINVAL); -+ name = &base->d_name; -+ path.dentry = vfsub_lookup_one_len(name->name, parent, name->len); -+ if (IS_ERR(path.dentry)) { -+ file = (void *)path.dentry; -+ pr_err("%pd lookup err %ld\n", -+ base, PTR_ERR(path.dentry)); -+ goto out; -+ } -+ -+ /* no need to mnt_want_write() since we call dentry_open() later */ -+ err = vfs_create(dir, path.dentry, S_IRUGO | S_IWUGO, NULL); -+ if (unlikely(err)) { -+ file = ERR_PTR(err); -+ pr_err("%pd create err %d\n", base, err); -+ goto out_dput; -+ } -+ -+ path.mnt = base_file->f_path.mnt; -+ file = vfsub_dentry_open(&path, -+ O_RDWR | O_CREAT | O_EXCL | O_LARGEFILE -+ /* | __FMODE_NONOTIFY */); -+ if (IS_ERR(file)) { -+ pr_err("%pd open err %ld\n", base, PTR_ERR(file)); -+ goto out_dput; -+ } -+ -+ delegated = NULL; -+ err = vfsub_unlink(dir, &file->f_path, &delegated, /*force*/0); -+ if (unlikely(err == -EWOULDBLOCK)) { -+ pr_warn("cannot retry for NFSv4 delegation" -+ " for an internal unlink\n"); -+ iput(delegated); -+ } -+ if (unlikely(err)) { -+ pr_err("%pd unlink err %d\n", base, err); -+ goto out_fput; -+ } -+ -+ if (copy_src) { -+ /* no one can touch copy_src xino */ -+ err = au_copy_file(file, copy_src, vfsub_f_size_read(copy_src)); -+ if (unlikely(err)) { -+ pr_err("%pd copy err %d\n", base, err); -+ goto out_fput; -+ } -+ } -+ goto out_dput; /* success */ -+ -+out_fput: -+ fput(file); -+ file = ERR_PTR(err); -+out_dput: -+ dput(path.dentry); -+out: -+ return file; -+} -+ -+struct au_xino_lock_dir { -+ struct au_hinode *hdir; -+ struct dentry *parent; -+ struct inode *dir; -+}; -+ -+static void au_xino_lock_dir(struct super_block *sb, struct file *xino, -+ struct au_xino_lock_dir *ldir) -+{ -+ aufs_bindex_t brid, bindex; -+ -+ ldir->hdir = NULL; -+ bindex = -1; -+ brid = au_xino_brid(sb); -+ if (brid >= 0) -+ bindex = au_br_index(sb, brid); -+ if (bindex >= 0) { -+ ldir->hdir = au_hi(d_inode(sb->s_root), bindex); -+ au_hn_inode_lock_nested(ldir->hdir, AuLsc_I_PARENT); -+ } else { -+ ldir->parent = dget_parent(xino->f_path.dentry); -+ ldir->dir = d_inode(ldir->parent); -+ inode_lock_nested(ldir->dir, AuLsc_I_PARENT); -+ } -+} -+ -+static void au_xino_unlock_dir(struct au_xino_lock_dir *ldir) -+{ -+ if (ldir->hdir) -+ au_hn_inode_unlock(ldir->hdir); -+ else { -+ inode_unlock(ldir->dir); -+ dput(ldir->parent); -+ } -+} -+ -+/* ---------------------------------------------------------------------- */ -+ -+/* trucate xino files asynchronously */ -+ -+int au_xino_trunc(struct super_block *sb, aufs_bindex_t bindex) -+{ -+ int err; -+ unsigned long jiffy; -+ blkcnt_t blocks; -+ aufs_bindex_t bi, bbot; -+ struct kstatfs *st; -+ struct au_branch *br; -+ struct file *new_xino, *file; -+ struct super_block *h_sb; -+ struct au_xino_lock_dir ldir; -+ -+ err = -ENOMEM; -+ st = kmalloc(sizeof(*st), GFP_NOFS); -+ if (unlikely(!st)) -+ goto out; -+ -+ err = -EINVAL; -+ bbot = au_sbbot(sb); -+ if (unlikely(bindex < 0 || bbot < bindex)) -+ goto out_st; -+ br = au_sbr(sb, bindex); -+ file = br->br_xino.xi_file; -+ if (!file) -+ goto out_st; -+ -+ err = vfs_statfs(&file->f_path, st); -+ if (unlikely(err)) -+ AuErr1("statfs err %d, ignored\n", err); -+ jiffy = jiffies; -+ blocks = file_inode(file)->i_blocks; -+ pr_info("begin truncating xino(b%d), ib%llu, %llu/%llu free blks\n", -+ bindex, (u64)blocks, st->f_bfree, st->f_blocks); -+ -+ au_xino_lock_dir(sb, file, &ldir); -+ /* mnt_want_write() is unnecessary here */ -+ new_xino = au_xino_create2(file, file); -+ au_xino_unlock_dir(&ldir); -+ err = PTR_ERR(new_xino); -+ if (IS_ERR(new_xino)) { -+ pr_err("err %d, ignored\n", err); -+ goto out_st; -+ } -+ err = 0; -+ fput(file); -+ br->br_xino.xi_file = new_xino; -+ -+ h_sb = au_br_sb(br); -+ for (bi = 0; bi <= bbot; bi++) { -+ if (unlikely(bi == bindex)) -+ continue; -+ br = au_sbr(sb, bi); -+ if (au_br_sb(br) != h_sb) -+ continue; -+ -+ fput(br->br_xino.xi_file); -+ br->br_xino.xi_file = new_xino; -+ get_file(new_xino); -+ } -+ -+ err = vfs_statfs(&new_xino->f_path, st); -+ if (!err) { -+ pr_info("end truncating xino(b%d), ib%llu, %llu/%llu free blks\n", -+ bindex, (u64)file_inode(new_xino)->i_blocks, -+ st->f_bfree, st->f_blocks); -+ if (file_inode(new_xino)->i_blocks < blocks) -+ au_sbi(sb)->si_xino_jiffy = jiffy; -+ } else -+ AuErr1("statfs err %d, ignored\n", err); -+ -+out_st: -+ kfree(st); -+out: -+ return err; -+} -+ -+struct xino_do_trunc_args { -+ struct super_block *sb; -+ struct au_branch *br; -+}; -+ -+static void xino_do_trunc(void *_args) -+{ -+ struct xino_do_trunc_args *args = _args; -+ struct super_block *sb; -+ struct au_branch *br; -+ struct inode *dir; -+ int err; -+ aufs_bindex_t bindex; -+ -+ err = 0; -+ sb = args->sb; -+ dir = d_inode(sb->s_root); -+ br = args->br; -+ -+ si_noflush_write_lock(sb); -+ ii_read_lock_parent(dir); -+ bindex = au_br_index(sb, br->br_id); -+ err = au_xino_trunc(sb, bindex); -+ ii_read_unlock(dir); -+ if (unlikely(err)) -+ pr_warn("err b%d, (%d)\n", bindex, err); -+ atomic_dec(&br->br_xino_running); -+ au_br_put(br); -+ si_write_unlock(sb); -+ au_nwt_done(&au_sbi(sb)->si_nowait); -+ kfree(args); -+} -+ -+static int xino_trunc_test(struct super_block *sb, struct au_branch *br) -+{ -+ int err; -+ struct kstatfs st; -+ struct au_sbinfo *sbinfo; -+ -+ /* todo: si_xino_expire and the ratio should be customizable */ -+ sbinfo = au_sbi(sb); -+ if (time_before(jiffies, -+ sbinfo->si_xino_jiffy + sbinfo->si_xino_expire)) -+ return 0; -+ -+ /* truncation border */ -+ err = vfs_statfs(&br->br_xino.xi_file->f_path, &st); -+ if (unlikely(err)) { -+ AuErr1("statfs err %d, ignored\n", err); -+ return 0; -+ } -+ if (div64_u64(st.f_bfree * 100, st.f_blocks) >= AUFS_XINO_DEF_TRUNC) -+ return 0; -+ -+ return 1; -+} -+ -+static void xino_try_trunc(struct super_block *sb, struct au_branch *br) -+{ -+ struct xino_do_trunc_args *args; -+ int wkq_err; -+ -+ if (!xino_trunc_test(sb, br)) -+ return; -+ -+ if (atomic_inc_return(&br->br_xino_running) > 1) -+ goto out; -+ -+ /* lock and kfree() will be called in trunc_xino() */ -+ args = kmalloc(sizeof(*args), GFP_NOFS); -+ if (unlikely(!args)) { -+ AuErr1("no memory\n"); -+ goto out; -+ } -+ -+ au_br_get(br); -+ args->sb = sb; -+ args->br = br; -+ wkq_err = au_wkq_nowait(xino_do_trunc, args, sb, /*flags*/0); -+ if (!wkq_err) -+ return; /* success */ -+ -+ pr_err("wkq %d\n", wkq_err); -+ au_br_put(br); -+ kfree(args); -+ -+out: -+ atomic_dec(&br->br_xino_running); -+} -+ -+/* ---------------------------------------------------------------------- */ -+ -+static int au_xino_do_write(vfs_writef_t write, struct file *file, -+ ino_t h_ino, ino_t ino) -+{ -+ loff_t pos; -+ ssize_t sz; -+ -+ pos = h_ino; -+ if (unlikely(au_loff_max / sizeof(ino) - 1 < pos)) { -+ AuIOErr1("too large hi%lu\n", (unsigned long)h_ino); -+ return -EFBIG; -+ } -+ pos *= sizeof(ino); -+ sz = xino_fwrite(write, file, &ino, sizeof(ino), &pos); -+ if (sz == sizeof(ino)) -+ return 0; /* success */ -+ -+ AuIOErr("write failed (%zd)\n", sz); -+ return -EIO; -+} -+ -+/* -+ * write @ino to the xinofile for the specified branch{@sb, @bindex} -+ * at the position of @h_ino. -+ * even if @ino is zero, it is written to the xinofile and means no entry. -+ * if the size of the xino file on a specific filesystem exceeds the watermark, -+ * try truncating it. -+ */ -+int au_xino_write(struct super_block *sb, aufs_bindex_t bindex, ino_t h_ino, -+ ino_t ino) -+{ -+ int err; -+ unsigned int mnt_flags; -+ struct au_branch *br; -+ -+ BUILD_BUG_ON(sizeof(long long) != sizeof(au_loff_max) -+ || ((loff_t)-1) > 0); -+ SiMustAnyLock(sb); -+ -+ mnt_flags = au_mntflags(sb); -+ if (!au_opt_test(mnt_flags, XINO)) -+ return 0; -+ -+ br = au_sbr(sb, bindex); -+ err = au_xino_do_write(au_sbi(sb)->si_xwrite, br->br_xino.xi_file, -+ h_ino, ino); -+ if (!err) { -+ if (au_opt_test(mnt_flags, TRUNC_XINO) -+ && au_test_fs_trunc_xino(au_br_sb(br))) -+ xino_try_trunc(sb, br); -+ return 0; /* success */ -+ } -+ -+ AuIOErr("write failed (%d)\n", err); -+ return -EIO; -+} -+ -+/* ---------------------------------------------------------------------- */ -+ -+/* aufs inode number bitmap */ -+ +static const int page_bits = (int)PAGE_SIZE * BITS_PER_BYTE; +static ino_t xib_calc_ino(unsigned long pindex, int bit) +{ @@ -36161,8 +36399,6 @@ index 000000000000..29f53f9e5968 + return err; +} + -+/* ---------------------------------------------------------------------- */ -+ +static void au_xib_clear_bit(struct inode *inode) +{ + int err, bit; @@ -36185,310 +36421,11 @@ index 000000000000..29f53f9e5968 + mutex_unlock(&sbinfo->si_xib_mtx); +} + -+/* for s_op->delete_inode() */ -+void au_xino_delete_inode(struct inode *inode, const int unlinked) -+{ -+ int err; -+ unsigned int mnt_flags; -+ aufs_bindex_t bindex, bbot, bi; -+ unsigned char try_trunc; -+ struct au_iinfo *iinfo; -+ struct super_block *sb; -+ struct au_hinode *hi; -+ struct inode *h_inode; -+ struct au_branch *br; -+ vfs_writef_t xwrite; -+ -+ AuDebugOn(au_is_bad_inode(inode)); -+ -+ sb = inode->i_sb; -+ mnt_flags = au_mntflags(sb); -+ if (!au_opt_test(mnt_flags, XINO) -+ || inode->i_ino == AUFS_ROOT_INO) -+ return; -+ -+ if (unlinked) { -+ au_xigen_inc(inode); -+ au_xib_clear_bit(inode); -+ } -+ -+ iinfo = au_ii(inode); -+ bindex = iinfo->ii_btop; -+ if (bindex < 0) -+ return; -+ -+ xwrite = au_sbi(sb)->si_xwrite; -+ try_trunc = !!au_opt_test(mnt_flags, TRUNC_XINO); -+ hi = au_hinode(iinfo, bindex); -+ bbot = iinfo->ii_bbot; -+ for (; bindex <= bbot; bindex++, hi++) { -+ h_inode = hi->hi_inode; -+ if (!h_inode -+ || (!unlinked && h_inode->i_nlink)) -+ continue; -+ -+ /* inode may not be revalidated */ -+ bi = au_br_index(sb, hi->hi_id); -+ if (bi < 0) -+ continue; -+ -+ br = au_sbr(sb, bi); -+ err = au_xino_do_write(xwrite, br->br_xino.xi_file, -+ h_inode->i_ino, /*ino*/0); -+ if (!err && try_trunc -+ && au_test_fs_trunc_xino(au_br_sb(br))) -+ xino_try_trunc(sb, br); -+ } -+} -+ -+/* get an unused inode number from bitmap */ -+ino_t au_xino_new_ino(struct super_block *sb) -+{ -+ ino_t ino; -+ unsigned long *p, pindex, ul, pend; -+ struct au_sbinfo *sbinfo; -+ struct file *file; -+ int free_bit, err; -+ -+ if (!au_opt_test(au_mntflags(sb), XINO)) -+ return iunique(sb, AUFS_FIRST_INO); -+ -+ sbinfo = au_sbi(sb); -+ mutex_lock(&sbinfo->si_xib_mtx); -+ p = sbinfo->si_xib_buf; -+ free_bit = sbinfo->si_xib_next_bit; -+ if (free_bit < page_bits && !test_bit(free_bit, p)) -+ goto out; /* success */ -+ free_bit = find_first_zero_bit(p, page_bits); -+ if (free_bit < page_bits) -+ goto out; /* success */ -+ -+ pindex = sbinfo->si_xib_last_pindex; -+ for (ul = pindex - 1; ul < ULONG_MAX; ul--) { -+ err = xib_pindex(sb, ul); -+ if (unlikely(err)) -+ goto out_err; -+ free_bit = find_first_zero_bit(p, page_bits); -+ if (free_bit < page_bits) -+ goto out; /* success */ -+ } -+ -+ file = sbinfo->si_xib; -+ pend = vfsub_f_size_read(file) / PAGE_SIZE; -+ for (ul = pindex + 1; ul <= pend; ul++) { -+ err = xib_pindex(sb, ul); -+ if (unlikely(err)) -+ goto out_err; -+ free_bit = find_first_zero_bit(p, page_bits); -+ if (free_bit < page_bits) -+ goto out; /* success */ -+ } -+ BUG(); -+ -+out: -+ set_bit(free_bit, p); -+ sbinfo->si_xib_next_bit = free_bit + 1; -+ pindex = sbinfo->si_xib_last_pindex; -+ mutex_unlock(&sbinfo->si_xib_mtx); -+ ino = xib_calc_ino(pindex, free_bit); -+ AuDbg("i%lu\n", (unsigned long)ino); -+ return ino; -+out_err: -+ mutex_unlock(&sbinfo->si_xib_mtx); -+ AuDbg("i0\n"); -+ return 0; -+} -+ -+/* -+ * read @ino from xinofile for the specified branch{@sb, @bindex} -+ * at the position of @h_ino. -+ * if @ino does not exist and @do_new is true, get new one. -+ */ -+int au_xino_read(struct super_block *sb, aufs_bindex_t bindex, ino_t h_ino, -+ ino_t *ino) -+{ -+ int err; -+ ssize_t sz; -+ loff_t pos; -+ struct file *file; -+ struct au_sbinfo *sbinfo; -+ -+ *ino = 0; -+ if (!au_opt_test(au_mntflags(sb), XINO)) -+ return 0; /* no xino */ -+ -+ err = 0; -+ sbinfo = au_sbi(sb); -+ pos = h_ino; -+ if (unlikely(au_loff_max / sizeof(*ino) - 1 < pos)) { -+ AuIOErr1("too large hi%lu\n", (unsigned long)h_ino); -+ return -EFBIG; -+ } -+ pos *= sizeof(*ino); -+ -+ file = au_sbr(sb, bindex)->br_xino.xi_file; -+ if (vfsub_f_size_read(file) < pos + sizeof(*ino)) -+ return 0; /* no ino */ -+ -+ sz = xino_fread(sbinfo->si_xread, file, ino, sizeof(*ino), &pos); -+ if (sz == sizeof(*ino)) -+ return 0; /* success */ -+ -+ err = sz; -+ if (unlikely(sz >= 0)) { -+ err = -EIO; -+ AuIOErr("xino read error (%zd)\n", sz); -+ } -+ -+ return err; -+} -+ -+/* ---------------------------------------------------------------------- */ -+ -+/* create and set a new xino file */ -+ -+struct file *au_xino_create(struct super_block *sb, char *fname, int silent) -+{ -+ struct file *file; -+ struct dentry *h_parent, *d; -+ struct inode *h_dir, *inode; -+ int err; -+ -+ /* -+ * at mount-time, and the xino file is the default path, -+ * hnotify is disabled so we have no notify events to ignore. -+ * when a user specified the xino, we cannot get au_hdir to be ignored. -+ */ -+ file = vfsub_filp_open(fname, O_RDWR | O_CREAT | O_EXCL | O_LARGEFILE -+ /* | __FMODE_NONOTIFY */, -+ S_IRUGO | S_IWUGO); -+ if (IS_ERR(file)) { -+ if (!silent) -+ pr_err("open %s(%ld)\n", fname, PTR_ERR(file)); -+ return file; -+ } -+ -+ /* keep file count */ -+ err = 0; -+ inode = file_inode(file); -+ h_parent = dget_parent(file->f_path.dentry); -+ h_dir = d_inode(h_parent); -+ inode_lock_nested(h_dir, AuLsc_I_PARENT); -+ /* mnt_want_write() is unnecessary here */ -+ /* no delegation since it is just created */ -+ if (inode->i_nlink) -+ err = vfsub_unlink(h_dir, &file->f_path, /*delegated*/NULL, -+ /*force*/0); -+ inode_unlock(h_dir); -+ dput(h_parent); -+ if (unlikely(err)) { -+ if (!silent) -+ pr_err("unlink %s(%d)\n", fname, err); -+ goto out; -+ } -+ -+ err = -EINVAL; -+ d = file->f_path.dentry; -+ if (unlikely(sb == d->d_sb)) { -+ if (!silent) -+ pr_err("%s must be outside\n", fname); -+ goto out; -+ } -+ if (unlikely(au_test_fs_bad_xino(d->d_sb))) { -+ if (!silent) -+ pr_err("xino doesn't support %s(%s)\n", -+ fname, au_sbtype(d->d_sb)); -+ goto out; -+ } -+ return file; /* success */ -+ -+out: -+ fput(file); -+ file = ERR_PTR(err); -+ return file; -+} -+ -+/* -+ * find another branch who is on the same filesystem of the specified -+ * branch{@btgt}. search until @bbot. -+ */ -+static int is_sb_shared(struct super_block *sb, aufs_bindex_t btgt, -+ aufs_bindex_t bbot) -+{ -+ aufs_bindex_t bindex; -+ struct super_block *tgt_sb = au_sbr_sb(sb, btgt); -+ -+ for (bindex = 0; bindex < btgt; bindex++) -+ if (unlikely(tgt_sb == au_sbr_sb(sb, bindex))) -+ return bindex; -+ for (bindex++; bindex <= bbot; bindex++) -+ if (unlikely(tgt_sb == au_sbr_sb(sb, bindex))) -+ return bindex; -+ return -1; -+} -+ +/* ---------------------------------------------------------------------- */ + +/* -+ * initialize the xinofile for the specified branch @br -+ * at the place/path where @base_file indicates. -+ * test whether another branch is on the same filesystem or not, -+ * if @do_test is true. ++ * truncate a xino bitmap file + */ -+int au_xino_br(struct super_block *sb, struct au_branch *br, ino_t h_ino, -+ struct file *base_file, int do_test) -+{ -+ int err; -+ ino_t ino; -+ aufs_bindex_t bbot, bindex; -+ struct au_branch *shared_br, *b; -+ struct file *file; -+ struct super_block *tgt_sb; -+ -+ shared_br = NULL; -+ bbot = au_sbbot(sb); -+ if (do_test) { -+ tgt_sb = au_br_sb(br); -+ for (bindex = 0; bindex <= bbot; bindex++) { -+ b = au_sbr(sb, bindex); -+ if (tgt_sb == au_br_sb(b)) { -+ shared_br = b; -+ break; -+ } -+ } -+ } -+ -+ if (!shared_br || !shared_br->br_xino.xi_file) { -+ struct au_xino_lock_dir ldir; -+ -+ au_xino_lock_dir(sb, base_file, &ldir); -+ /* mnt_want_write() is unnecessary here */ -+ file = au_xino_create2(base_file, NULL); -+ au_xino_unlock_dir(&ldir); -+ err = PTR_ERR(file); -+ if (IS_ERR(file)) -+ goto out; -+ br->br_xino.xi_file = file; -+ } else { -+ br->br_xino.xi_file = shared_br->br_xino.xi_file; -+ get_file(br->br_xino.xi_file); -+ } -+ -+ ino = AUFS_ROOT_INO; -+ err = au_xino_do_write(au_sbi(sb)->si_xwrite, br->br_xino.xi_file, -+ h_ino, ino); -+ if (unlikely(err)) { -+ fput(br->br_xino.xi_file); -+ br->br_xino.xi_file = NULL; -+ } -+ -+out: -+ return err; -+} -+ -+/* ---------------------------------------------------------------------- */ -+ -+/* trucate a xino bitmap file */ + +/* todo: slow */ +static int do_xib_restore(struct super_block *sb, struct file *file, void *page) @@ -36539,6 +36476,7 @@ index 000000000000..29f53f9e5968 + int err; + aufs_bindex_t bindex, bbot; + void *page; ++ struct au_branch *br; + + err = -ENOMEM; + page = (void *)__get_free_page(GFP_NOFS); @@ -36548,11 +36486,11 @@ index 000000000000..29f53f9e5968 + err = 0; + bbot = au_sbbot(sb); + for (bindex = 0; !err && bindex <= bbot; bindex++) -+ if (!bindex || is_sb_shared(sb, bindex, bindex - 1) < 0) -+ err = do_xib_restore -+ (sb, au_sbr(sb, bindex)->br_xino.xi_file, page); -+ else -+ AuDbg("b%d\n", bindex); ++ if (!bindex || is_sb_shared(sb, bindex, bindex - 1) < 0) { ++ br = au_sbr(sb, bindex); ++ err = do_xib_restore(sb, au_xino_file(br), page); ++ } else ++ AuDbg("skip shared b%d\n", bindex); + free_page((unsigned long)page); + +out: @@ -36564,7 +36502,6 @@ index 000000000000..29f53f9e5968 + int err; + ssize_t sz; + loff_t pos; -+ struct au_xino_lock_dir ldir; + struct au_sbinfo *sbinfo; + unsigned long *p; + struct file *file; @@ -36580,10 +36517,7 @@ index 000000000000..29f53f9e5968 + if (vfsub_f_size_read(file) <= PAGE_SIZE) + goto out; + -+ au_xino_lock_dir(sb, file, &ldir); -+ /* mnt_want_write() is unnecessary here */ -+ file = au_xino_create2(sbinfo->si_xib, NULL); -+ au_xino_unlock_dir(&ldir); ++ file = au_xino_create2(sb, &sbinfo->si_xib->f_path, NULL); + err = PTR_ERR(file); + if (IS_ERR(file)) + goto out; @@ -36613,6 +36547,100 @@ index 000000000000..29f53f9e5968 + +/* ---------------------------------------------------------------------- */ + ++struct au_xino *au_xino_alloc(void) ++{ ++ struct au_xino *xi; ++ ++ xi = kzalloc(sizeof(*xi), GFP_NOFS); ++ if (unlikely(!xi)) ++ goto out; ++ ++ xi->xi_nondir.total = 8; /* initial size */ ++ xi->xi_nondir.array = kcalloc(xi->xi_nondir.total, sizeof(ino_t), ++ GFP_NOFS); ++ if (unlikely(!xi->xi_nondir.array)) ++ goto out_free; ++ ++ spin_lock_init(&xi->xi_nondir.spin); ++ init_waitqueue_head(&xi->xi_nondir.wqh); ++ atomic_set(&xi->xi_truncating, 0); ++ kref_init(&xi->xi_kref); ++ goto out; /* success */ ++ ++out_free: ++ kfree(xi); ++ xi = NULL; ++out: ++ return xi; ++} ++ ++static int au_xino_init(struct au_branch *br, struct file *file) ++{ ++ int err; ++ struct au_xino *xi; ++ ++ err = 0; ++ xi = au_xino_alloc(); ++ if (unlikely(!xi)) { ++ err = -ENOMEM; ++ goto out; ++ } ++ ++ get_file(file); ++ xi->xi_file = file; ++ AuDebugOn(br->br_xino); ++ br->br_xino = xi; ++ ++out: ++ return err; ++} ++ ++static void au_xino_release(struct kref *kref) ++{ ++ struct au_xino *xi; ++ int i; ++ ++ xi = container_of(kref, struct au_xino, xi_kref); ++ if (xi->xi_file) ++ fput(xi->xi_file); ++ for (i = xi->xi_nondir.total - 1; i >= 0; i--) ++ AuDebugOn(xi->xi_nondir.array[i]); ++ kfree(xi->xi_nondir.array); ++ kfree(xi); ++} ++ ++int au_xino_put(struct au_branch *br) ++{ ++ int ret; ++ struct au_xino *xi; ++ ++ ret = 0; ++ xi = br->br_xino; ++ if (xi) { ++ br->br_xino = NULL; ++ ret = kref_put(&xi->xi_kref, au_xino_release); ++ } ++ ++ return ret; ++} ++ ++void au_xino_file_set(struct au_branch *br, struct file *file) ++{ ++ struct au_xino *xi; ++ struct file *f; ++ ++ if (file) ++ get_file(file); ++ xi = br->br_xino; ++ AuDebugOn(!xi); ++ f = xi->xi_file; ++ if (f) ++ fput(f); ++ xi->xi_file = file; ++} ++ ++/* ---------------------------------------------------------------------- */ ++ +/* + * xino mount option handlers + */ @@ -36625,8 +36653,7 @@ index 000000000000..29f53f9e5968 + SiMustWriteLock(sb); + + sbinfo = au_sbi(sb); -+ sbinfo->si_xread = NULL; -+ sbinfo->si_xwrite = NULL; ++ /* unnecessary to clear sbinfo->si_xread and ->si_xwrite */ + if (sbinfo->si_xib) + fput(sbinfo->si_xib); + sbinfo->si_xib = NULL; @@ -36635,7 +36662,7 @@ index 000000000000..29f53f9e5968 + sbinfo->si_xib_buf = NULL; +} + -+static int au_xino_set_xib(struct super_block *sb, struct file *base) ++static int au_xino_set_xib(struct super_block *sb, struct path *path) +{ + int err; + loff_t pos; @@ -36645,7 +36672,7 @@ index 000000000000..29f53f9e5968 + SiMustWriteLock(sb); + + sbinfo = au_sbi(sb); -+ file = au_xino_create2(base, sbinfo->si_xib); ++ file = au_xino_create2(sb, path, sbinfo->si_xib); + err = PTR_ERR(file); + if (IS_ERR(file)) + goto out; @@ -36682,9 +36709,8 @@ index 000000000000..29f53f9e5968 +out_unset: + fput(sbinfo->si_xib); + sbinfo->si_xib = NULL; -+ sbinfo->si_xread = NULL; -+ sbinfo->si_xwrite = NULL; +out: ++ AuTraceErr(err); + return err; +} + @@ -36697,79 +36723,76 @@ index 000000000000..29f53f9e5968 + bbot = au_sbbot(sb); + for (bindex = 0; bindex <= bbot; bindex++) { + br = au_sbr(sb, bindex); -+ if (!br || !br->br_xino.xi_file) -+ continue; -+ -+ fput(br->br_xino.xi_file); -+ br->br_xino.xi_file = NULL; ++ AuDebugOn(!br); ++ au_xino_put(br); + } +} + -+static int au_xino_set_br(struct super_block *sb, struct file *base) ++static void au_xino_set_br_shared(struct super_block *sb, struct au_branch *br, ++ aufs_bindex_t bshared) ++{ ++ struct au_branch *brshared; ++ ++ brshared = au_sbr(sb, bshared); ++ AuDebugOn(!brshared->br_xino); ++ AuDebugOn(!brshared->br_xino->xi_file); ++ if (br->br_xino != brshared->br_xino) { ++ au_xino_get(brshared); ++ au_xino_put(br); ++ br->br_xino = brshared->br_xino; ++ } ++} ++ ++static int au_xino_set_br(struct super_block *sb, struct path *path) +{ + int err; -+ ino_t ino; ++ ino_t h_ino; + aufs_bindex_t bindex, bbot, bshared; -+ struct { -+ struct file *old, *new; -+ } *fpair, *p; ++ struct file *f; + struct au_branch *br; + struct inode *inode; + vfs_writef_t writef; ++ struct au_xino *xi; + + SiMustWriteLock(sb); + -+ err = -ENOMEM; + bbot = au_sbbot(sb); -+ fpair = kcalloc(bbot + 1, sizeof(*fpair), GFP_NOFS); -+ if (unlikely(!fpair)) -+ goto out; -+ + inode = d_inode(sb->s_root); -+ ino = AUFS_ROOT_INO; + writef = au_sbi(sb)->si_xwrite; -+ for (bindex = 0, p = fpair; bindex <= bbot; bindex++, p++) { ++ for (bindex = 0; bindex <= bbot; bindex++) { ++ br = au_sbr(sb, bindex); + bshared = is_sb_shared(sb, bindex, bindex - 1); + if (bshared >= 0) { + /* shared xino */ -+ *p = fpair[bshared]; -+ get_file(p->new); ++ au_xino_set_br_shared(sb, br, bshared); ++ f = au_xino_file(br); ++ goto ino; + } + -+ if (!p->new) { -+ /* new xino */ -+ br = au_sbr(sb, bindex); -+ p->old = br->br_xino.xi_file; -+ p->new = au_xino_create2(base, br->br_xino.xi_file); -+ err = PTR_ERR(p->new); -+ if (IS_ERR(p->new)) { -+ p->new = NULL; -+ goto out_pair; -+ } -+ } -+ -+ err = au_xino_do_write(writef, p->new, -+ au_h_iptr(inode, bindex)->i_ino, ino); -+ if (unlikely(err)) -+ goto out_pair; -+ } -+ -+ for (bindex = 0, p = fpair; bindex <= bbot; bindex++, p++) { -+ br = au_sbr(sb, bindex); -+ if (br->br_xino.xi_file) -+ fput(br->br_xino.xi_file); -+ get_file(p->new); -+ br->br_xino.xi_file = p->new; -+ } -+ -+out_pair: -+ for (bindex = 0, p = fpair; bindex <= bbot; bindex++, p++) -+ if (p->new) -+ fput(p->new); -+ else ++ /* new xino */ ++ f = au_xino_create2(sb, path, au_xino_file(br)); ++ err = PTR_ERR(f); ++ if (IS_ERR(f)) + break; -+ kfree(fpair); -+out: ++ xi = br->br_xino; ++ if (!xi) { ++ err = au_xino_init(br, f); ++ fput(f); ++ if (unlikely(err)) ++ break; ++ } else { ++ au_xino_file_set(br, f); ++ fput(f); ++ } ++ ++ ino: /* indented label */ ++ h_ino = au_h_iptr(inode, bindex)->i_ino; ++ err = au_xino_do_write(writef, f, h_ino, AUFS_ROOT_INO); ++ if (unlikely(err)) ++ break; ++ } ++ ++ AuTraceErr(err); + return err; +} + @@ -36780,32 +36803,38 @@ index 000000000000..29f53f9e5968 + au_xigen_clr(sb); + xino_clear_xib(sb); + xino_clear_br(sb); ++ dbgaufs_brs_del(sb, 0); ++ au_xino_brid_set(sb, -1); + sbinfo = au_sbi(sb); + /* lvalue, do not call au_mntflags() */ + au_opt_clr(sbinfo->si_mntflags, XINO); +} + -+int au_xino_set(struct super_block *sb, struct au_opt_xino *xino, int remount) ++int au_xino_set(struct super_block *sb, struct au_opt_xino *xiopt, int remount) +{ + int err, skip; -+ struct dentry *parent, *cur_parent; ++ struct dentry *dentry, *parent, *cur_dentry, *cur_parent; + struct qstr *dname, *cur_name; + struct file *cur_xino; -+ struct inode *dir; + struct au_sbinfo *sbinfo; ++ struct path *path, *cur_path; + + SiMustWriteLock(sb); + + err = 0; + sbinfo = au_sbi(sb); -+ parent = dget_parent(xino->file->f_path.dentry); ++ path = &xiopt->file->f_path; ++ dentry = path->dentry; ++ parent = dget_parent(dentry); + if (remount) { + skip = 0; -+ dname = &xino->file->f_path.dentry->d_name; + cur_xino = sbinfo->si_xib; + if (cur_xino) { -+ cur_parent = dget_parent(cur_xino->f_path.dentry); -+ cur_name = &cur_xino->f_path.dentry->d_name; ++ cur_path = &cur_xino->f_path; ++ cur_dentry = cur_path->dentry; ++ cur_parent = dget_parent(cur_dentry); ++ cur_name = &cur_dentry->d_name; ++ dname = &dentry->d_name; + skip = (cur_parent == parent + && au_qstreq(dname, cur_name)); + dput(cur_parent); @@ -36815,30 +36844,26 @@ index 000000000000..29f53f9e5968 + } + + au_opt_set(sbinfo->si_mntflags, XINO); -+ dir = d_inode(parent); -+ inode_lock_nested(dir, AuLsc_I_PARENT); -+ /* mnt_want_write() is unnecessary here */ -+ err = au_xino_set_xib(sb, xino->file); ++ err = au_xino_set_xib(sb, path); ++ /* si_x{read,write} are set */ + if (!err) -+ err = au_xigen_set(sb, xino->file); -+ if (!err) -+ err = au_xino_set_br(sb, xino->file); -+ inode_unlock(dir); ++ err = au_xigen_set(sb, path); + if (!err) ++ err = au_xino_set_br(sb, path); ++ if (!err) { ++ dbgaufs_brs_add(sb, 0, /*topdown*/1); + goto out; /* success */ ++ } + + /* reset all */ -+ AuIOErr("failed creating xino(%d).\n", err); -+ au_xigen_clr(sb); -+ xino_clear_xib(sb); ++ AuIOErr("failed setting xino(%d).\n", err); ++ au_xino_clr(sb); + +out: + dput(parent); + return err; +} + -+/* ---------------------------------------------------------------------- */ -+ +/* + * create a xinofile at the default place/path. + */ @@ -36901,6 +36926,268 @@ index 000000000000..29f53f9e5968 + +/* ---------------------------------------------------------------------- */ + ++/* ++ * initialize the xinofile for the specified branch @br ++ * at the place/path where @base_file indicates. ++ * test whether another branch is on the same filesystem or not, ++ * if found then share the xinofile with another branch. ++ */ ++int au_xino_init_br(struct super_block *sb, struct au_branch *br, ino_t h_ino, ++ struct path *base) ++{ ++ int err; ++ aufs_bindex_t bshared; ++ struct file *file; ++ ++ err = 0; ++ bshared = sbr_find_shared(sb, /*btop*/0, au_sbbot(sb), au_br_sb(br)); ++ if (bshared >= 0) { ++ au_xino_set_br_shared(sb, br, bshared); ++ file = au_xino_file(br); ++ goto out_ino; /* success */ ++ } ++ ++ file = au_xino_create2(sb, base, NULL); ++ err = PTR_ERR(file); ++ if (IS_ERR(file)) ++ goto out; ++ ++ if (!br->br_xino) { ++ err = au_xino_init(br, file); ++ fput(file); ++ if (unlikely(err)) ++ goto out; ++ } else { ++ au_xino_file_set(br, file); ++ fput(file); ++ } ++ ++out_ino: ++ err = au_xino_do_write(au_sbi(sb)->si_xwrite, file, h_ino, ++ AUFS_ROOT_INO); ++ if (unlikely(err)) ++ au_xino_put(br); ++out: ++ return err; ++} ++ ++/* ---------------------------------------------------------------------- */ ++ ++/* ++ * get an unused inode number from bitmap ++ */ ++ino_t au_xino_new_ino(struct super_block *sb) ++{ ++ ino_t ino; ++ unsigned long *p, pindex, ul, pend; ++ struct au_sbinfo *sbinfo; ++ struct file *file; ++ int free_bit, err; ++ ++ if (!au_opt_test(au_mntflags(sb), XINO)) ++ return iunique(sb, AUFS_FIRST_INO); ++ ++ sbinfo = au_sbi(sb); ++ mutex_lock(&sbinfo->si_xib_mtx); ++ p = sbinfo->si_xib_buf; ++ free_bit = sbinfo->si_xib_next_bit; ++ if (free_bit < page_bits && !test_bit(free_bit, p)) ++ goto out; /* success */ ++ free_bit = find_first_zero_bit(p, page_bits); ++ if (free_bit < page_bits) ++ goto out; /* success */ ++ ++ pindex = sbinfo->si_xib_last_pindex; ++ for (ul = pindex - 1; ul < ULONG_MAX; ul--) { ++ err = xib_pindex(sb, ul); ++ if (unlikely(err)) ++ goto out_err; ++ free_bit = find_first_zero_bit(p, page_bits); ++ if (free_bit < page_bits) ++ goto out; /* success */ ++ } ++ ++ file = sbinfo->si_xib; ++ pend = vfsub_f_size_read(file) / PAGE_SIZE; ++ for (ul = pindex + 1; ul <= pend; ul++) { ++ err = xib_pindex(sb, ul); ++ if (unlikely(err)) ++ goto out_err; ++ free_bit = find_first_zero_bit(p, page_bits); ++ if (free_bit < page_bits) ++ goto out; /* success */ ++ } ++ BUG(); ++ ++out: ++ set_bit(free_bit, p); ++ sbinfo->si_xib_next_bit = free_bit + 1; ++ pindex = sbinfo->si_xib_last_pindex; ++ mutex_unlock(&sbinfo->si_xib_mtx); ++ ino = xib_calc_ino(pindex, free_bit); ++ AuDbg("i%lu\n", (unsigned long)ino); ++ return ino; ++out_err: ++ mutex_unlock(&sbinfo->si_xib_mtx); ++ AuDbg("i0\n"); ++ return 0; ++} ++ ++/* for s_op->delete_inode() */ ++void au_xino_delete_inode(struct inode *inode, const int unlinked) ++{ ++ int err; ++ unsigned int mnt_flags; ++ aufs_bindex_t bindex, bbot, bi; ++ unsigned char try_trunc; ++ struct au_iinfo *iinfo; ++ struct super_block *sb; ++ struct au_hinode *hi; ++ struct inode *h_inode; ++ struct au_branch *br; ++ vfs_writef_t xwrite; ++ ++ AuDebugOn(au_is_bad_inode(inode)); ++ ++ sb = inode->i_sb; ++ mnt_flags = au_mntflags(sb); ++ if (!au_opt_test(mnt_flags, XINO) ++ || inode->i_ino == AUFS_ROOT_INO) ++ return; ++ ++ if (unlinked) { ++ au_xigen_inc(inode); ++ au_xib_clear_bit(inode); ++ } ++ ++ iinfo = au_ii(inode); ++ bindex = iinfo->ii_btop; ++ if (bindex < 0) ++ return; ++ ++ xwrite = au_sbi(sb)->si_xwrite; ++ try_trunc = !!au_opt_test(mnt_flags, TRUNC_XINO); ++ hi = au_hinode(iinfo, bindex); ++ bbot = iinfo->ii_bbot; ++ for (; bindex <= bbot; bindex++, hi++) { ++ h_inode = hi->hi_inode; ++ if (!h_inode ++ || (!unlinked && h_inode->i_nlink)) ++ continue; ++ ++ /* inode may not be revalidated */ ++ bi = au_br_index(sb, hi->hi_id); ++ if (bi < 0) ++ continue; ++ ++ br = au_sbr(sb, bi); ++ err = au_xino_do_write(xwrite, au_xino_file(br), ++ h_inode->i_ino, /*ino*/0); ++ if (!err && try_trunc ++ && au_test_fs_trunc_xino(au_br_sb(br))) ++ xino_try_trunc(sb, br); ++ } ++} ++ ++/* ---------------------------------------------------------------------- */ ++ ++static int au_xinondir_find(struct au_xino *xi, ino_t h_ino) ++{ ++ int found, total, i; ++ ++ found = -1; ++ total = xi->xi_nondir.total; ++ for (i = 0; i < total; i++) { ++ if (xi->xi_nondir.array[i] != h_ino) ++ continue; ++ found = i; ++ break; ++ } ++ ++ return found; ++} ++ ++static int au_xinondir_expand(struct au_xino *xi) ++{ ++ int err, sz; ++ ino_t *p; ++ ++ BUILD_BUG_ON(KMALLOC_MAX_SIZE > INT_MAX); ++ ++ err = -ENOMEM; ++ sz = xi->xi_nondir.total * sizeof(ino_t); ++ if (unlikely(sz > KMALLOC_MAX_SIZE / 2)) ++ goto out; ++ p = au_kzrealloc(xi->xi_nondir.array, sz, sz << 1, GFP_ATOMIC, ++ /*may_shrink*/0); ++ if (p) { ++ xi->xi_nondir.array = p; ++ xi->xi_nondir.total <<= 1; ++ AuDbg("xi_nondir.total %d\n", xi->xi_nondir.total); ++ err = 0; ++ } ++ ++out: ++ return err; ++} ++ ++void au_xinondir_leave(struct super_block *sb, aufs_bindex_t bindex, ++ ino_t h_ino, int idx) ++{ ++ struct au_xino *xi; ++ ++ AuDebugOn(!au_opt_test(au_mntflags(sb), XINO)); ++ xi = au_sbr(sb, bindex)->br_xino; ++ AuDebugOn(idx < 0 || xi->xi_nondir.total <= idx); ++ ++ spin_lock(&xi->xi_nondir.spin); ++ AuDebugOn(xi->xi_nondir.array[idx] != h_ino); ++ xi->xi_nondir.array[idx] = 0; ++ spin_unlock(&xi->xi_nondir.spin); ++ wake_up_all(&xi->xi_nondir.wqh); ++} ++ ++int au_xinondir_enter(struct super_block *sb, aufs_bindex_t bindex, ino_t h_ino, ++ int *idx) ++{ ++ int err, found, empty; ++ struct au_xino *xi; ++ ++ err = 0; ++ *idx = -1; ++ if (!au_opt_test(au_mntflags(sb), XINO)) ++ goto out; /* no xino */ ++ ++ xi = au_sbr(sb, bindex)->br_xino; ++ ++again: ++ spin_lock(&xi->xi_nondir.spin); ++ found = au_xinondir_find(xi, h_ino); ++ if (found == -1) { ++ empty = au_xinondir_find(xi, /*h_ino*/0); ++ if (empty == -1) { ++ empty = xi->xi_nondir.total; ++ err = au_xinondir_expand(xi); ++ if (unlikely(err)) ++ goto out_unlock; ++ } ++ xi->xi_nondir.array[empty] = h_ino; ++ *idx = empty; ++ } else { ++ spin_unlock(&xi->xi_nondir.spin); ++ wait_event(xi->xi_nondir.wqh, ++ xi->xi_nondir.array[found] != h_ino); ++ goto again; ++ } ++ ++out_unlock: ++ spin_unlock(&xi->xi_nondir.spin); ++out: ++ return err; ++} ++ ++/* ---------------------------------------------------------------------- */ ++ +int au_xino_path(struct seq_file *seq, struct file *file) +{ + int err; @@ -36918,108 +37205,11 @@ index 000000000000..29f53f9e5968 +out: + return err; +} -+ -+/* ---------------------------------------------------------------------- */ -+ -+void au_xinondir_leave(struct super_block *sb, aufs_bindex_t bindex, -+ ino_t h_ino, int idx) -+{ -+ struct au_xino_file *xino; -+ -+ AuDebugOn(!au_opt_test(au_mntflags(sb), XINO)); -+ xino = &au_sbr(sb, bindex)->br_xino; -+ AuDebugOn(idx < 0 || xino->xi_nondir.total <= idx); -+ -+ spin_lock(&xino->xi_nondir.spin); -+ AuDebugOn(xino->xi_nondir.array[idx] != h_ino); -+ xino->xi_nondir.array[idx] = 0; -+ spin_unlock(&xino->xi_nondir.spin); -+ wake_up_all(&xino->xi_nondir.wqh); -+} -+ -+static int au_xinondir_find(struct au_xino_file *xino, ino_t h_ino) -+{ -+ int found, total, i; -+ -+ found = -1; -+ total = xino->xi_nondir.total; -+ for (i = 0; i < total; i++) { -+ if (xino->xi_nondir.array[i] != h_ino) -+ continue; -+ found = i; -+ break; -+ } -+ -+ return found; -+} -+ -+static int au_xinondir_expand(struct au_xino_file *xino) -+{ -+ int err, sz; -+ ino_t *p; -+ -+ BUILD_BUG_ON(KMALLOC_MAX_SIZE > INT_MAX); -+ -+ err = -ENOMEM; -+ sz = xino->xi_nondir.total * sizeof(ino_t); -+ if (unlikely(sz > KMALLOC_MAX_SIZE / 2)) -+ goto out; -+ p = au_kzrealloc(xino->xi_nondir.array, sz, sz << 1, GFP_ATOMIC, -+ /*may_shrink*/0); -+ if (p) { -+ xino->xi_nondir.array = p; -+ xino->xi_nondir.total <<= 1; -+ AuDbg("xi_nondir.total %d\n", xino->xi_nondir.total); -+ err = 0; -+ } -+ -+out: -+ return err; -+} -+ -+int au_xinondir_enter(struct super_block *sb, aufs_bindex_t bindex, ino_t h_ino, -+ int *idx) -+{ -+ int err, found, empty; -+ struct au_xino_file *xino; -+ -+ err = 0; -+ *idx = -1; -+ if (!au_opt_test(au_mntflags(sb), XINO)) -+ goto out; /* no xino */ -+ -+ xino = &au_sbr(sb, bindex)->br_xino; -+ -+again: -+ spin_lock(&xino->xi_nondir.spin); -+ found = au_xinondir_find(xino, h_ino); -+ if (found == -1) { -+ empty = au_xinondir_find(xino, /*h_ino*/0); -+ if (empty == -1) { -+ empty = xino->xi_nondir.total; -+ err = au_xinondir_expand(xino); -+ if (unlikely(err)) -+ goto out_unlock; -+ } -+ xino->xi_nondir.array[empty] = h_ino; -+ *idx = empty; -+ } else { -+ spin_unlock(&xino->xi_nondir.spin); -+ wait_event(xino->xi_nondir.wqh, -+ xino->xi_nondir.array[found] != h_ino); -+ goto again; -+ } -+ -+out_unlock: -+ spin_unlock(&xino->xi_nondir.spin); -+out: -+ return err; -+} diff --git a/fs/dcache.c b/fs/dcache.c -index 8945e6cabd93..b66fb04ec9c0 100644 +index 2acfc69878f5..3e2bae8ce017 100644 --- a/fs/dcache.c +++ b/fs/dcache.c -@@ -1205,7 +1205,7 @@ enum d_walk_ret { +@@ -1234,7 +1234,7 @@ enum d_walk_ret { * * The @enter() and @finish() callbacks are called with d_lock held. */ @@ -37028,7 +37218,7 @@ index 8945e6cabd93..b66fb04ec9c0 100644 enum d_walk_ret (*enter)(void *, struct dentry *), void (*finish)(void *)) { -@@ -1313,6 +1313,7 @@ static void d_walk(struct dentry *parent, void *data, +@@ -1342,6 +1342,7 @@ static void d_walk(struct dentry *parent, void *data, seq = 1; goto again; } @@ -37036,7 +37226,7 @@ index 8945e6cabd93..b66fb04ec9c0 100644 struct check_mount { struct vfsmount *mnt; -@@ -2931,6 +2932,7 @@ void d_exchange(struct dentry *dentry1, struct dentry *dentry2) +@@ -2942,6 +2943,7 @@ void d_exchange(struct dentry *dentry1, struct dentry *dentry2) write_sequnlock(&rename_lock); } @@ -37045,7 +37235,7 @@ index 8945e6cabd93..b66fb04ec9c0 100644 /** * d_ancestor - search for an ancestor diff --git a/fs/exec.c b/fs/exec.c -index 7eb8d21bcab9..56d79858451d 100644 +index 183059c427b9..35adee45eca5 100644 --- a/fs/exec.c +++ b/fs/exec.c @@ -109,6 +109,7 @@ bool path_noexec(const struct path *path) @@ -37057,7 +37247,7 @@ index 7eb8d21bcab9..56d79858451d 100644 #ifdef CONFIG_USELIB /* diff --git a/fs/fcntl.c b/fs/fcntl.c -index 1e97f1fda90c..bdd1c6cff237 100644 +index d737ff082472..d403576f1c4e 100644 --- a/fs/fcntl.c +++ b/fs/fcntl.c @@ -32,7 +32,7 @@ @@ -37123,10 +37313,10 @@ index 7ec0b3e5f05d..819ee0705035 100644 void __init files_init(void) { diff --git a/fs/inode.c b/fs/inode.c -index ef362364d396..fa69de83c027 100644 +index 3b55391072f3..17505c7e8c91 100644 --- a/fs/inode.c +++ b/fs/inode.c -@@ -856,6 +856,8 @@ unsigned int get_next_ino(void) +@@ -861,6 +861,8 @@ unsigned int get_next_ino(void) unsigned int *p = &get_cpu_var(last_ino); unsigned int res = *p; @@ -37135,7 +37325,7 @@ index ef362364d396..fa69de83c027 100644 #ifdef CONFIG_SMP if (unlikely((res & (LAST_INO_BATCH-1)) == 0)) { static atomic_t shared_last_ino; -@@ -868,7 +870,7 @@ unsigned int get_next_ino(void) +@@ -873,7 +875,7 @@ unsigned int get_next_ino(void) res++; /* get_next_ino should not provide a 0 inode number */ if (unlikely(!res)) @@ -37144,7 +37334,7 @@ index ef362364d396..fa69de83c027 100644 *p = res; put_cpu_var(last_ino); return res; -@@ -1659,7 +1661,7 @@ EXPORT_SYMBOL(generic_update_time); +@@ -1663,7 +1665,7 @@ EXPORT_SYMBOL(generic_update_time); * This does the actual work of updating an inodes time or version. Must have * had called mnt_want_write() before calling this. */ @@ -37153,7 +37343,7 @@ index ef362364d396..fa69de83c027 100644 { int (*update_time)(struct inode *, struct timespec *, int); -@@ -1668,6 +1670,7 @@ static int update_time(struct inode *inode, struct timespec *time, int flags) +@@ -1672,6 +1674,7 @@ static int update_time(struct inode *inode, struct timespec *time, int flags) return update_time(inode, time, flags); } @@ -37162,7 +37352,7 @@ index ef362364d396..fa69de83c027 100644 /** * touch_atime - update the access time diff --git a/fs/namespace.c b/fs/namespace.c -index 9d1374ab6e06..a4b9707369dc 100644 +index 5f75969adff1..5d3e0382a3e3 100644 --- a/fs/namespace.c +++ b/fs/namespace.c @@ -517,6 +517,7 @@ void __mnt_drop_write(struct vfsmount *mnt) @@ -37187,7 +37377,7 @@ index 9d1374ab6e06..a4b9707369dc 100644 /* * vfsmount lock must be held for write */ -@@ -1881,6 +1889,7 @@ int iterate_mounts(int (*f)(struct vfsmount *, void *), void *arg, +@@ -1887,6 +1895,7 @@ int iterate_mounts(int (*f)(struct vfsmount *, void *), void *arg, } return 0; } @@ -37268,7 +37458,7 @@ index e9191b416434..1f8ccfaddd9f 100644 /* * Destroy all marks in destroy_list, waits for SRCU period to finish before diff --git a/fs/open.c b/fs/open.c -index 7ea118471dce..6e2e2418a840 100644 +index d0e955b558ad..527bc1a0b557 100644 --- a/fs/open.c +++ b/fs/open.c @@ -64,6 +64,7 @@ int do_truncate(struct dentry *dentry, loff_t length, unsigned int time_attrs, @@ -37279,19 +37469,19 @@ index 7ea118471dce..6e2e2418a840 100644 long vfs_truncate(const struct path *path, loff_t length) { -@@ -691,6 +692,7 @@ int open_check_o_direct(struct file *f) - } - return 0; +@@ -723,6 +724,7 @@ SYSCALL_DEFINE3(fchown, unsigned int, fd, uid_t, user, gid_t, group) + { + return ksys_fchown(fd, user, group); } +EXPORT_SYMBOL_GPL(open_check_o_direct); - static int do_dentry_open(struct file *f, - struct inode *inode, + int open_check_o_direct(struct file *f) + { diff --git a/fs/proc/base.c b/fs/proc/base.c -index 9298324325ed..da5bf4f99220 100644 +index 1a76d751cf3c..77f698eaec4e 100644 --- a/fs/proc/base.c +++ b/fs/proc/base.c -@@ -2014,7 +2014,7 @@ static int map_files_get_link(struct dentry *dentry, struct path *path) +@@ -2024,7 +2024,7 @@ static int map_files_get_link(struct dentry *dentry, struct path *path) down_read(&mm->mmap_sem); vma = find_exact_vma(mm, vm_start, vm_end); if (vma && vma->vm_file) { @@ -37317,10 +37507,10 @@ index 75634379f82e..7c0dc0ff4882 100644 ino = inode->i_ino; } diff --git a/fs/proc/task_mmu.c b/fs/proc/task_mmu.c -index ec6d2983a5cb..34c71934fe3f 100644 +index c486ad4b43f0..76b71f890851 100644 --- a/fs/proc/task_mmu.c +++ b/fs/proc/task_mmu.c -@@ -311,7 +311,10 @@ show_map_vma(struct seq_file *m, struct vm_area_struct *vma, int is_pid) +@@ -305,7 +305,10 @@ show_map_vma(struct seq_file *m, struct vm_area_struct *vma, int is_pid) const char *name = NULL; if (file) { @@ -37332,7 +37522,7 @@ index ec6d2983a5cb..34c71934fe3f 100644 dev = inode->i_sb->s_dev; ino = inode->i_ino; pgoff = ((loff_t)vma->vm_pgoff) << PAGE_SHIFT; -@@ -1741,7 +1744,7 @@ static int show_numa_map(struct seq_file *m, void *v, int is_pid) +@@ -1726,7 +1729,7 @@ static int show_numa_map(struct seq_file *m, void *v, int is_pid) struct proc_maps_private *proc_priv = &numa_priv->proc_maps; struct vm_area_struct *vma = v; struct numa_maps *md = &numa_priv->md; @@ -37358,10 +37548,10 @@ index 5b62f57bd9bc..dfb4a3bd0fac 100644 ino = inode->i_ino; pgoff = (loff_t)vma->vm_pgoff << PAGE_SHIFT; diff --git a/fs/read_write.c b/fs/read_write.c -index f8547b82dfb3..d423a5fa3f5f 100644 +index c4eabbfc90df..aabf92d957bc 100644 --- a/fs/read_write.c +++ b/fs/read_write.c -@@ -454,6 +454,7 @@ ssize_t vfs_read(struct file *file, char __user *buf, size_t count, loff_t *pos) +@@ -459,6 +459,7 @@ ssize_t vfs_read(struct file *file, char __user *buf, size_t count, loff_t *pos) return ret; } @@ -37369,7 +37559,7 @@ index f8547b82dfb3..d423a5fa3f5f 100644 static ssize_t new_sync_write(struct file *filp, const char __user *buf, size_t len, loff_t *ppos) { -@@ -484,6 +485,30 @@ ssize_t __vfs_write(struct file *file, const char __user *p, size_t count, +@@ -489,6 +490,30 @@ ssize_t __vfs_write(struct file *file, const char __user *p, size_t count, return -EINVAL; } @@ -37400,7 +37590,7 @@ index f8547b82dfb3..d423a5fa3f5f 100644 ssize_t __kernel_write(struct file *file, const void *buf, size_t count, loff_t *pos) { mm_segment_t old_fs; -@@ -552,6 +577,7 @@ ssize_t vfs_write(struct file *file, const char __user *buf, size_t count, loff_ +@@ -557,6 +582,7 @@ ssize_t vfs_write(struct file *file, const char __user *buf, size_t count, loff_ return ret; } @@ -37409,7 +37599,7 @@ index f8547b82dfb3..d423a5fa3f5f 100644 static inline loff_t file_pos_read(struct file *file) { diff --git a/fs/splice.c b/fs/splice.c -index 39e2dc01ac12..ce01a7429add 100644 +index 005d09cf3fa8..ec0ad025e50b 100644 --- a/fs/splice.c +++ b/fs/splice.c @@ -837,8 +837,8 @@ EXPORT_SYMBOL(generic_splice_sendpage); @@ -37450,7 +37640,7 @@ index 39e2dc01ac12..ce01a7429add 100644 /** * splice_direct_to_actor - splices data directly between two non-pipes diff --git a/fs/sync.c b/fs/sync.c -index 6e0a2cbaf6de..47a78bdd7fdd 100644 +index b54e0541ad89..ffd7ea43831e 100644 --- a/fs/sync.c +++ b/fs/sync.c @@ -28,7 +28,7 @@ @@ -37495,7 +37685,7 @@ index 279720db984a..76e38eade225 100644 static inline void fput_light(struct file *file, int fput_needed) { diff --git a/include/linux/fs.h b/include/linux/fs.h -index c6baf767619e..71dc6956868a 100644 +index 760d8da1b6c7..09a254285125 100644 --- a/include/linux/fs.h +++ b/include/linux/fs.h @@ -1270,6 +1270,7 @@ extern void fasync_free(struct fasync_struct *); @@ -37506,7 +37696,7 @@ index c6baf767619e..71dc6956868a 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); -@@ -1722,6 +1723,7 @@ struct file_operations { +@@ -1724,6 +1725,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); @@ -37514,7 +37704,7 @@ index c6baf767619e..71dc6956868a 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); -@@ -1792,6 +1794,12 @@ ssize_t rw_copy_check_uvector(int type, const struct iovec __user * uvector, +@@ -1794,6 +1796,12 @@ ssize_t rw_copy_check_uvector(int type, const struct iovec __user * uvector, struct iovec *fast_pointer, struct iovec **ret_pointer); @@ -37527,7 +37717,7 @@ index c6baf767619e..71dc6956868a 100644 extern ssize_t __vfs_read(struct file *, char __user *, size_t, loff_t *); extern ssize_t vfs_read(struct file *, char __user *, size_t, loff_t *); extern ssize_t vfs_write(struct file *, const char __user *, size_t, loff_t *); -@@ -2196,6 +2204,7 @@ extern int current_umask(void); +@@ -2199,6 +2207,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 timespec *, int); @@ -37535,7 +37725,7 @@ index c6baf767619e..71dc6956868a 100644 /* /sys/fs */ extern struct kobject *fs_kobj; -@@ -2476,6 +2485,7 @@ static inline bool sb_is_blkdev_sb(struct super_block *sb) +@@ -2485,6 +2494,7 @@ static inline bool sb_is_blkdev_sb(struct super_block *sb) return false; } #endif @@ -37565,10 +37755,10 @@ index 6fc77d4dbdcd..27e76f0c0b4d 100644 #define lockdep_assert_held(l) do { (void)(l); } while (0) diff --git a/include/linux/mm.h b/include/linux/mm.h -index ad06d42adb1a..75e5d371c638 100644 +index 02a616e2f17d..01b3bb99d15b 100644 --- a/include/linux/mm.h +++ b/include/linux/mm.h -@@ -1368,6 +1368,28 @@ static inline void unmap_shared_mapping_range(struct address_space *mapping, +@@ -1380,6 +1380,28 @@ static inline void unmap_shared_mapping_range(struct address_space *mapping, unmap_mapping_range(mapping, holebegin, holelen, 0); } @@ -37598,10 +37788,10 @@ index ad06d42adb1a..75e5d371c638 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 fd1af6b9591d..89ec438a598a 100644 +index 21612347d311..78aa3674a4ad 100644 --- a/include/linux/mm_types.h +++ b/include/linux/mm_types.h -@@ -249,6 +249,7 @@ struct vm_region { +@@ -251,6 +251,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 */ @@ -37609,7 +37799,7 @@ index fd1af6b9591d..89ec438a598a 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 -@@ -323,6 +324,7 @@ struct vm_area_struct { +@@ -325,6 +326,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). */ @@ -37653,7 +37843,7 @@ index 74b4911ac16d..19789fbea567 100644 #endif diff --git a/include/uapi/linux/aufs_type.h b/include/uapi/linux/aufs_type.h new file mode 100644 -index 000000000000..8c95f8669a23 +index 000000000000..296b96b6a627 --- /dev/null +++ b/include/uapi/linux/aufs_type.h @@ -0,0 +1,447 @@ @@ -37698,7 +37888,7 @@ index 000000000000..8c95f8669a23 + +#include + -+#define AUFS_VERSION "4.16-20180409" ++#define AUFS_VERSION "4.17-20180702" + +/* todo? move this to linux-2.6.19/include/magic.h */ +#define AUFS_SUPER_MAGIC ('a' << 24 | 'u' << 16 | 'f' << 8 | 's') @@ -38105,10 +38295,10 @@ index 000000000000..8c95f8669a23 + +#endif /* __AUFS_TYPE_H__ */ diff --git a/kernel/fork.c b/kernel/fork.c -index e5d9d405ae4e..f6f6fbf333d7 100644 +index a5d21c42acfc..e965e093a1c4 100644 --- a/kernel/fork.c +++ b/kernel/fork.c -@@ -474,7 +474,7 @@ static __latent_entropy int dup_mmap(struct mm_struct *mm, +@@ -473,7 +473,7 @@ static __latent_entropy int dup_mmap(struct mm_struct *mm, struct inode *inode = file_inode(file); struct address_space *mapping = file->f_mapping; @@ -38118,7 +38308,7 @@ index e5d9d405ae4e..f6f6fbf333d7 100644 atomic_dec(&inode->i_writecount); i_mmap_lock_write(mapping); diff --git a/kernel/locking/lockdep.c b/kernel/locking/lockdep.c -index 89b5f83f1969..7bb20c5f670c 100644 +index 023386338269..6af91bd7ae9e 100644 --- a/kernel/locking/lockdep.c +++ b/kernel/locking/lockdep.c @@ -140,7 +140,7 @@ static struct lock_list list_entries[MAX_LOCKDEP_ENTRIES]; @@ -38149,12 +38339,12 @@ index 0fef395662a6..83fb1ecfc33d 100644 } +EXPORT_SYMBOL_GPL(task_work_run); diff --git a/mm/Makefile b/mm/Makefile -index e669f02c5a54..9c36567952c7 100644 +index b4e54a9ae9c5..77892ae8d3d1 100644 --- a/mm/Makefile +++ b/mm/Makefile @@ -39,7 +39,7 @@ obj-y := filemap.o mempool.o oom_kill.o \ mm_init.o mmu_context.o percpu.o slab_common.o \ - compaction.o vmacache.o swap_slots.o \ + compaction.o vmacache.o \ interval_tree.o list_lru.o workingset.o \ - debug.o $(mmu-y) + prfile.o debug.o $(mmu-y) @@ -38162,10 +38352,10 @@ index e669f02c5a54..9c36567952c7 100644 obj-y += init-mm.o diff --git a/mm/filemap.c b/mm/filemap.c -index 693f62212a59..ea460488034e 100644 +index 0604cb02e6f3..45d23696bc7c 100644 --- a/mm/filemap.c +++ b/mm/filemap.c -@@ -2703,7 +2703,7 @@ int filemap_page_mkwrite(struct vm_fault *vmf) +@@ -2700,7 +2700,7 @@ int filemap_page_mkwrite(struct vm_fault *vmf) int ret = VM_FAULT_LOCKED; sb_start_pagefault(inode->i_sb); @@ -38175,10 +38365,10 @@ index 693f62212a59..ea460488034e 100644 if (page->mapping != inode->i_mapping) { unlock_page(page); diff --git a/mm/mmap.c b/mm/mmap.c -index 9efdc021ad22..d77f01f5380b 100644 +index fc41c0543d7f..e3768695c18c 100644 --- a/mm/mmap.c +++ b/mm/mmap.c -@@ -171,7 +171,7 @@ static struct vm_area_struct *remove_vma(struct vm_area_struct *vma) +@@ -180,7 +180,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) @@ -38187,7 +38377,7 @@ index 9efdc021ad22..d77f01f5380b 100644 mpol_put(vma_policy(vma)); kmem_cache_free(vm_area_cachep, vma); return next; -@@ -896,7 +896,7 @@ int __vma_adjust(struct vm_area_struct *vma, unsigned long start, +@@ -905,7 +905,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); @@ -38196,7 +38386,7 @@ index 9efdc021ad22..d77f01f5380b 100644 } if (next->anon_vma) anon_vma_merge(vma, next); -@@ -1761,8 +1761,8 @@ unsigned long mmap_region(struct file *file, unsigned long addr, +@@ -1820,8 +1820,8 @@ unsigned long mmap_region(struct file *file, unsigned long addr, return addr; unmap_and_free_vma: @@ -38206,7 +38396,7 @@ index 9efdc021ad22..d77f01f5380b 100644 /* Undo any partial mapping done by a device driver. */ unmap_region(mm, vma, prev, vma->vm_start, vma->vm_end); -@@ -2586,7 +2586,7 @@ int __split_vma(struct mm_struct *mm, struct vm_area_struct *vma, +@@ -2645,7 +2645,7 @@ int __split_vma(struct mm_struct *mm, struct vm_area_struct *vma, goto out_free_mpol; if (new->vm_file) @@ -38215,7 +38405,7 @@ index 9efdc021ad22..d77f01f5380b 100644 if (new->vm_ops && new->vm_ops->open) new->vm_ops->open(new); -@@ -2605,7 +2605,7 @@ int __split_vma(struct mm_struct *mm, struct vm_area_struct *vma, +@@ -2664,7 +2664,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) @@ -38224,7 +38414,7 @@ index 9efdc021ad22..d77f01f5380b 100644 unlink_anon_vmas(new); out_free_mpol: mpol_put(vma_policy(new)); -@@ -2767,7 +2767,7 @@ SYSCALL_DEFINE5(remap_file_pages, unsigned long, start, unsigned long, size, +@@ -2826,7 +2826,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; @@ -38233,7 +38423,7 @@ index 9efdc021ad22..d77f01f5380b 100644 pr_warn_once("%s (%d) uses deprecated remap_file_pages() syscall. See Documentation/vm/remap_file_pages.txt.\n", current->comm, current->pid); -@@ -2842,10 +2842,27 @@ SYSCALL_DEFINE5(remap_file_pages, unsigned long, start, unsigned long, size, +@@ -2901,10 +2901,27 @@ SYSCALL_DEFINE5(remap_file_pages, unsigned long, start, unsigned long, size, } } @@ -38262,7 +38452,7 @@ index 9efdc021ad22..d77f01f5380b 100644 out: up_write(&mm->mmap_sem); if (populate) -@@ -3153,7 +3170,7 @@ struct vm_area_struct *copy_vma(struct vm_area_struct **vmap, +@@ -3220,7 +3237,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) @@ -38272,10 +38462,10 @@ index 9efdc021ad22..d77f01f5380b 100644 new_vma->vm_ops->open(new_vma); vma_link(mm, new_vma, prev, rb_link, rb_parent); diff --git a/mm/nommu.c b/mm/nommu.c -index ebb6e618dade..8cf24288a7e9 100644 +index 13723736d38f..6362ddec0ee3 100644 --- a/mm/nommu.c +++ b/mm/nommu.c -@@ -641,7 +641,7 @@ static void __put_nommu_region(struct vm_region *region) +@@ -629,7 +629,7 @@ static void __put_nommu_region(struct vm_region *region) up_write(&nommu_region_sem); if (region->vm_file) @@ -38284,7 +38474,7 @@ index ebb6e618dade..8cf24288a7e9 100644 /* IO memory and memory shared directly out of the pagecache * from ramfs/tmpfs mustn't be released here */ -@@ -799,7 +799,7 @@ static void delete_vma(struct mm_struct *mm, struct vm_area_struct *vma) +@@ -767,7 +767,7 @@ static void delete_vma(struct mm_struct *mm, struct vm_area_struct *vma) if (vma->vm_ops && vma->vm_ops->close) vma->vm_ops->close(vma); if (vma->vm_file) @@ -38293,7 +38483,7 @@ index ebb6e618dade..8cf24288a7e9 100644 put_nommu_region(vma->vm_region); kmem_cache_free(vm_area_cachep, vma); } -@@ -1321,7 +1321,7 @@ unsigned long do_mmap(struct file *file, +@@ -1289,7 +1289,7 @@ unsigned long do_mmap(struct file *file, goto error_just_free; } } @@ -38302,7 +38492,7 @@ index ebb6e618dade..8cf24288a7e9 100644 kmem_cache_free(vm_region_jar, region); region = pregion; result = start; -@@ -1396,10 +1396,10 @@ unsigned long do_mmap(struct file *file, +@@ -1364,10 +1364,10 @@ unsigned long do_mmap(struct file *file, up_write(&nommu_region_sem); error: if (region->vm_file) @@ -38408,10 +38598,10 @@ index 000000000000..14efc4f64075 +} +#endif /* !CONFIG_MMU */ diff --git a/security/commoncap.c b/security/commoncap.c -index 48620c93d697..49811041dbd3 100644 +index 1ce701fcb3f3..a0d106e6bacd 100644 --- a/security/commoncap.c +++ b/security/commoncap.c -@@ -1330,12 +1330,14 @@ int cap_mmap_addr(unsigned long addr) +@@ -1332,12 +1332,14 @@ int cap_mmap_addr(unsigned long addr) } return ret; } @@ -38444,10 +38634,10 @@ index c65b39bafdfe..e363d2205c29 100644 } +EXPORT_SYMBOL_GPL(__devcgroup_check_permission); diff --git a/security/security.c b/security/security.c -index 1cd8526cb0b7..f2e473650a56 100644 +index 7bc2fde023a7..6bd0468e4c78 100644 --- a/security/security.c +++ b/security/security.c -@@ -531,6 +531,7 @@ int security_path_rmdir(const struct path *dir, struct dentry *dentry) +@@ -537,6 +537,7 @@ int security_path_rmdir(const struct path *dir, struct dentry *dentry) return 0; return call_int_hook(path_rmdir, 0, dir, dentry); } @@ -38455,7 +38645,7 @@ index 1cd8526cb0b7..f2e473650a56 100644 int security_path_unlink(const struct path *dir, struct dentry *dentry) { -@@ -547,6 +548,7 @@ int security_path_symlink(const struct path *dir, struct dentry *dentry, +@@ -553,6 +554,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); } @@ -38463,7 +38653,7 @@ index 1cd8526cb0b7..f2e473650a56 100644 int security_path_link(struct dentry *old_dentry, const struct path *new_dir, struct dentry *new_dentry) -@@ -555,6 +557,7 @@ int security_path_link(struct dentry *old_dentry, const struct path *new_dir, +@@ -561,6 +563,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); } @@ -38471,7 +38661,7 @@ index 1cd8526cb0b7..f2e473650a56 100644 int security_path_rename(const struct path *old_dir, struct dentry *old_dentry, const struct path *new_dir, struct dentry *new_dentry, -@@ -582,6 +585,7 @@ int security_path_truncate(const struct path *path) +@@ -588,6 +591,7 @@ int security_path_truncate(const struct path *path) return 0; return call_int_hook(path_truncate, 0, path); } @@ -38479,7 +38669,7 @@ index 1cd8526cb0b7..f2e473650a56 100644 int security_path_chmod(const struct path *path, umode_t mode) { -@@ -589,6 +593,7 @@ int security_path_chmod(const struct path *path, umode_t mode) +@@ -595,6 +599,7 @@ int security_path_chmod(const struct path *path, umode_t mode) return 0; return call_int_hook(path_chmod, 0, path, mode); } @@ -38487,7 +38677,7 @@ index 1cd8526cb0b7..f2e473650a56 100644 int security_path_chown(const struct path *path, kuid_t uid, kgid_t gid) { -@@ -596,6 +601,7 @@ int security_path_chown(const struct path *path, kuid_t uid, kgid_t gid) +@@ -602,6 +607,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); } @@ -38495,7 +38685,7 @@ index 1cd8526cb0b7..f2e473650a56 100644 int security_path_chroot(const struct path *path) { -@@ -681,6 +687,7 @@ int security_inode_readlink(struct dentry *dentry) +@@ -687,6 +693,7 @@ int security_inode_readlink(struct dentry *dentry) return 0; return call_int_hook(inode_readlink, 0, dentry); } @@ -38503,7 +38693,7 @@ index 1cd8526cb0b7..f2e473650a56 100644 int security_inode_follow_link(struct dentry *dentry, struct inode *inode, bool rcu) -@@ -696,6 +703,7 @@ int security_inode_permission(struct inode *inode, int mask) +@@ -702,6 +709,7 @@ int security_inode_permission(struct inode *inode, int mask) return 0; return call_int_hook(inode_permission, 0, inode, mask); } @@ -38511,7 +38701,7 @@ index 1cd8526cb0b7..f2e473650a56 100644 int security_inode_setattr(struct dentry *dentry, struct iattr *attr) { -@@ -867,6 +875,7 @@ int security_file_permission(struct file *file, int mask) +@@ -873,6 +881,7 @@ int security_file_permission(struct file *file, int mask) return fsnotify_perm(file, mask); } @@ -38519,7 +38709,7 @@ index 1cd8526cb0b7..f2e473650a56 100644 int security_file_alloc(struct file *file) { -@@ -926,6 +935,7 @@ int security_mmap_file(struct file *file, unsigned long prot, +@@ -932,6 +941,7 @@ int security_mmap_file(struct file *file, unsigned long prot, return ret; return ima_file_mmap(file, prot); } diff --git a/kernel-i586.config b/kernel-i586.config index 48a8ebd..5099b28 100644 --- a/kernel-i586.config +++ b/kernel-i586.config @@ -1,6 +1,6 @@ # # Automatically generated file; DO NOT EDIT. -# Linux/x86 4.16.x Kernel Configuration +# Linux/x86 4.17.x Kernel Configuration # # CONFIG_64BIT is not set CONFIG_X86_32=y @@ -192,7 +192,6 @@ CONFIG_SHMEM=y CONFIG_AIO=y CONFIG_ADVISE_SYSCALLS=y CONFIG_USERFAULTFD=y -CONFIG_PCI_QUIRKS=y CONFIG_MEMBARRIER=y # CONFIG_EMBEDDED is not set # CONFIG_PC104 is not set @@ -561,7 +560,6 @@ CONFIG_PM_SLEEP_DEBUG=y # CONFIG_DPM_WATCHDOG is not set CONFIG_PM_TRACE=y CONFIG_PM_TRACE_RTC=y -CONFIG_PM_OPP=y CONFIG_PM_CLK=y CONFIG_PM_GENERIC_DOMAINS=y # CONFIG_WQ_POWER_EFFICIENT_DEFAULT is not set @@ -580,6 +578,7 @@ CONFIG_ACPI_BATTERY=y CONFIG_ACPI_BUTTON=y CONFIG_ACPI_VIDEO=m CONFIG_ACPI_FAN=y +CONFIG_ACPI_TAD=m CONFIG_ACPI_DOCK=y CONFIG_ACPI_CPU_FREQ_PSS=y CONFIG_ACPI_PROCESSOR_CSTATE=y @@ -713,6 +712,7 @@ CONFIG_PCIE_PTM=y CONFIG_PCI_BUS_ADDR_T_64BIT=y CONFIG_PCI_MSI=y CONFIG_PCI_MSI_IRQ_DOMAIN=y +CONFIG_PCI_QUIRKS=y # CONFIG_PCI_DEBUG is not set # CONFIG_PCI_REALLOC_ENABLE_AUTO is not set CONFIG_PCI_STUB=m @@ -856,6 +856,7 @@ CONFIG_NET_IPGRE_DEMUX=m CONFIG_NET_IP_TUNNEL=m CONFIG_NET_IPGRE=m CONFIG_NET_IPGRE_BROADCAST=y +CONFIG_IP_MROUTE_COMMON=y CONFIG_IP_MROUTE=y # CONFIG_IP_MROUTE_MULTIPLE_TABLES is not set CONFIG_IP_PIMSM_V1=y @@ -993,8 +994,8 @@ CONFIG_NF_NAT_TFTP=m CONFIG_NF_NAT_REDIRECT=m CONFIG_NETFILTER_SYNPROXY=m CONFIG_NF_TABLES=m -CONFIG_NF_TABLES_INET=m -CONFIG_NF_TABLES_NETDEV=m +CONFIG_NF_TABLES_INET=y +CONFIG_NF_TABLES_NETDEV=y CONFIG_NFT_EXTHDR=m CONFIG_NFT_META=m CONFIG_NFT_RT=m @@ -1180,12 +1181,12 @@ CONFIG_IP_VS_PE_SIP=m CONFIG_NF_DEFRAG_IPV4=m CONFIG_NF_CONNTRACK_IPV4=m CONFIG_NF_SOCKET_IPV4=m -CONFIG_NF_TABLES_IPV4=m +CONFIG_NF_TABLES_IPV4=y CONFIG_NFT_CHAIN_ROUTE_IPV4=m CONFIG_NFT_REJECT_IPV4=m CONFIG_NFT_DUP_IPV4=m CONFIG_NFT_FIB_IPV4=m -CONFIG_NF_TABLES_ARP=m +CONFIG_NF_TABLES_ARP=y CONFIG_NF_FLOW_TABLE_IPV4=m CONFIG_NF_DUP_IPV4=m CONFIG_NF_LOG_ARP=m @@ -1228,8 +1229,11 @@ CONFIG_IP_NF_ARP_MANGLE=m CONFIG_NF_DEFRAG_IPV6=m CONFIG_NF_CONNTRACK_IPV6=m CONFIG_NF_SOCKET_IPV6=m -CONFIG_NF_TABLES_IPV6=m +CONFIG_NF_TABLES_IPV6=y CONFIG_NFT_CHAIN_ROUTE_IPV6=m +CONFIG_NFT_CHAIN_NAT_IPV6=m +CONFIG_NFT_MASQ_IPV6=m +CONFIG_NFT_REDIR_IPV6=m CONFIG_NFT_REJECT_IPV6=m CONFIG_NFT_DUP_IPV6=m CONFIG_NFT_FIB_IPV6=m @@ -1238,10 +1242,7 @@ CONFIG_NF_DUP_IPV6=m CONFIG_NF_REJECT_IPV6=m CONFIG_NF_LOG_IPV6=m CONFIG_NF_NAT_IPV6=m -CONFIG_NFT_CHAIN_NAT_IPV6=m CONFIG_NF_NAT_MASQUERADE_IPV6=m -CONFIG_NFT_MASQ_IPV6=m -CONFIG_NFT_REDIR_IPV6=m CONFIG_IP6_NF_IPTABLES=m CONFIG_IP6_NF_MATCH_AH=m CONFIG_IP6_NF_MATCH_EUI64=m @@ -1268,7 +1269,7 @@ CONFIG_IP6_NF_TARGET_NPT=m # DECnet: Netfilter Configuration # CONFIG_DECNET_NF_GRABULATOR=m -CONFIG_NF_TABLES_BRIDGE=m +CONFIG_NF_TABLES_BRIDGE=y CONFIG_NFT_BRIDGE_META=m CONFIG_NFT_BRIDGE_REJECT=m CONFIG_NF_LOG_BRIDGE=m @@ -1306,9 +1307,7 @@ CONFIG_INET_DCCP_DIAG=m # DCCP Kernel Hacking # # CONFIG_IP_DCCP_DEBUG is not set -# CONFIG_NET_DCCPPROBE is not set CONFIG_IP_SCTP=m -CONFIG_NET_SCTPPROBE=m # CONFIG_SCTP_DBG_OBJCNT is not set # CONFIG_SCTP_DEFAULT_COOKIE_HMAC_MD5 is not set CONFIG_SCTP_DEFAULT_COOKIE_HMAC_SHA1=y @@ -1321,6 +1320,7 @@ CONFIG_RDS_TCP=m # CONFIG_RDS_DEBUG is not set CONFIG_TIPC=m CONFIG_TIPC_MEDIA_UDP=y +CONFIG_TIPC_DIAG=m CONFIG_ATM=m CONFIG_ATM_CLIP=m # CONFIG_ATM_CLIP_NO_ICMP is not set @@ -1448,6 +1448,7 @@ CONFIG_NET_EMATCH_META=m CONFIG_NET_EMATCH_TEXT=m CONFIG_NET_EMATCH_CANID=m CONFIG_NET_EMATCH_IPSET=m +CONFIG_NET_EMATCH_IPT=m CONFIG_NET_CLS_ACT=y CONFIG_NET_ACT_POLICE=m CONFIG_NET_ACT_GACT=m @@ -1505,7 +1506,6 @@ CONFIG_NET_FLOW_LIMIT=y # Network testing # CONFIG_NET_PKTGEN=m -CONFIG_NET_TCPPROBE=m CONFIG_NET_DROP_MONITOR=m CONFIG_HAMRADIO=y @@ -1624,7 +1624,6 @@ CONFIG_BT_HCIUART_ATH3K=y CONFIG_BT_HCIUART_LL=y CONFIG_BT_HCIUART_3WIRE=y CONFIG_BT_HCIUART_INTEL=y -CONFIG_BT_HCIUART_BCM=y CONFIG_BT_HCIUART_QCA=y CONFIG_BT_HCIUART_AG6XX=y CONFIG_BT_HCIUART_MRVL=y @@ -1634,12 +1633,12 @@ CONFIG_BT_HCIBFUSB=m CONFIG_BT_HCIDTL1=m CONFIG_BT_HCIBT3C=m CONFIG_BT_HCIBLUECARD=m -CONFIG_BT_HCIBTUART=m CONFIG_BT_HCIVHCI=m CONFIG_BT_MRVL=m CONFIG_BT_MRVL_SDIO=m CONFIG_BT_ATH3K=m CONFIG_BT_WILINK=m +CONFIG_BT_HCIRSI=m CONFIG_AF_RXRPC=m CONFIG_AF_RXRPC_IPV6=y # CONFIG_AF_RXRPC_INJECT_LOSS is not set @@ -1762,7 +1761,7 @@ CONFIG_DEVTMPFS=y # CONFIG_STANDALONE is not set CONFIG_PREVENT_FIRMWARE_BUILD=y CONFIG_FW_LOADER=y -CONFIG_FIRMWARE_IN_KERNEL=y +# CONFIG_FIRMWARE_IN_KERNEL is not set CONFIG_EXTRA_FIRMWARE="" CONFIG_FW_LOADER_USER_HELPER=y # CONFIG_FW_LOADER_USER_HELPER_FALLBACK is not set @@ -1887,6 +1886,11 @@ CONFIG_MTD_BLOCK2MTD=m CONFIG_MTD_DOCG3=m CONFIG_BCH_CONST_M=14 CONFIG_BCH_CONST_T=4 +CONFIG_MTD_ONENAND=m +CONFIG_MTD_ONENAND_VERIFY_WRITE=y +CONFIG_MTD_ONENAND_GENERIC=m +# CONFIG_MTD_ONENAND_OTP is not set +CONFIG_MTD_ONENAND_2X_PROGRAM=y CONFIG_MTD_NAND_ECC=m # CONFIG_MTD_NAND_ECC_SMC is not set CONFIG_MTD_NAND=m @@ -1896,7 +1900,6 @@ CONFIG_MTD_SM_COMMON=m CONFIG_MTD_NAND_DENALI=m CONFIG_MTD_NAND_DENALI_PCI=m CONFIG_MTD_NAND_GPIO=m -# CONFIG_MTD_NAND_OMAP_BCH_BUILD is not set CONFIG_MTD_NAND_RICOH=m CONFIG_MTD_NAND_DISKONCHIP=m # CONFIG_MTD_NAND_DISKONCHIP_PROBE_ADVANCED is not set @@ -1907,11 +1910,6 @@ CONFIG_MTD_NAND_CAFE=m CONFIG_MTD_NAND_CS553X=m CONFIG_MTD_NAND_NANDSIM=m CONFIG_MTD_NAND_PLATFORM=m -CONFIG_MTD_ONENAND=m -CONFIG_MTD_ONENAND_VERIFY_WRITE=y -CONFIG_MTD_ONENAND_GENERIC=m -# CONFIG_MTD_ONENAND_OTP is not set -CONFIG_MTD_ONENAND_2X_PROGRAM=y # # LPDDR & LPDDR2 PCM memory drivers @@ -1954,6 +1952,7 @@ CONFIG_PNPACPI=y CONFIG_BLK_DEV=y # CONFIG_BLK_DEV_NULL_BLK is not set CONFIG_BLK_DEV_FD=m +CONFIG_CDROM=y CONFIG_PARIDE=m # @@ -2528,6 +2527,7 @@ CONFIG_MICROCHIP_KSZ=m CONFIG_MICROCHIP_KSZ_SPI_DRIVER=m CONFIG_NET_DSA_MV88E6XXX=m CONFIG_NET_DSA_MV88E6XXX_GLOBAL2=y +CONFIG_NET_DSA_MV88E6XXX_PTP=y CONFIG_NET_DSA_QCA8K=m CONFIG_NET_DSA_SMSC_LAN9303=m CONFIG_NET_DSA_SMSC_LAN9303_I2C=m @@ -2653,12 +2653,12 @@ CONFIG_IXGBEVF=m CONFIG_I40E=m CONFIG_I40E_DCB=y CONFIG_I40EVF=m +CONFIG_ICE=m CONFIG_FM10K=m CONFIG_NET_VENDOR_I825XX=y CONFIG_JME=m CONFIG_NET_VENDOR_MARVELL=y CONFIG_MVMDIO=m -# CONFIG_MVNETA_BM is not set CONFIG_SKGE=m # CONFIG_SKGE_DEBUG is not set CONFIG_SKGE_GENESIS=y @@ -2699,6 +2699,7 @@ CONFIG_NET_VENDOR_MICROCHIP=y CONFIG_ENC28J60=m # CONFIG_ENC28J60_WRITEVERIFY is not set CONFIG_ENCX24J600=m +CONFIG_LAN743X=m CONFIG_NET_VENDOR_MYRI=y CONFIG_MYRI10GE=m CONFIG_FEALNX=m @@ -2709,6 +2710,7 @@ CONFIG_NET_VENDOR_NETRONOME=y CONFIG_NFP=m CONFIG_NFP_APP_FLOWER=y # CONFIG_NFP_DEBUG is not set +CONFIG_NET_VENDOR_NI=y CONFIG_NET_VENDOR_8390=y CONFIG_PCMCIA_AXNET=m CONFIG_NE2000=m @@ -2777,7 +2779,6 @@ CONFIG_SMC9194=m CONFIG_PCMCIA_SMC91C92=m CONFIG_EPIC100=m CONFIG_SMSC911X=m -# CONFIG_SMSC911X_ARCH_HOOKS is not set CONFIG_SMSC9420=m CONFIG_NET_VENDOR_SOCIONEXT=y CONFIG_NET_VENDOR_STMICRO=y @@ -3145,6 +3146,7 @@ CONFIG_RSI_91X=m # CONFIG_RSI_DEBUGFS is not set CONFIG_RSI_SDIO=m CONFIG_RSI_USB=m +CONFIG_RSI_COEX=y CONFIG_WLAN_VENDOR_ST=y CONFIG_CW1200=m CONFIG_CW1200_WLAN_SDIO=m @@ -3186,6 +3188,7 @@ CONFIG_IEEE802154_ATUSB=m CONFIG_IEEE802154_ADF7242=m CONFIG_IEEE802154_CA8210=m # CONFIG_IEEE802154_CA8210_DEBUGFS is not set +CONFIG_IEEE802154_MCR20A=m CONFIG_VMXNET3=m CONFIG_FUJITSU_ES=m CONFIG_THUNDERBOLT_NET=m @@ -3436,6 +3439,7 @@ CONFIG_JOYSTICK_XPAD_LEDS=y CONFIG_JOYSTICK_WALKERA0701=m CONFIG_JOYSTICK_PSXPAD_SPI=m # CONFIG_JOYSTICK_PSXPAD_SPI_FF is not set +CONFIG_JOYSTICK_PXRC=m CONFIG_INPUT_TABLET=y CONFIG_TABLET_USB_ACECAD=m CONFIG_TABLET_USB_AIPTEK=m @@ -3597,6 +3601,7 @@ CONFIG_INPUT_SOC_BUTTON_ARRAY=m CONFIG_INPUT_DRV260X_HAPTICS=m CONFIG_INPUT_DRV2665_HAPTICS=m CONFIG_INPUT_DRV2667_HAPTICS=m +CONFIG_INPUT_RAVE_SP_PWRBUTTON=m CONFIG_RMI4_CORE=m CONFIG_RMI4_I2C=m CONFIG_RMI4_SPI=m @@ -3786,7 +3791,7 @@ CONFIG_TCG_TIS_I2C_NUVOTON=m CONFIG_TCG_NSC=m CONFIG_TCG_ATMEL=m CONFIG_TCG_INFINEON=m -CONFIG_TCG_CRB=m +CONFIG_TCG_CRB=y CONFIG_TCG_VTPM_PROXY=m CONFIG_TCG_TIS_ST33ZP24=m CONFIG_TCG_TIS_ST33ZP24_I2C=m @@ -3944,7 +3949,7 @@ CONFIG_HSI_BOARDINFO=y # HSI clients # CONFIG_HSI_CHAR=m -CONFIG_PPS=m +CONFIG_PPS=y # CONFIG_PPS_DEBUG is not set # @@ -3962,7 +3967,7 @@ CONFIG_PPS_CLIENT_GPIO=m # # PTP clock support # -CONFIG_PTP_1588_CLOCK=m +CONFIG_PTP_1588_CLOCK=y # # Enable PHYLIB and NETWORK_PHY_TIMESTAMPING to see the additional clocks. @@ -4353,6 +4358,7 @@ CONFIG_SENSORS_XGENE=m CONFIG_SENSORS_ACPI_POWER=m CONFIG_SENSORS_ATK0110=m CONFIG_THERMAL=y +CONFIG_THERMAL_STATISTICS=y CONFIG_THERMAL_EMERGENCY_POWEROFF_DELAY_MS=0 CONFIG_THERMAL_HWMON=y CONFIG_THERMAL_WRITABLE_TRIPS=y @@ -4638,10 +4644,12 @@ CONFIG_IR_SANYO_DECODER=m CONFIG_IR_SHARP_DECODER=m CONFIG_IR_MCE_KBD_DECODER=m CONFIG_IR_XMP_DECODER=m +CONFIG_IR_IMON_DECODER=m CONFIG_RC_DEVICES=y CONFIG_RC_ATI_REMOTE=m CONFIG_IR_ENE=m CONFIG_IR_IMON=m +CONFIG_IR_IMON_RAW=m CONFIG_IR_MCEUSB=m CONFIG_IR_ITE_CIR=m CONFIG_IR_FINTEK=m @@ -5134,10 +5142,8 @@ CONFIG_VIDEO_M52790=m # # soc_camera sensor drivers # -CONFIG_SOC_CAMERA_IMX074=m CONFIG_SOC_CAMERA_MT9M001=m CONFIG_SOC_CAMERA_MT9M111=m -CONFIG_SOC_CAMERA_MT9T031=m CONFIG_SOC_CAMERA_MT9T112=m CONFIG_SOC_CAMERA_MT9V022=m CONFIG_SOC_CAMERA_OV5642=m @@ -5146,6 +5152,11 @@ CONFIG_SOC_CAMERA_OV9640=m CONFIG_SOC_CAMERA_OV9740=m CONFIG_SOC_CAMERA_RJ54N1=m CONFIG_SOC_CAMERA_TW9910=m + +# +# Media SPI Adapters +# +CONFIG_CXD2880_SPI_DRV=m CONFIG_MEDIA_TUNER=m CONFIG_MEDIA_TUNER_SIMPLE=m CONFIG_MEDIA_TUNER_TDA18250=m @@ -5322,7 +5333,6 @@ CONFIG_DVB_ISL6405=m CONFIG_DVB_ISL6421=m CONFIG_DVB_ISL6423=m CONFIG_DVB_A8293=m -CONFIG_DVB_SP2=m CONFIG_DVB_LGS8GXX=m CONFIG_DVB_ATBM8830=m CONFIG_DVB_TDA665x=m @@ -5333,6 +5343,12 @@ CONFIG_DVB_HORUS3A=m CONFIG_DVB_ASCOT2E=m CONFIG_DVB_HELENE=m +# +# Common Interface (EN50221) controller drivers +# +CONFIG_DVB_CXD2099=m +CONFIG_DVB_SP2=m + # # Tools to develop new frontends # @@ -5880,6 +5896,7 @@ CONFIG_SND_SOC_COMPRESS=y CONFIG_SND_SOC_TOPOLOGY=y CONFIG_SND_SOC_ACPI=m CONFIG_SND_SOC_AMD_ACP=m +CONFIG_SND_SOC_AMD_CZ_DA7219MX98357_MACH=m CONFIG_SND_SOC_AMD_CZ_RT5645_MACH=m CONFIG_SND_ATMEL_SOC=m CONFIG_SND_DESIGNWARE_I2S=m @@ -5915,8 +5932,9 @@ CONFIG_SND_SOC_INTEL_SST=m CONFIG_SND_SOC_INTEL_SST_FIRMWARE=m CONFIG_SND_SOC_INTEL_HASWELL=m CONFIG_SND_SOC_INTEL_BAYTRAIL=m -CONFIG_SND_SST_ATOM_HIFI2_PLATFORM_PCI=m CONFIG_SND_SST_ATOM_HIFI2_PLATFORM=m +CONFIG_SND_SST_ATOM_HIFI2_PLATFORM_PCI=m +CONFIG_SND_SST_ATOM_HIFI2_PLATFORM_ACPI=m CONFIG_SND_SOC_INTEL_SKYLAKE_SSP_CLK=m CONFIG_SND_SOC_INTEL_SKYLAKE=m CONFIG_SND_SOC_ACPI_INTEL_MATCH=m @@ -5931,6 +5949,7 @@ CONFIG_SND_SOC_INTEL_BYTCR_RT5651_MACH=m CONFIG_SND_SOC_INTEL_CHT_BSW_RT5672_MACH=m CONFIG_SND_SOC_INTEL_CHT_BSW_RT5645_MACH=m CONFIG_SND_SOC_INTEL_CHT_BSW_MAX98090_TI_MACH=m +CONFIG_SND_SOC_INTEL_CHT_BSW_NAU8824_MACH=m CONFIG_SND_SOC_INTEL_BYT_CHT_DA7213_MACH=m CONFIG_SND_SOC_INTEL_BYT_CHT_ES8316_MACH=m CONFIG_SND_SOC_INTEL_BYT_CHT_NOCODEC_MACH=m @@ -5941,6 +5960,7 @@ CONFIG_SND_SOC_INTEL_BXT_DA7219_MAX98357A_MACH=m CONFIG_SND_SOC_INTEL_BXT_RT298_MACH=m CONFIG_SND_SOC_INTEL_KBL_RT5663_MAX98927_MACH=m CONFIG_SND_SOC_INTEL_KBL_RT5663_RT5514_MAX98927_MACH=m +CONFIG_SND_SOC_INTEL_KBL_DA7219_MAX98357A_MACH=m # # STMicroelectronics STM32 SOC audio support @@ -5961,11 +5981,14 @@ CONFIG_SND_SOC_ADAU1761_I2C=m CONFIG_SND_SOC_ADAU1761_SPI=m CONFIG_SND_SOC_ADAU7002=m CONFIG_SND_SOC_AK4104=m +CONFIG_SND_SOC_AK4458=m CONFIG_SND_SOC_AK4554=m CONFIG_SND_SOC_AK4613=m CONFIG_SND_SOC_AK4642=m CONFIG_SND_SOC_AK5386=m +CONFIG_SND_SOC_AK5558=m CONFIG_SND_SOC_ALC5623=m +CONFIG_SND_SOC_BD28623=m CONFIG_SND_SOC_BT_SCO=m CONFIG_SND_SOC_CS35L32=m CONFIG_SND_SOC_CS35L33=m @@ -6003,12 +6026,15 @@ CONFIG_SND_SOC_INNO_RK3036=m CONFIG_SND_SOC_MAX98090=m CONFIG_SND_SOC_MAX98357A=m CONFIG_SND_SOC_MAX98504=m +CONFIG_SND_SOC_MAX9867=m CONFIG_SND_SOC_MAX98927=m CONFIG_SND_SOC_MAX98373=m CONFIG_SND_SOC_MAX9860=m CONFIG_SND_SOC_MSM8916_WCD_ANALOG=m CONFIG_SND_SOC_MSM8916_WCD_DIGITAL=m CONFIG_SND_SOC_PCM1681=m +CONFIG_SND_SOC_PCM1789=m +CONFIG_SND_SOC_PCM1789_I2C=m CONFIG_SND_SOC_PCM179X=m CONFIG_SND_SOC_PCM179X_I2C=m CONFIG_SND_SOC_PCM179X_SPI=m @@ -6027,7 +6053,6 @@ CONFIG_SND_SOC_RT286=m CONFIG_SND_SOC_RT298=m CONFIG_SND_SOC_RT5514=m CONFIG_SND_SOC_RT5514_SPI=m -# CONFIG_SND_SOC_RT5514_SPI_BUILTIN is not set CONFIG_SND_SOC_RT5616=m CONFIG_SND_SOC_RT5631=m CONFIG_SND_SOC_RT5640=m @@ -6055,6 +6080,7 @@ CONFIG_SND_SOC_TAS5086=m CONFIG_SND_SOC_TAS571X=m CONFIG_SND_SOC_TAS5720=m CONFIG_SND_SOC_TAS6424=m +CONFIG_SND_SOC_TDA7419=m CONFIG_SND_SOC_TFA9879=m CONFIG_SND_SOC_TLV320AIC23=m CONFIG_SND_SOC_TLV320AIC23_I2C=m @@ -6089,6 +6115,7 @@ CONFIG_SND_SOC_WM8974=m CONFIG_SND_SOC_WM8978=m CONFIG_SND_SOC_WM8985=m CONFIG_SND_SOC_ZX_AUD96P22=m +CONFIG_SND_SOC_MAX9759=m CONFIG_SND_SOC_NAU8540=m CONFIG_SND_SOC_NAU8810=m CONFIG_SND_SOC_NAU8824=m @@ -6133,6 +6160,7 @@ CONFIG_HID_CYPRESS=m CONFIG_HID_DRAGONRISE=m CONFIG_DRAGONRISE_FF=y CONFIG_HID_EMS_FF=m +CONFIG_HID_ELAN=m CONFIG_HID_ELECOM=m CONFIG_HID_ELO=m CONFIG_HID_EZKEY=m @@ -6140,6 +6168,7 @@ CONFIG_HID_GEMBIRD=m CONFIG_HID_GFRM=m CONFIG_HID_HOLTEK=m CONFIG_HOLTEK_FF=y +CONFIG_HID_GOOGLE_HAMMER=m CONFIG_HID_GT683R=m CONFIG_HID_KEYTOUCH=m CONFIG_HID_KYE=m @@ -6266,7 +6295,6 @@ CONFIG_USB_EHCI_PCI=y CONFIG_USB_EHCI_HCD_PLATFORM=y CONFIG_USB_OXU210HP_HCD=m CONFIG_USB_ISP116X_HCD=m -CONFIG_USB_ISP1362_HCD=m CONFIG_USB_FOTG210_HCD=m CONFIG_USB_MAX3421_HCD=m CONFIG_USB_OHCI_HCD=y @@ -6574,10 +6602,6 @@ CONFIG_USB_G_DBGP=m # CONFIG_USB_G_DBGP_PRINTK is not set CONFIG_USB_G_DBGP_SERIAL=y CONFIG_USB_G_WEBCAM=m - -# -# USB Power Delivery and Type-C drivers -# CONFIG_TYPEC=m CONFIG_TYPEC_TCPM=m CONFIG_TYPEC_FUSB302=m @@ -6585,8 +6609,15 @@ CONFIG_TYPEC_WCOVE=m CONFIG_TYPEC_UCSI=m CONFIG_UCSI_ACPI=m CONFIG_TYPEC_TPS6598X=m + +# +# USB Type-C Multiplexer/DeMultiplexer Switch support +# +CONFIG_TYPEC_MUX_PI3USB30532=m +CONFIG_USB_ROLES_INTEL_XHCI=m CONFIG_USB_LED_TRIG=y CONFIG_USB_ULPI_BUS=m +CONFIG_USB_ROLE_SWITCH=m CONFIG_UWB=m CONFIG_UWB_HWA=m CONFIG_UWB_WHCI=m @@ -6693,6 +6724,8 @@ CONFIG_LEDS_MENF21BMC=m # LED driver for blink(1) USB RGB LED is under Special HID drivers (HID_THINGM) # CONFIG_LEDS_BLINKM=m +CONFIG_LEDS_MLXCPLD=m +CONFIG_LEDS_MLXREG=m CONFIG_LEDS_USER=m CONFIG_LEDS_NIC78BX=m @@ -6913,7 +6946,6 @@ CONFIG_ASYNC_TX_DMA=y CONFIG_SYNC_FILE=y CONFIG_SW_SYNC=y CONFIG_AUXDISPLAY=y -CONFIG_CHARLCD=m CONFIG_HD44780=m CONFIG_KS0108=m CONFIG_KS0108_PORT=0x378 @@ -6925,6 +6957,7 @@ CONFIG_PANEL=m CONFIG_PANEL_PARPORT=0 CONFIG_PANEL_PROFILE=5 # CONFIG_PANEL_CHANGE_MESSAGE is not set +CONFIG_CHARLCD=m CONFIG_UIO=m CONFIG_UIO_CIF=m # CONFIG_UIO_PDRV_GENIRQ is not set @@ -7295,16 +7328,14 @@ CONFIG_VIDEO_ATOMISP=m CONFIG_VIDEO_ATOMISP_OV5693=m CONFIG_VIDEO_ATOMISP_OV2722=m CONFIG_VIDEO_ATOMISP_GC2235=m -CONFIG_VIDEO_ATOMISP_OV8858=m CONFIG_VIDEO_ATOMISP_MSRLIST_HELPER=m CONFIG_VIDEO_ATOMISP_MT9M114=m CONFIG_VIDEO_ATOMISP_GC0310=m CONFIG_VIDEO_ATOMISP_OV2680=m CONFIG_VIDEO_ATOMISP_LM3554=m CONFIG_I2C_BCM2048=m -CONFIG_DVB_CXD2099=m -CONFIG_LIRC_STAGING=y -CONFIG_LIRC_ZILOG=m +CONFIG_SOC_CAMERA_IMX074=m +CONFIG_SOC_CAMERA_MT9T031=m # # Android @@ -7345,6 +7376,9 @@ CONFIG_MOST_USB=m CONFIG_TYPEC_TCPCI=m CONFIG_DRM_VBOXVIDEO=m CONFIG_PI433=m +CONFIG_MTK_MMC=m +CONFIG_MTK_AEE_KDUMP=y +CONFIG_MTK_MMC_CD_POLL=y CONFIG_X86_PLATFORM_DEVICES=y CONFIG_ACER_WMI=m CONFIG_ACER_WIRELESS=m @@ -7441,6 +7475,7 @@ CONFIG_COMMON_CLK=y # CONFIG_COMMON_CLK_WM831X=m CONFIG_COMMON_CLK_SI5351=m +CONFIG_COMMON_CLK_SI544=m CONFIG_COMMON_CLK_CDCE706=m CONFIG_COMMON_CLK_CS2000_CP=m CONFIG_COMMON_CLK_S2MPS11=m @@ -7826,6 +7861,7 @@ CONFIG_HID_SENSOR_PROX=m CONFIG_JSA1212=m CONFIG_RPR0521=m CONFIG_LTR501=m +CONFIG_LV0104CS=m CONFIG_MAX44000=m CONFIG_OPT3001=m CONFIG_PA12203001=m @@ -7884,9 +7920,11 @@ CONFIG_IIO_SYSFS_TRIGGER=m # # Digital potentiometers # +CONFIG_AD5272=m # CONFIG_DS1803 is not set CONFIG_MAX5481=m # CONFIG_MAX5487 is not set +CONFIG_MCP4018=m # CONFIG_MCP4131 is not set # CONFIG_MCP4531 is not set # CONFIG_TPL0102 is not set @@ -7934,6 +7972,7 @@ CONFIG_SRF08=m # CONFIG_MAXIM_THERMOCOUPLE is not set CONFIG_HID_SENSOR_TEMP=m CONFIG_MLX90614=m +CONFIG_MLX90632=m CONFIG_TMP006=m CONFIG_TMP007=m CONFIG_TSYS01=m @@ -8039,9 +8078,14 @@ CONFIG_ND_BLK=y CONFIG_ND_CLAIM=y CONFIG_ND_BTT=y CONFIG_BTT=y +CONFIG_DAX_DRIVER=y CONFIG_DAX=y CONFIG_DEV_DAX=m CONFIG_NVMEM=y + +# +# HW tracing support +# CONFIG_STM=m CONFIG_STM_DUMMY=m CONFIG_STM_SOURCE_CONSOLE=m @@ -8049,6 +8093,7 @@ CONFIG_STM_SOURCE_HEARTBEAT=m # CONFIG_STM_SOURCE_FTRACE is not set CONFIG_INTEL_TH=m CONFIG_INTEL_TH_PCI=m +CONFIG_INTEL_TH_ACPI=m CONFIG_INTEL_TH_GTH=m CONFIG_INTEL_TH_STH=m CONFIG_INTEL_TH_MSU=m @@ -8062,10 +8107,7 @@ CONFIG_FPGA_MGR_XILINX_SPI=m CONFIG_FPGA_BRIDGE=m CONFIG_XILINX_PR_DECOUPLER=m CONFIG_FPGA_REGION=m -CONFIG_FSI=m -CONFIG_FSI_MASTER_GPIO=m -CONFIG_FSI_MASTER_HUB=m -CONFIG_FSI_SCOM=m +CONFIG_PM_OPP=y CONFIG_SIOX=m CONFIG_SIOX_BUS_GPIO=m CONFIG_SLIMBUS=m @@ -8198,6 +8240,7 @@ CONFIG_OVERLAY_FS=m # CONFIG_OVERLAY_FS_REDIRECT_DIR is not set CONFIG_OVERLAY_FS_REDIRECT_ALWAYS_FOLLOW=y # CONFIG_OVERLAY_FS_INDEX is not set +CONFIG_OVERLAY_FS_XINO_AUTO=y # # Caches @@ -8320,9 +8363,15 @@ CONFIG_ROMFS_BACKED_BY_BOTH=y CONFIG_ROMFS_ON_BLOCK=y CONFIG_ROMFS_ON_MTD=y CONFIG_PSTORE=y -CONFIG_PSTORE_ZLIB_COMPRESS=y +CONFIG_PSTORE_DEFLATE_COMPRESS=y # CONFIG_PSTORE_LZO_COMPRESS is not set # CONFIG_PSTORE_LZ4_COMPRESS is not set +CONFIG_PSTORE_LZ4HC_COMPRESS=m +# CONFIG_PSTORE_842_COMPRESS is not set +CONFIG_PSTORE_COMPRESS=y +CONFIG_PSTORE_DEFLATE_COMPRESS_DEFAULT=y +# CONFIG_PSTORE_LZ4HC_COMPRESS_DEFAULT is not set +CONFIG_PSTORE_COMPRESS_DEFAULT="deflate" # CONFIG_PSTORE_CONSOLE is not set # CONFIG_PSTORE_PMSG is not set # CONFIG_PSTORE_FTRACE is not set @@ -8546,11 +8595,13 @@ CONFIG_DEBUG_KERNEL=y # Debug Lockups and Hangs # CONFIG_LOCKUP_DETECTOR=y +CONFIG_SOFTLOCKUP_DETECTOR=y +# CONFIG_BOOTPARAM_SOFTLOCKUP_PANIC is not set +CONFIG_BOOTPARAM_SOFTLOCKUP_PANIC_VALUE=0 +CONFIG_HARDLOCKUP_DETECTOR_PERF=y CONFIG_HARDLOCKUP_DETECTOR=y # CONFIG_BOOTPARAM_HARDLOCKUP_PANIC is not set CONFIG_BOOTPARAM_HARDLOCKUP_PANIC_VALUE=0 -# CONFIG_BOOTPARAM_SOFTLOCKUP_PANIC is not set -CONFIG_BOOTPARAM_SOFTLOCKUP_PANIC_VALUE=0 CONFIG_DETECT_HUNG_TASK=y CONFIG_DEFAULT_HUNG_TASK_TIMEOUT=120 # CONFIG_BOOTPARAM_HUNG_TASK_PANIC is not set @@ -8569,13 +8620,15 @@ CONFIG_SCHEDSTATS=y # # Lock Debugging (spinlocks, mutexes, etc...) # +CONFIG_LOCK_DEBUGGING_SUPPORT=y +# CONFIG_PROVE_LOCKING is not set +# CONFIG_LOCK_STAT is not set # CONFIG_DEBUG_RT_MUTEXES is not set # CONFIG_DEBUG_SPINLOCK is not set # CONFIG_DEBUG_MUTEXES is not set # CONFIG_DEBUG_WW_MUTEX_SLOWPATH is not set +# CONFIG_DEBUG_RWSEMS is not set # CONFIG_DEBUG_LOCK_ALLOC is not set -# CONFIG_PROVE_LOCKING is not set -# CONFIG_LOCK_STAT is not set # CONFIG_DEBUG_ATOMIC_SLEEP is not set # CONFIG_DEBUG_LOCKING_API_SELFTESTS is not set # CONFIG_LOCK_TORTURE_TEST is not set @@ -8855,6 +8908,7 @@ CONFIG_CRYPTO_ECHAINIV=m # Block modes # CONFIG_CRYPTO_CBC=y +CONFIG_CRYPTO_CFB=m CONFIG_CRYPTO_CTR=y CONFIG_CRYPTO_CTS=y CONFIG_CRYPTO_ECB=y @@ -8920,6 +8974,8 @@ CONFIG_CRYPTO_CHACHA20=m CONFIG_CRYPTO_SEED=m CONFIG_CRYPTO_SERPENT=m CONFIG_CRYPTO_SERPENT_SSE2_586=m +CONFIG_CRYPTO_SM4=m +CONFIG_CRYPTO_SPECK=m CONFIG_CRYPTO_TEA=m CONFIG_CRYPTO_TWOFISH=m CONFIG_CRYPTO_TWOFISH_COMMON=m @@ -8928,7 +8984,7 @@ CONFIG_CRYPTO_TWOFISH_586=m # # Compression # -CONFIG_CRYPTO_DEFLATE=m +CONFIG_CRYPTO_DEFLATE=y CONFIG_CRYPTO_LZO=y CONFIG_CRYPTO_842=m CONFIG_CRYPTO_LZ4=y @@ -8955,7 +9011,6 @@ CONFIG_CRYPTO_DEV_PADLOCK=y CONFIG_CRYPTO_DEV_PADLOCK_AES=m CONFIG_CRYPTO_DEV_PADLOCK_SHA=m CONFIG_CRYPTO_DEV_GEODE=m -# CONFIG_CRYPTO_DEV_FSL_CAAM_CRYPTO_API_DESC is not set CONFIG_CRYPTO_DEV_CCP=y CONFIG_CRYPTO_DEV_CCP_DD=m CONFIG_CRYPTO_DEV_SP_CCP=y @@ -8969,6 +9024,7 @@ CONFIG_CRYPTO_DEV_QAT_DH895xCCVF=m # CONFIG_CRYPTO_DEV_QAT_C62XVF is not set CONFIG_CRYPTO_DEV_CHELSIO=m # CONFIG_CHELSIO_IPSEC_INLINE is not set +CONFIG_CRYPTO_DEV_CHELSIO_TLS=m CONFIG_CRYPTO_DEV_VIRTIO=m CONFIG_ASYMMETRIC_KEY_TYPE=y CONFIG_ASYMMETRIC_PUBLIC_KEY_SUBTYPE=y diff --git a/kernel-nrj-desktop-i586.config b/kernel-nrj-desktop-i586.config index 54adfdd..c2ba834 100644 --- a/kernel-nrj-desktop-i586.config +++ b/kernel-nrj-desktop-i586.config @@ -118,6 +118,7 @@ CONFIG_INFINIBAND_ADDR_TRANS=y CONFIG_INFINIBAND_ADDR_TRANS_CONFIGFS=y CONFIG_INFINIBAND_MTHCA=m # CONFIG_INFINIBAND_MTHCA_DEBUG is not set +# CONFIG_INFINIBAND_EXP_LEGACY_VERBS_NEW_UAPI is not set CONFIG_INFINIBAND_CXGB3=m # CONFIG_INFINIBAND_CXGB3_DEBUG is not set CONFIG_INFINIBAND_CXGB4=m diff --git a/kernel-nrj-desktop-x86_64.config b/kernel-nrj-desktop-x86_64.config index 9aff12a..894b2b5 100644 --- a/kernel-nrj-desktop-x86_64.config +++ b/kernel-nrj-desktop-x86_64.config @@ -26,6 +26,7 @@ CONFIG_INFINIBAND_USNIC=m CONFIG_INFINIBAND_IPOIB=m # CONFIG_INFINIBAND_IPOIB_CM is not set # CONFIG_INFINIBAND_IPOIB_DEBUG is not set +# CONFIG_INFINIBAND_EXP_LEGACY_VERBS_NEW_UAPI is not set CONFIG_INFINIBAND_SRP=m CONFIG_INFINIBAND_SRPT=m CONFIG_INFINIBAND_ISER=m diff --git a/kernel-x86_64.config b/kernel-x86_64.config index daf029a..d68aa3c 100644 --- a/kernel-x86_64.config +++ b/kernel-x86_64.config @@ -1,6 +1,6 @@ # # Automatically generated file; DO NOT EDIT. -# Linux/x86 4.16.x-nrj-desktop Kernel Configuration +# Linux/x86 4.17.x-nrj-desktop Kernel Configuration # CONFIG_64BIT=y CONFIG_X86_64=y @@ -200,7 +200,6 @@ CONFIG_SHMEM=y CONFIG_AIO=y CONFIG_ADVISE_SYSCALLS=y CONFIG_USERFAULTFD=y -CONFIG_PCI_QUIRKS=y CONFIG_MEMBARRIER=y # CONFIG_EMBEDDED is not set # CONFIG_PC104 is not set @@ -583,6 +582,7 @@ CONFIG_ACPI_LEGACY_TABLES_LOOKUP=y CONFIG_ACPI_SYSTEM_POWER_STATES_SUPPORT=y # CONFIG_ACPI_DEBUGGER is not set CONFIG_ACPI_SPCR_TABLE=y +CONFIG_ACPI_LPIT=y CONFIG_ACPI_SLEEP=y # CONFIG_ACPI_PROCFS_POWER is not set CONFIG_ACPI_REV_OVERRIDE_POSSIBLE=y @@ -592,6 +592,7 @@ CONFIG_ACPI_BATTERY=y CONFIG_ACPI_BUTTON=y CONFIG_ACPI_VIDEO=m CONFIG_ACPI_FAN=y +CONFIG_ACPI_TAD=m CONFIG_ACPI_DOCK=y CONFIG_ACPI_CPU_FREQ_PSS=y CONFIG_ACPI_PROCESSOR_CSTATE=y @@ -686,6 +687,7 @@ CONFIG_PCI_DIRECT=y CONFIG_PCI_MMCONFIG=y CONFIG_PCI_XEN=y CONFIG_PCI_DOMAINS=y +CONFIG_MMCONF_FAM10H=y # CONFIG_PCI_CNB20LE_QUIRK is not set CONFIG_PCIEPORTBUS=y CONFIG_HOTPLUG_PCI_PCIE=y @@ -704,6 +706,7 @@ CONFIG_PCIE_PTM=y CONFIG_PCI_BUS_ADDR_T_64BIT=y CONFIG_PCI_MSI=y CONFIG_PCI_MSI_IRQ_DOMAIN=y +CONFIG_PCI_QUIRKS=y # CONFIG_PCI_DEBUG is not set # CONFIG_PCI_REALLOC_ENABLE_AUTO is not set CONFIG_PCI_STUB=m @@ -845,6 +848,7 @@ CONFIG_NET_IPGRE_DEMUX=m CONFIG_NET_IP_TUNNEL=m CONFIG_NET_IPGRE=m CONFIG_NET_IPGRE_BROADCAST=y +CONFIG_IP_MROUTE_COMMON=y CONFIG_IP_MROUTE=y CONFIG_IP_MROUTE_MULTIPLE_TABLES=y CONFIG_IP_PIMSM_V1=y @@ -984,8 +988,8 @@ CONFIG_NF_NAT_TFTP=m CONFIG_NF_NAT_REDIRECT=m CONFIG_NETFILTER_SYNPROXY=m CONFIG_NF_TABLES=m -CONFIG_NF_TABLES_INET=m -CONFIG_NF_TABLES_NETDEV=m +CONFIG_NF_TABLES_INET=y +CONFIG_NF_TABLES_NETDEV=y CONFIG_NFT_EXTHDR=m CONFIG_NFT_META=m CONFIG_NFT_RT=m @@ -1171,12 +1175,12 @@ CONFIG_IP_VS_PE_SIP=m CONFIG_NF_DEFRAG_IPV4=m CONFIG_NF_CONNTRACK_IPV4=m CONFIG_NF_SOCKET_IPV4=m -CONFIG_NF_TABLES_IPV4=m +CONFIG_NF_TABLES_IPV4=y CONFIG_NFT_CHAIN_ROUTE_IPV4=m CONFIG_NFT_REJECT_IPV4=m CONFIG_NFT_DUP_IPV4=m CONFIG_NFT_FIB_IPV4=m -CONFIG_NF_TABLES_ARP=m +CONFIG_NF_TABLES_ARP=y CONFIG_NF_FLOW_TABLE_IPV4=m CONFIG_NF_DUP_IPV4=m CONFIG_NF_LOG_ARP=m @@ -1219,8 +1223,11 @@ CONFIG_IP_NF_ARP_MANGLE=m CONFIG_NF_DEFRAG_IPV6=m CONFIG_NF_CONNTRACK_IPV6=m CONFIG_NF_SOCKET_IPV6=m -CONFIG_NF_TABLES_IPV6=m +CONFIG_NF_TABLES_IPV6=y CONFIG_NFT_CHAIN_ROUTE_IPV6=m +CONFIG_NFT_CHAIN_NAT_IPV6=m +CONFIG_NFT_MASQ_IPV6=m +CONFIG_NFT_REDIR_IPV6=m CONFIG_NFT_REJECT_IPV6=m CONFIG_NFT_DUP_IPV6=m CONFIG_NFT_FIB_IPV6=m @@ -1229,10 +1236,7 @@ CONFIG_NF_DUP_IPV6=m CONFIG_NF_REJECT_IPV6=m CONFIG_NF_LOG_IPV6=m CONFIG_NF_NAT_IPV6=m -CONFIG_NFT_CHAIN_NAT_IPV6=m CONFIG_NF_NAT_MASQUERADE_IPV6=m -CONFIG_NFT_MASQ_IPV6=m -CONFIG_NFT_REDIR_IPV6=m CONFIG_IP6_NF_IPTABLES=m CONFIG_IP6_NF_MATCH_AH=m CONFIG_IP6_NF_MATCH_EUI64=m @@ -1259,7 +1263,7 @@ CONFIG_IP6_NF_TARGET_NPT=m # DECnet: Netfilter Configuration # CONFIG_DECNET_NF_GRABULATOR=m -CONFIG_NF_TABLES_BRIDGE=m +CONFIG_NF_TABLES_BRIDGE=y CONFIG_NFT_BRIDGE_META=m CONFIG_NFT_BRIDGE_REJECT=m CONFIG_NF_LOG_BRIDGE=m @@ -1297,9 +1301,7 @@ CONFIG_INET_DCCP_DIAG=m # DCCP Kernel Hacking # # CONFIG_IP_DCCP_DEBUG is not set -CONFIG_NET_DCCPPROBE=m CONFIG_IP_SCTP=m -CONFIG_NET_SCTPPROBE=m # CONFIG_SCTP_DBG_OBJCNT is not set # CONFIG_SCTP_DEFAULT_COOKIE_HMAC_MD5 is not set CONFIG_SCTP_DEFAULT_COOKIE_HMAC_SHA1=y @@ -1311,6 +1313,7 @@ CONFIG_RDS=m CONFIG_RDS_TCP=m # CONFIG_RDS_DEBUG is not set CONFIG_TIPC=m +CONFIG_TIPC_DIAG=m CONFIG_TIPC_MEDIA_UDP=y CONFIG_ATM=m CONFIG_ATM_CLIP=m @@ -1433,6 +1436,7 @@ CONFIG_NET_EMATCH_META=m CONFIG_NET_EMATCH_TEXT=m CONFIG_NET_EMATCH_CANID=m CONFIG_NET_EMATCH_IPSET=m +CONFIG_NET_EMATCH_IPT=m CONFIG_NET_CLS_ACT=y CONFIG_NET_ACT_POLICE=m CONFIG_NET_ACT_GACT=m @@ -1491,7 +1495,6 @@ CONFIG_NET_FLOW_LIMIT=y # Network testing # CONFIG_NET_PKTGEN=m -CONFIG_NET_TCPPROBE=m CONFIG_NET_DROP_MONITOR=m CONFIG_HAMRADIO=y @@ -1613,12 +1616,12 @@ CONFIG_BT_HCIBFUSB=m CONFIG_BT_HCIDTL1=m CONFIG_BT_HCIBT3C=m CONFIG_BT_HCIBLUECARD=m -CONFIG_BT_HCIBTUART=m CONFIG_BT_HCIVHCI=m CONFIG_BT_MRVL=m CONFIG_BT_MRVL_SDIO=m CONFIG_BT_ATH3K=m CONFIG_BT_WILINK=m +CONFIG_BT_HCIRSI=m CONFIG_AF_RXRPC=m CONFIG_AF_RXRPC_IPV6=y # CONFIG_AF_RXRPC_INJECT_LOSS is not set @@ -1742,7 +1745,7 @@ CONFIG_DEVTMPFS=y # CONFIG_STANDALONE is not set CONFIG_PREVENT_FIRMWARE_BUILD=y CONFIG_FW_LOADER=y -CONFIG_FIRMWARE_IN_KERNEL=y +# CONFIG_FIRMWARE_IN_KERNEL is not set CONFIG_EXTRA_FIRMWARE="" CONFIG_FW_LOADER_USER_HELPER=y # CONFIG_FW_LOADER_USER_HELPER_FALLBACK is not set @@ -1867,6 +1870,11 @@ CONFIG_MTD_BLOCK2MTD=m CONFIG_MTD_DOCG3=m CONFIG_BCH_CONST_M=14 CONFIG_BCH_CONST_T=4 +CONFIG_MTD_ONENAND=m +CONFIG_MTD_ONENAND_VERIFY_WRITE=y +CONFIG_MTD_ONENAND_GENERIC=m +# CONFIG_MTD_ONENAND_OTP is not set +CONFIG_MTD_ONENAND_2X_PROGRAM=y CONFIG_MTD_NAND_ECC=m # CONFIG_MTD_NAND_ECC_SMC is not set CONFIG_MTD_NAND=m @@ -1886,11 +1894,6 @@ CONFIG_MTD_NAND_DOCG4=m CONFIG_MTD_NAND_CAFE=m CONFIG_MTD_NAND_NANDSIM=m CONFIG_MTD_NAND_PLATFORM=m -CONFIG_MTD_ONENAND=m -CONFIG_MTD_ONENAND_VERIFY_WRITE=y -CONFIG_MTD_ONENAND_GENERIC=m -# CONFIG_MTD_ONENAND_OTP is not set -CONFIG_MTD_ONENAND_2X_PROGRAM=y # # LPDDR & LPDDR2 PCM memory drivers @@ -1930,6 +1933,7 @@ CONFIG_PNPACPI=y CONFIG_BLK_DEV=y # CONFIG_BLK_DEV_NULL_BLK is not set CONFIG_BLK_DEV_FD=m +CONFIG_CDROM=y CONFIG_PARIDE=m # @@ -2495,6 +2499,7 @@ CONFIG_NET_DSA_MV88E6060=m # CONFIG_MICROCHIP_KSZ is not set CONFIG_NET_DSA_MV88E6XXX=m CONFIG_NET_DSA_MV88E6XXX_GLOBAL2=y +CONFIG_NET_DSA_MV88E6XXX_PTP=y CONFIG_NET_DSA_QCA8K=m CONFIG_NET_DSA_SMSC_LAN9303=m CONFIG_NET_DSA_SMSC_LAN9303_I2C=m @@ -2626,6 +2631,7 @@ CONFIG_IXGBEVF=m CONFIG_I40E=m CONFIG_I40E_DCB=y CONFIG_I40EVF=m +CONFIG_ICE=m CONFIG_FM10K=m CONFIG_NET_VENDOR_I825XX=y CONFIG_JME=m @@ -2669,6 +2675,7 @@ CONFIG_NET_VENDOR_MICROCHIP=y CONFIG_ENC28J60=m # CONFIG_ENC28J60_WRITEVERIFY is not set CONFIG_ENCX24J600=m +CONFIG_LAN743X=m CONFIG_NET_VENDOR_MYRI=y CONFIG_MYRI10GE=m CONFIG_MYRI10GE_DCA=y @@ -2680,6 +2687,7 @@ CONFIG_NET_VENDOR_NETRONOME=y CONFIG_NFP=m # CONFIG_NFP_APP_FLOWER is not set # CONFIG_NFP_DEBUG is not set +CONFIG_NET_VENDOR_NI=y CONFIG_NET_VENDOR_8390=y CONFIG_PCMCIA_AXNET=m CONFIG_NE2K_PCI=m @@ -3124,6 +3132,7 @@ CONFIG_RSI_91X=m # CONFIG_RSI_DEBUGFS is not set CONFIG_RSI_SDIO=m CONFIG_RSI_USB=m +CONFIG_RSI_COEX=y CONFIG_WLAN_VENDOR_ST=y CONFIG_CW1200=m CONFIG_CW1200_WLAN_SDIO=m @@ -3165,6 +3174,7 @@ CONFIG_IEEE802154_ATUSB=m CONFIG_IEEE802154_ADF7242=m CONFIG_IEEE802154_CA8210=m # CONFIG_IEEE802154_CA8210_DEBUGFS is not set +CONFIG_IEEE802154_MCR20A=m CONFIG_XEN_NETDEV_FRONTEND=y CONFIG_XEN_NETDEV_BACKEND=m CONFIG_VMXNET3=m @@ -3403,6 +3413,7 @@ CONFIG_JOYSTICK_XPAD_LEDS=y CONFIG_JOYSTICK_WALKERA0701=m CONFIG_JOYSTICK_PSXPAD_SPI=m # CONFIG_JOYSTICK_PSXPAD_SPI_FF is not set +CONFIG_JOYSTICK_PXRC=m CONFIG_INPUT_TABLET=y CONFIG_TABLET_USB_ACECAD=m CONFIG_TABLET_USB_AIPTEK=m @@ -3565,6 +3576,7 @@ CONFIG_INPUT_SOC_BUTTON_ARRAY=m CONFIG_INPUT_DRV260X_HAPTICS=m CONFIG_INPUT_DRV2665_HAPTICS=m CONFIG_INPUT_DRV2667_HAPTICS=m +CONFIG_INPUT_RAVE_SP_PWRBUTTON=m CONFIG_RMI4_CORE=m CONFIG_RMI4_I2C=m CONFIG_RMI4_SPI=m @@ -3745,7 +3757,7 @@ CONFIG_TCG_NSC=m CONFIG_TCG_ATMEL=m CONFIG_TCG_INFINEON=m CONFIG_TCG_XEN=m -CONFIG_TCG_CRB=m +CONFIG_TCG_CRB=y CONFIG_TCG_VTPM_PROXY=m CONFIG_TCG_TIS_ST33ZP24=m CONFIG_TCG_TIS_ST33ZP24_I2C=m @@ -3978,6 +3990,7 @@ CONFIG_GPIO_GPIO_MM=m CONFIG_GPIO_IT87=m CONFIG_GPIO_SCH=m CONFIG_GPIO_SCH311X=m +CONFIG_GPIO_WINBOND=m CONFIG_GPIO_WS16C48=m # @@ -4319,6 +4332,7 @@ CONFIG_SENSORS_XGENE=m CONFIG_SENSORS_ACPI_POWER=m CONFIG_SENSORS_ATK0110=m CONFIG_THERMAL=y +CONFIG_THERMAL_STATISTICS=y CONFIG_THERMAL_EMERGENCY_POWEROFF_DELAY_MS=0 CONFIG_THERMAL_HWMON=y CONFIG_THERMAL_WRITABLE_TRIPS=y @@ -4589,6 +4603,7 @@ CONFIG_REGULATOR=y CONFIG_REGULATOR_FIXED_VOLTAGE=m CONFIG_REGULATOR_VIRTUAL_CONSUMER=m CONFIG_REGULATOR_USERSPACE_CONSUMER=m +CONFIG_REGULATOR_88PG86X=m CONFIG_REGULATOR_88PM800=m CONFIG_REGULATOR_88PM8607=m CONFIG_REGULATOR_ACT8865=m @@ -4685,11 +4700,13 @@ CONFIG_IR_SANYO_DECODER=m CONFIG_IR_SHARP_DECODER=m CONFIG_IR_MCE_KBD_DECODER=m CONFIG_IR_XMP_DECODER=m +CONFIG_IR_IMON_DECODER=m CONFIG_RC_DEVICES=y CONFIG_RC_ATI_REMOTE=m CONFIG_IR_ENE=m CONFIG_IR_HIX5HD2=m CONFIG_IR_IMON=m +CONFIG_IR_IMON_RAW=m CONFIG_IR_MCEUSB=m CONFIG_IR_ITE_CIR=m CONFIG_IR_FINTEK=m @@ -5181,6 +5198,11 @@ CONFIG_SOC_CAMERA_OV9640=m CONFIG_SOC_CAMERA_OV9740=m CONFIG_SOC_CAMERA_RJ54N1=m CONFIG_SOC_CAMERA_TW9910=m + +# +# Media SPI Adapters +# +CONFIG_CXD2880_SPI_DRV=m CONFIG_MEDIA_TUNER=m CONFIG_MEDIA_TUNER_SIMPLE=m CONFIG_MEDIA_TUNER_TDA18250=m @@ -5357,7 +5379,6 @@ CONFIG_DVB_ISL6405=m CONFIG_DVB_ISL6421=m CONFIG_DVB_ISL6423=m CONFIG_DVB_A8293=m -CONFIG_DVB_SP2=m CONFIG_DVB_LGS8GXX=m CONFIG_DVB_ATBM8830=m CONFIG_DVB_TDA665x=m @@ -5368,6 +5389,12 @@ CONFIG_DVB_HORUS3A=m CONFIG_DVB_ASCOT2E=m CONFIG_DVB_HELENE=m +# +# Common Interface (EN50221) controller drivers +# +CONFIG_DVB_CXD2099=m +CONFIG_DVB_SP2=m + # # Tools to develop new frontends # @@ -5869,6 +5896,7 @@ CONFIG_SND_SOC_COMPRESS=y CONFIG_SND_SOC_TOPOLOGY=y CONFIG_SND_SOC_ACPI=m CONFIG_SND_SOC_AMD_ACP=m +CONFIG_SND_SOC_AMD_CZ_DA7219MX98357_MACH=m CONFIG_SND_SOC_AMD_CZ_RT5645_MACH=m CONFIG_SND_ATMEL_SOC=m CONFIG_SND_DESIGNWARE_I2S=m @@ -5904,8 +5932,9 @@ CONFIG_SND_SOC_INTEL_SST=m CONFIG_SND_SOC_INTEL_SST_FIRMWARE=m CONFIG_SND_SOC_INTEL_HASWELL=m CONFIG_SND_SOC_INTEL_BAYTRAIL=m -CONFIG_SND_SST_ATOM_HIFI2_PLATFORM_PCI=m CONFIG_SND_SST_ATOM_HIFI2_PLATFORM=m +CONFIG_SND_SST_ATOM_HIFI2_PLATFORM_PCI=m +CONFIG_SND_SST_ATOM_HIFI2_PLATFORM_ACPI=m CONFIG_SND_SOC_INTEL_SKYLAKE_SSP_CLK=m CONFIG_SND_SOC_INTEL_SKYLAKE=m CONFIG_SND_SOC_ACPI_INTEL_MATCH=m @@ -5920,6 +5949,7 @@ CONFIG_SND_SOC_INTEL_BYTCR_RT5651_MACH=m CONFIG_SND_SOC_INTEL_CHT_BSW_RT5672_MACH=m CONFIG_SND_SOC_INTEL_CHT_BSW_RT5645_MACH=m CONFIG_SND_SOC_INTEL_CHT_BSW_MAX98090_TI_MACH=m +CONFIG_SND_SOC_INTEL_CHT_BSW_NAU8824_MACH=m CONFIG_SND_SOC_INTEL_BYT_CHT_DA7213_MACH=m CONFIG_SND_SOC_INTEL_BYT_CHT_ES8316_MACH=m # CONFIG_SND_SOC_INTEL_BYT_CHT_NOCODEC_MACH is not set @@ -5930,6 +5960,7 @@ CONFIG_SND_SOC_INTEL_BXT_DA7219_MAX98357A_MACH=m CONFIG_SND_SOC_INTEL_BXT_RT298_MACH=m CONFIG_SND_SOC_INTEL_KBL_RT5663_MAX98927_MACH=m CONFIG_SND_SOC_INTEL_KBL_RT5663_RT5514_MAX98927_MACH=m +CONFIG_SND_SOC_INTEL_KBL_DA7219_MAX98357A_MACH=m # # STMicroelectronics STM32 SOC audio support @@ -5950,11 +5981,14 @@ CONFIG_SND_SOC_ADAU1761_I2C=m CONFIG_SND_SOC_ADAU1761_SPI=m CONFIG_SND_SOC_ADAU7002=m CONFIG_SND_SOC_AK4104=m +CONFIG_SND_SOC_AK4458=m CONFIG_SND_SOC_AK4554=m CONFIG_SND_SOC_AK4613=m CONFIG_SND_SOC_AK4642=m CONFIG_SND_SOC_AK5386=m +CONFIG_SND_SOC_AK5558=m CONFIG_SND_SOC_ALC5623=m +CONFIG_SND_SOC_BD28623=m CONFIG_SND_SOC_BT_SCO=m CONFIG_SND_SOC_CS35L32=m CONFIG_SND_SOC_CS35L33=m @@ -5992,12 +6026,15 @@ CONFIG_SND_SOC_INNO_RK3036=m CONFIG_SND_SOC_MAX98090=m CONFIG_SND_SOC_MAX98357A=m CONFIG_SND_SOC_MAX98504=m +CONFIG_SND_SOC_MAX9867=m CONFIG_SND_SOC_MAX98927=m CONFIG_SND_SOC_MAX98373=m CONFIG_SND_SOC_MAX9860=m CONFIG_SND_SOC_MSM8916_WCD_ANALOG=m CONFIG_SND_SOC_MSM8916_WCD_DIGITAL=m CONFIG_SND_SOC_PCM1681=m +CONFIG_SND_SOC_PCM1789=m +CONFIG_SND_SOC_PCM1789_I2C=m CONFIG_SND_SOC_PCM179X=m CONFIG_SND_SOC_PCM179X_I2C=m CONFIG_SND_SOC_PCM179X_SPI=m @@ -6016,7 +6053,6 @@ CONFIG_SND_SOC_RT286=m CONFIG_SND_SOC_RT298=m CONFIG_SND_SOC_RT5514=m CONFIG_SND_SOC_RT5514_SPI=m -# CONFIG_SND_SOC_RT5514_SPI_BUILTIN is not set CONFIG_SND_SOC_RT5616=m CONFIG_SND_SOC_RT5631=m CONFIG_SND_SOC_RT5640=m @@ -6044,6 +6080,7 @@ CONFIG_SND_SOC_TAS5086=m CONFIG_SND_SOC_TAS571X=m CONFIG_SND_SOC_TAS5720=m CONFIG_SND_SOC_TAS6424=m +CONFIG_SND_SOC_TDA7419=m CONFIG_SND_SOC_TFA9879=m CONFIG_SND_SOC_TLV320AIC23=m CONFIG_SND_SOC_TLV320AIC23_I2C=m @@ -6078,6 +6115,7 @@ CONFIG_SND_SOC_WM8974=m CONFIG_SND_SOC_WM8978=m CONFIG_SND_SOC_WM8985=m CONFIG_SND_SOC_ZX_AUD96P22=m +CONFIG_SND_SOC_MAX9759=m CONFIG_SND_SOC_NAU8540=m CONFIG_SND_SOC_NAU8810=m CONFIG_SND_SOC_NAU8824=m @@ -6122,6 +6160,7 @@ CONFIG_HID_CYPRESS=m CONFIG_HID_DRAGONRISE=m CONFIG_DRAGONRISE_FF=y CONFIG_HID_EMS_FF=m +CONFIG_HID_ELAN=m CONFIG_HID_ELECOM=m CONFIG_HID_ELO=m CONFIG_HID_EZKEY=m @@ -6129,6 +6168,7 @@ CONFIG_HID_GEMBIRD=m CONFIG_HID_GFRM=m CONFIG_HID_HOLTEK=m CONFIG_HOLTEK_FF=y +CONFIG_HID_GOOGLE_HAMMER=m CONFIG_HID_GT683R=m CONFIG_HID_KEYTOUCH=m CONFIG_HID_KYE=m @@ -6260,7 +6300,6 @@ CONFIG_USB_EHCI_PCI=y CONFIG_USB_EHCI_HCD_PLATFORM=y CONFIG_USB_OXU210HP_HCD=m CONFIG_USB_ISP116X_HCD=m -CONFIG_USB_ISP1362_HCD=m CONFIG_USB_FOTG210_HCD=m CONFIG_USB_MAX3421_HCD=m CONFIG_USB_OHCI_HCD=y @@ -6570,18 +6609,21 @@ CONFIG_USB_G_DBGP=m # CONFIG_USB_G_DBGP_PRINTK is not set CONFIG_USB_G_DBGP_SERIAL=y CONFIG_USB_G_WEBCAM=m - -# -# USB Power Delivery and Type-C drivers -# CONFIG_TYPEC=m CONFIG_TYPEC_TCPM=m CONFIG_TYPEC_FUSB302=m CONFIG_TYPEC_UCSI=m CONFIG_UCSI_ACPI=m CONFIG_TYPEC_TPS6598X=m + +# +# USB Type-C Multiplexer/DeMultiplexer Switch support +# +CONFIG_TYPEC_MUX_PI3USB30532=m +CONFIG_USB_ROLES_INTEL_XHCI=m CONFIG_USB_LED_TRIG=y CONFIG_USB_ULPI_BUS=m +CONFIG_USB_ROLE_SWITCH=m CONFIG_UWB=m CONFIG_UWB_HWA=m CONFIG_UWB_WHCI=m @@ -6688,6 +6730,7 @@ CONFIG_LEDS_MENF21BMC=m # CONFIG_LEDS_BLINKM=m CONFIG_LEDS_MLXCPLD=m +CONFIG_LEDS_MLXREG=m CONFIG_LEDS_USER=m CONFIG_LEDS_NIC78BX=m @@ -6910,7 +6953,6 @@ CONFIG_SYNC_FILE=y CONFIG_SW_SYNC=y CONFIG_DCA=m CONFIG_AUXDISPLAY=y -CONFIG_CHARLCD=m CONFIG_HD44780=m CONFIG_KS0108=m CONFIG_KS0108_PORT=0x378 @@ -6922,6 +6964,7 @@ CONFIG_PANEL=m CONFIG_PANEL_PARPORT=0 CONFIG_PANEL_PROFILE=5 # CONFIG_PANEL_CHANGE_MESSAGE is not set +CONFIG_CHARLCD=m CONFIG_UIO=m CONFIG_UIO_CIF=m # CONFIG_UIO_PDRV_GENIRQ is not set @@ -7057,6 +7100,15 @@ CONFIG_VIA_FIR=m CONFIG_MCS_FIR=m CONFIG_IPX=m # CONFIG_IPX_INTERN is not set +CONFIG_NCP_FS=m +CONFIG_NCPFS_PACKET_SIGNING=y +CONFIG_NCPFS_IOCTL_LOCKING=y +CONFIG_NCPFS_STRONG=y +CONFIG_NCPFS_NFS_NS=y +CONFIG_NCPFS_OS2_NS=y +# CONFIG_NCPFS_SMALLDOS is not set +CONFIG_NCPFS_NLS=y +CONFIG_NCPFS_EXTRAS=y CONFIG_PRISM2_USB=m CONFIG_COMEDI=m # CONFIG_COMEDI_DEBUG is not set @@ -7314,7 +7366,6 @@ CONFIG_SPEAKUP_SYNTH_DUMMY=m CONFIG_STAGING_MEDIA=y # CONFIG_INTEL_ATOMISP is not set CONFIG_I2C_BCM2048=m -CONFIG_DVB_CXD2099=m # # Android @@ -7334,7 +7385,6 @@ CONFIG_DGNC=m # CONFIG_GS_FPGABOOT is not set # CONFIG_CRYPTO_SKEIN is not set CONFIG_UNISYSSPAR=y -CONFIG_UNISYS_VISORBUS=m CONFIG_UNISYS_VISORNIC=m CONFIG_UNISYS_VISORINPUT=m CONFIG_UNISYS_VISORHBA=m @@ -7360,6 +7410,9 @@ CONFIG_MOST_USB=m CONFIG_TYPEC_TCPCI=m CONFIG_DRM_VBOXVIDEO=m CONFIG_PI433=m +CONFIG_MTK_MMC=m +CONFIG_MTK_AEE_KDUMP=y +CONFIG_MTK_MMC_CD_POLL=y CONFIG_X86_PLATFORM_DEVICES=y CONFIG_ACER_WMI=m CONFIG_ACER_WIRELESS=m @@ -7437,7 +7490,6 @@ CONFIG_SURFACE_3_BUTTON=m CONFIG_INTEL_PUNIT_IPC=m CONFIG_INTEL_TELEMETRY=m CONFIG_MLX_PLATFORM=m -CONFIG_MLX_CPLD_PLATFORM=m CONFIG_INTEL_TURBO_MAX_3=y CONFIG_SILEAD_DMI=y CONFIG_INTEL_CHTDC_TI_PWRBTN=m @@ -7460,15 +7512,13 @@ CONFIG_COMMON_CLK=y # CONFIG_COMMON_CLK_WM831X=m CONFIG_COMMON_CLK_SI5351=m +CONFIG_COMMON_CLK_SI544=m CONFIG_COMMON_CLK_CDCE706=m CONFIG_COMMON_CLK_CS2000_CP=m CONFIG_COMMON_CLK_S2MPS11=m CONFIG_CLK_TWL6040=m -# CONFIG_COMMON_CLK_NXP is not set CONFIG_COMMON_CLK_PALMAS=m CONFIG_COMMON_CLK_PWM=m -# CONFIG_COMMON_CLK_PXA is not set -# CONFIG_COMMON_CLK_PIC32 is not set # CONFIG_HWSPINLOCK is not set # @@ -7477,11 +7527,6 @@ CONFIG_COMMON_CLK_PWM=m CONFIG_CLKEVT_I8253=y CONFIG_I8253_LOCK=y CONFIG_CLKBLD_I8253=y -# CONFIG_ATMEL_PIT is not set -# CONFIG_SH_TIMER_CMT is not set -# CONFIG_SH_TIMER_MTU2 is not set -# CONFIG_SH_TIMER_TMU is not set -# CONFIG_EM_TIMER_STI is not set CONFIG_MAILBOX=y CONFIG_PCC=y CONFIG_ALTERA_MBOX=m @@ -7535,7 +7580,6 @@ CONFIG_RPMSG_VIRTIO=m # # Qualcomm SoC drivers # -# CONFIG_SUNXI_SRAM is not set CONFIG_SOC_TI=y # @@ -7663,13 +7707,11 @@ CONFIG_MAX1363=m CONFIG_MAX9611=m CONFIG_MCP320X=m CONFIG_MCP3422=m -CONFIG_MEN_Z188_ADC=m CONFIG_NAU7802=m CONFIG_PALMAS_GPADC=m CONFIG_QCOM_VADC_COMMON=m CONFIG_QCOM_SPMI_IADC=m CONFIG_QCOM_SPMI_VADC=m -CONFIG_STX104=m CONFIG_TI_ADC081C=m CONFIG_TI_ADC0832=m CONFIG_TI_ADC084S021=m @@ -7719,7 +7761,6 @@ CONFIG_IIO_ST_SENSORS_CORE=m # # Counters # -CONFIG_104_QUAD_8=m # # Digital to analog converters @@ -7742,7 +7783,6 @@ CONFIG_AD5761=m CONFIG_AD5764=m CONFIG_AD5791=m CONFIG_AD7303=m -CONFIG_CIO_DAC=m CONFIG_AD8801=m CONFIG_DS4424=m CONFIG_M62332=m @@ -7858,6 +7898,7 @@ CONFIG_JSA1212=m CONFIG_RPR0521=m CONFIG_SENSORS_LM3533=m CONFIG_LTR501=m +CONFIG_LV0104CS=m CONFIG_MAX44000=m CONFIG_OPT3001=m CONFIG_PA12203001=m @@ -7916,9 +7957,11 @@ CONFIG_IIO_SYSFS_TRIGGER=m # # Digital potentiometers # +CONFIG_AD5272=m # CONFIG_DS1803 is not set CONFIG_MAX5481=m # CONFIG_MAX5487 is not set +CONFIG_MCP4018=m # CONFIG_MCP4131 is not set # CONFIG_MCP4531 is not set # CONFIG_TPL0102 is not set @@ -7966,6 +8009,7 @@ CONFIG_SRF08=m # CONFIG_MAXIM_THERMOCOUPLE is not set CONFIG_HID_SENSOR_TEMP=m CONFIG_MLX90614=m +CONFIG_MLX90632=m CONFIG_TMP006=m CONFIG_TMP007=m CONFIG_TSYS01=m @@ -8071,9 +8115,14 @@ CONFIG_ND_BLK=y CONFIG_ND_CLAIM=y CONFIG_ND_BTT=y CONFIG_BTT=y +CONFIG_DAX_DRIVER=y CONFIG_DAX=y CONFIG_DEV_DAX=m CONFIG_NVMEM=y + +# +# HW tracing support +# CONFIG_STM=m CONFIG_STM_DUMMY=m CONFIG_STM_SOURCE_CONSOLE=m @@ -8081,6 +8130,7 @@ CONFIG_STM_SOURCE_HEARTBEAT=m CONFIG_STM_SOURCE_FTRACE=m CONFIG_INTEL_TH=m CONFIG_INTEL_TH_PCI=m +CONFIG_INTEL_TH_ACPI=m CONFIG_INTEL_TH_GTH=m CONFIG_INTEL_TH_STH=m CONFIG_INTEL_TH_MSU=m @@ -8094,10 +8144,7 @@ CONFIG_FPGA_MGR_XILINX_SPI=m CONFIG_FPGA_BRIDGE=m CONFIG_XILINX_PR_DECOUPLER=m CONFIG_FPGA_REGION=m -CONFIG_FSI=m -CONFIG_FSI_MASTER_GPIO=m -CONFIG_FSI_MASTER_HUB=m -CONFIG_FSI_SCOM=m +CONFIG_UNISYS_VISORBUS=m CONFIG_SIOX=m CONFIG_SIOX_BUS_GPIO=m CONFIG_SLIMBUS=m @@ -8230,6 +8277,7 @@ CONFIG_OVERLAY_FS=m # CONFIG_OVERLAY_FS_REDIRECT_DIR is not set CONFIG_OVERLAY_FS_REDIRECT_ALWAYS_FOLLOW=y # CONFIG_OVERLAY_FS_INDEX is not set +CONFIG_OVERLAY_FS_XINO_AUTO=y # # Caches @@ -8323,7 +8371,6 @@ CONFIG_UBIFS_FS_ENCRYPTION=y CONFIG_UBIFS_FS_SECURITY=y CONFIG_CRAMFS=y CONFIG_CRAMFS_BLOCKDEV=y -CONFIG_CRAMFS_MTD=y CONFIG_SQUASHFS=y # CONFIG_SQUASHFS_FILE_CACHE is not set CONFIG_SQUASHFS_FILE_DIRECT=y @@ -8353,9 +8400,15 @@ CONFIG_ROMFS_BACKED_BY_BOTH=y CONFIG_ROMFS_ON_BLOCK=y CONFIG_ROMFS_ON_MTD=y CONFIG_PSTORE=y -CONFIG_PSTORE_ZLIB_COMPRESS=y +CONFIG_PSTORE_DEFLATE_COMPRESS=y # CONFIG_PSTORE_LZO_COMPRESS is not set # CONFIG_PSTORE_LZ4_COMPRESS is not set +CONFIG_PSTORE_LZ4HC_COMPRESS=m +# CONFIG_PSTORE_842_COMPRESS is not set +CONFIG_PSTORE_COMPRESS=y +CONFIG_PSTORE_DEFLATE_COMPRESS_DEFAULT=y +# CONFIG_PSTORE_LZ4HC_COMPRESS_DEFAULT is not set +CONFIG_PSTORE_COMPRESS_DEFAULT="deflate" # CONFIG_PSTORE_CONSOLE is not set # CONFIG_PSTORE_PMSG is not set # CONFIG_PSTORE_FTRACE is not set @@ -8444,15 +8497,6 @@ CONFIG_CIFS_DFS_UPCALL=y CONFIG_CIFS_SMB311=y # CONFIG_CIFS_SMB_DIRECT is not set CONFIG_CIFS_FSCACHE=y -CONFIG_NCP_FS=m -CONFIG_NCPFS_PACKET_SIGNING=y -CONFIG_NCPFS_IOCTL_LOCKING=y -CONFIG_NCPFS_STRONG=y -CONFIG_NCPFS_NFS_NS=y -CONFIG_NCPFS_OS2_NS=y -# CONFIG_NCPFS_SMALLDOS is not set -CONFIG_NCPFS_NLS=y -CONFIG_NCPFS_EXTRAS=y CONFIG_CODA_FS=m CONFIG_AFS_FS=m # CONFIG_AFS_DEBUG is not set @@ -8547,7 +8591,7 @@ CONFIG_DEBUG_FS=y # CONFIG_DEBUG_SECTION_MISMATCH is not set CONFIG_SECTION_MISMATCH_WARN_ONLY=y CONFIG_FRAME_POINTER=y -# CONFIG_STACK_VALIDATION is not set +CONFIG_STACK_VALIDATION=y # CONFIG_DEBUG_FORCE_WEAK_PER_CPU is not set CONFIG_MAGIC_SYSRQ=y CONFIG_MAGIC_SYSRQ_DEFAULT_ENABLE=0x1 @@ -8581,11 +8625,14 @@ CONFIG_MEMORY_NOTIFIER_ERROR_INJECT=m # Debug Lockups and Hangs # CONFIG_LOCKUP_DETECTOR=y +CONFIG_SOFTLOCKUP_DETECTOR=y +# CONFIG_BOOTPARAM_SOFTLOCKUP_PANIC is not set +CONFIG_BOOTPARAM_SOFTLOCKUP_PANIC_VALUE=0 +CONFIG_HARDLOCKUP_DETECTOR_PERF=y +CONFIG_HARDLOCKUP_CHECK_TIMESTAMP=y CONFIG_HARDLOCKUP_DETECTOR=y # CONFIG_BOOTPARAM_HARDLOCKUP_PANIC is not set CONFIG_BOOTPARAM_HARDLOCKUP_PANIC_VALUE=0 -# CONFIG_BOOTPARAM_SOFTLOCKUP_PANIC is not set -CONFIG_BOOTPARAM_SOFTLOCKUP_PANIC_VALUE=0 CONFIG_DETECT_HUNG_TASK=y CONFIG_DEFAULT_HUNG_TASK_TIMEOUT=120 # CONFIG_BOOTPARAM_HUNG_TASK_PANIC is not set @@ -8604,13 +8651,15 @@ CONFIG_SCHEDSTATS=y # # Lock Debugging (spinlocks, mutexes, etc...) # +CONFIG_LOCK_DEBUGGING_SUPPORT=y +# CONFIG_PROVE_LOCKING is not set +# CONFIG_LOCK_STAT is not set # CONFIG_DEBUG_RT_MUTEXES is not set # CONFIG_DEBUG_SPINLOCK is not set # CONFIG_DEBUG_MUTEXES is not set # CONFIG_DEBUG_WW_MUTEX_SLOWPATH is not set +# CONFIG_DEBUG_RWSEMS is not set # CONFIG_DEBUG_LOCK_ALLOC is not set -# CONFIG_PROVE_LOCKING is not set -# CONFIG_LOCK_STAT is not set # CONFIG_DEBUG_ATOMIC_SLEEP is not set # CONFIG_DEBUG_LOCKING_API_SELFTESTS is not set # CONFIG_LOCK_TORTURE_TEST is not set @@ -8769,8 +8818,8 @@ CONFIG_OPTIMIZE_INLINING=y # CONFIG_DEBUG_NMI_SELFTEST is not set # CONFIG_X86_DEBUG_FPU is not set CONFIG_PUNIT_ATOM_DEBUG=m -CONFIG_UNWINDER_FRAME_POINTER=y # CONFIG_UNWINDER_ORC is not set +CONFIG_UNWINDER_FRAME_POINTER=y # CONFIG_UNWINDER_GUESS is not set # @@ -8875,7 +8924,6 @@ CONFIG_CRYPTO_CRYPTD=m CONFIG_CRYPTO_MCRYPTD=m CONFIG_CRYPTO_AUTHENC=m CONFIG_CRYPTO_TEST=m -CONFIG_CRYPTO_ABLK_HELPER=m CONFIG_CRYPTO_SIMD=m CONFIG_CRYPTO_GLUE_HELPER_X86=m CONFIG_CRYPTO_ENGINE=m @@ -8893,6 +8941,7 @@ CONFIG_CRYPTO_ECHAINIV=m # Block modes # CONFIG_CRYPTO_CBC=y +CONFIG_CRYPTO_CFB=m CONFIG_CRYPTO_CTR=y CONFIG_CRYPTO_CTS=y CONFIG_CRYPTO_ECB=y @@ -8977,6 +9026,8 @@ CONFIG_CRYPTO_SERPENT=m CONFIG_CRYPTO_SERPENT_SSE2_X86_64=m CONFIG_CRYPTO_SERPENT_AVX_X86_64=m CONFIG_CRYPTO_SERPENT_AVX2_X86_64=m +CONFIG_CRYPTO_SM4=m +CONFIG_CRYPTO_SPECK=m CONFIG_CRYPTO_TEA=m CONFIG_CRYPTO_TWOFISH=m CONFIG_CRYPTO_TWOFISH_COMMON=m @@ -8987,7 +9038,7 @@ CONFIG_CRYPTO_TWOFISH_AVX_X86_64=m # # Compression # -CONFIG_CRYPTO_DEFLATE=m +CONFIG_CRYPTO_DEFLATE=y CONFIG_CRYPTO_LZO=y CONFIG_CRYPTO_842=m CONFIG_CRYPTO_LZ4=m @@ -9013,7 +9064,6 @@ CONFIG_CRYPTO_HW=y CONFIG_CRYPTO_DEV_PADLOCK=y CONFIG_CRYPTO_DEV_PADLOCK_AES=m CONFIG_CRYPTO_DEV_PADLOCK_SHA=m -# CONFIG_CRYPTO_DEV_FSL_CAAM_CRYPTO_API_DESC is not set CONFIG_CRYPTO_DEV_CCP=y CONFIG_CRYPTO_DEV_CCP_DD=m CONFIG_CRYPTO_DEV_SP_CCP=y @@ -9029,6 +9079,7 @@ CONFIG_CRYPTO_DEV_QAT_DH895xCCVF=m # CONFIG_CRYPTO_DEV_NITROX_CNN55XX is not set CONFIG_CRYPTO_DEV_CHELSIO=m # CONFIG_CHELSIO_IPSEC_INLINE is not set +CONFIG_CRYPTO_DEV_CHELSIO_TLS=m CONFIG_CRYPTO_DEV_VIRTIO=m CONFIG_ASYMMETRIC_KEY_TYPE=y CONFIG_ASYMMETRIC_PUBLIC_KEY_SUBTYPE=y diff --git a/kernel.spec b/kernel.spec index 99a27fd..649f451 100644 --- a/kernel.spec +++ b/kernel.spec @@ -1,7 +1,7 @@ %define kernelversion 4 -%define patchlevel 16 +%define patchlevel 17 # sublevel is now used for -stable patches -%define sublevel 18 +%define sublevel 4 # Release number. Increase this before a rebuild. %define rpmrel 1 diff --git a/patch-4.16.18.sign b/patch-4.16.18.sign deleted file mode 100644 index 05c981a..0000000 --- a/patch-4.16.18.sign +++ /dev/null @@ -1,16 +0,0 @@ ------BEGIN PGP SIGNATURE----- - -iQIzBAABCAAdFiEEZH8oZUiU471FcZm+ONu9yGCSaT4FAlsxgK8ACgkQONu9yGCS -aT6BXA/+J4z5iwy0usHOkhQj+AW7ihfnrPpG4hRuHCMZv9w4rQk+ccbm2wXmk7vm -7USHqK0+Estx+L7k7KtjGSfzc0iOYHFViVboU7URDlgvyvp0F/xpXAgQ+1VjrtFa -HBcXMxfn736RofFsWpOzfQdikWoj1nIY60xaSMS6hxEqVg1aixBjl6fZPDogpKE6 -dmAJ0MSvmtdzE6eOHBU7u4/B9F0Ayc+pFDa8xnPsGmzhjG8z9HBGVHDEr5+1sR2o -87Ic9+z+5lxCHxC7ZVR/V8elZWXq6JJzBX8eeBr0WufGB4OOt1F+IlbQNQU02z80 -GNTnI/o1QYLjny80em2mY8wkUPcBYEcTQABlias1+04fMZyyVCOhR9EV1PiPQGtP -qup4Kl6kL2PIBYM7L2aE7/eLqqa2SNCi1wuNtHgciwQy9uBTvdzky3fFsj6ltdzc -B9bWPHtawF9W50z9UIL7iGIJt7n/2zxU5FNqExYrgBmzsXVggWVGrYdi3gXKni4i -nMld4sArgP2gz5MWHNlK8fHMHkC+2t4sV6BlAcGuPDOBVEvZhoAkZW6C27d16NYg -wbVi0q+cgksiuRJaZxhsEwBRCat46amhtxURhiYp2P6D+oF2sYWje5h5dEPhJH47 -qBeUHxBCUDSCcJlHIrU8TunwQoMFu7QctEm9vq9ZPS89i85PU4U= -=nHBX ------END PGP SIGNATURE----- diff --git a/patch-4.17.4.sign b/patch-4.17.4.sign new file mode 100644 index 0000000..5d688ef --- /dev/null +++ b/patch-4.17.4.sign @@ -0,0 +1,16 @@ +-----BEGIN PGP SIGNATURE----- + +iQIzBAABCAAdFiEEZH8oZUiU471FcZm+ONu9yGCSaT4FAls7QXsACgkQONu9yGCS +aT7F+hAAhzXnkVw7c+CLHw6pXyaAIubedYIZRNOBGYqgQwHiZNJ23HrttsS0o6/T +wSEJubQ2WAiNB/SIR2RySD87JnVumj6Y4/nGrNMKGuBsbnu+snHOffsF5Zl75/2v +mbf31iNd7KXfuAuHiTp5HHPBmncElxMYMFpBTNEofadKd4ghWMuv52X6t3nBrDkU +iQ0wo11O8+RCKOVeoczJ66fbvdqRFZeuvfD2/0l8rGnBqCh3++ZeOytyo3cl4FTF +9lkkwxe6EwNZ+KXAgWjt0M7V4LwN3VJcT34mD/puGyUdo3cQxUo+vwaskKyyVQH7 +CBLtF5YtTYCFZCtOoofAXw2M7Gb6F1S5NPBUTh6GPrG+engBzbO5LwH8xqKCaE3b +jwDseCn72OEXWAnXA2iM7p2DE56IpNkcBzI6W2Mmq+rTxFoVPP17LGvRmrqGWpoz +2XLHxDgqKeQa/Pqgc6ujhproa1f6fr9N+bpa6L0N98lD6k38iK/6tMYEN24pwOdq +r7CVotQojku2usyvbV3kJ6ohQzwJ6aZXx+6gFy9MyOcjePlCEaKFgsUuM9/Qlxc4 +bWNeTjavUD9ps7tzL26BMcGdQ8Zv6VFn+y7dD1jV2Pzf/1IDTZuGyH9BCMnIYoNQ +83iMhsOec4etAkSqfFRv7pIat41m5mz47KUDN/eQrcpcpj6U2vo= +=prnx +-----END PGP SIGNATURE----- diff --git a/perf-python-ext-link-with-dl.patch b/perf-python-ext-link-with-dl.patch index 3d46566..64b7bb8 100644 --- a/perf-python-ext-link-with-dl.patch +++ b/perf-python-ext-link-with-dl.patch @@ -1,10 +1,10 @@ diff --git a/tools/perf/util/setup.py b/tools/perf/util/setup.py -index c868098..61c98a9 100644 +index 001be4f9d3b9..b49aa54baaad 100644 --- a/tools/perf/util/setup.py +++ b/tools/perf/util/setup.py -@@ -22,6 +22,9 @@ cflags = getenv('CFLAGS', '').split() - # switch off several checks (need to be at the end of cflags list) - cflags += ['-fno-strict-aliasing', '-Wno-write-strings', '-Wno-unused-parameter' ] +@@ -31,6 +31,9 @@ cflags += ['-fno-strict-aliasing', '-Wno-write-strings', '-Wno-unused-parameter' + if cc != "clang": + cflags += ['-Wno-cast-function-type' ] +libs = getenv('LIBS', '').split() +libs += ['dl'] @@ -12,7 +12,7 @@ index c868098..61c98a9 100644 src_perf = getenv('srctree') + '/tools/perf' build_lib = getenv('PYTHON_EXTBUILD_LIB') build_tmp = getenv('PYTHON_EXTBUILD_TMP') -@@ -39,6 +42,7 @@ perf = Extension('perf', +@@ -48,6 +51,7 @@ perf = Extension('perf', include_dirs = ['util/include'], extra_compile_args = cflags, extra_objects = [libtraceevent, libapikfs], diff --git a/sanitize-memory.patch b/sanitize-memory.patch index feef40b..ab50e3a 100644 --- a/sanitize-memory.patch +++ b/sanitize-memory.patch @@ -1,8 +1,8 @@ diff --git a/Documentation/admin-guide/kernel-parameters.txt b/Documentation/admin-guide/kernel-parameters.txt -index 1e762c210f1b..9b434ad7dadd 100644 +index f2040d46f095..eb5e429b1ea5 100644 --- a/Documentation/admin-guide/kernel-parameters.txt +++ b/Documentation/admin-guide/kernel-parameters.txt -@@ -2924,6 +2924,10 @@ +@@ -2979,6 +2979,10 @@ the specified number of seconds. This is to be used if your oopses keep scrolling off the screen. @@ -14,10 +14,10 @@ index 1e762c210f1b..9b434ad7dadd 100644 pcd. [PARIDE] diff --git a/fs/buffer.c b/fs/buffer.c -index 0736a6a2e2f0..2f25f9d07fb5 100644 +index 249b83fafe48..b51ce983ec7d 100644 --- a/fs/buffer.c +++ b/fs/buffer.c -@@ -3578,7 +3578,7 @@ void __init buffer_init(void) +@@ -3549,7 +3549,7 @@ void __init buffer_init(void) bh_cachep = kmem_cache_create("buffer_head", sizeof(struct buffer_head), 0, (SLAB_RECLAIM_ACCOUNT|SLAB_PANIC| @@ -27,21 +27,20 @@ index 0736a6a2e2f0..2f25f9d07fb5 100644 /* diff --git a/fs/dcache.c b/fs/dcache.c -index 10c1a6d60d6e..c323d1426b6b 100644 +index 2acfc69878f5..f2f575aaa27c 100644 --- a/fs/dcache.c +++ b/fs/dcache.c -@@ -3642,7 +3642,8 @@ void __init vfs_caches_init_early(void) +@@ -3232,7 +3232,7 @@ void __init vfs_caches_init_early(void) void __init vfs_caches_init(void) { - names_cachep = kmem_cache_create("names_cache", PATH_MAX, 0, -- SLAB_HWCACHE_ALIGN|SLAB_PANIC, NULL); -+ SLAB_HWCACHE_ALIGN|SLAB_PANIC| -+ SLAB_NO_SANITIZE, NULL); + names_cachep = kmem_cache_create_usercopy("names_cache", PATH_MAX, 0, +- SLAB_HWCACHE_ALIGN|SLAB_PANIC, 0, PATH_MAX, NULL); ++ SLAB_HWCACHE_ALIGN|SLAB_PANIC|SLAB_NO_SANITIZE, 0, PATH_MAX, NULL); dcache_init(); inode_init(); diff --git a/include/linux/slab.h b/include/linux/slab.h -index 50697a1d6621..d5473371939e 100644 +index 81ebd71f8c03..ccb3618c4052 100644 --- a/include/linux/slab.h +++ b/include/linux/slab.h @@ -27,6 +27,14 @@ @@ -60,12 +59,12 @@ index 50697a1d6621..d5473371939e 100644 #define SLAB_HWCACHE_ALIGN ((slab_flags_t __force)0x00002000U) /* Use GFP_DMA memory */ diff --git a/kernel/fork.c b/kernel/fork.c -index 80e1fee1187c..b398613cf6d2 100644 +index a5d21c42acfc..bdc0c9a07ae8 100644 --- a/kernel/fork.c +++ b/kernel/fork.c -@@ -2228,7 +2228,7 @@ void __init proc_caches_init(void) - sizeof(struct mm_struct), ARCH_MIN_MMSTRUCT_ALIGN, - SLAB_HWCACHE_ALIGN|SLAB_PANIC|SLAB_ACCOUNT, +@@ -2271,7 +2271,7 @@ void __init proc_caches_init(void) + offsetof(struct mm_struct, saved_auxv), + sizeof_field(struct mm_struct, saved_auxv), NULL); - vm_area_cachep = KMEM_CACHE(vm_area_struct, SLAB_PANIC|SLAB_ACCOUNT); + vm_area_cachep = KMEM_CACHE(vm_area_struct, SLAB_PANIC|SLAB_ACCOUNT|SLAB_NO_SANITIZE); @@ -73,7 +72,7 @@ index 80e1fee1187c..b398613cf6d2 100644 nsproxy_cache_init(); } diff --git a/mm/rmap.c b/mm/rmap.c -index 47db27f8049e..328a8f009438 100644 +index 8d5337fed37b..95e2be039402 100644 --- a/mm/rmap.c +++ b/mm/rmap.c @@ -431,10 +431,10 @@ static void anon_vma_ctor(void *data) @@ -90,10 +89,10 @@ index 47db27f8049e..328a8f009438 100644 /* diff --git a/mm/slab.c b/mm/slab.c -index 4e51ef954026..f75bb31f8a1b 100644 +index 2f308253c3d7..9cb22d666f59 100644 --- a/mm/slab.c +++ b/mm/slab.c -@@ -3497,6 +3497,17 @@ void ___cache_free(struct kmem_cache *cachep, void *objp, +@@ -3507,6 +3507,17 @@ void ___cache_free(struct kmem_cache *cachep, void *objp, struct array_cache *ac = cpu_cache_get(cachep); check_irq_off(); @@ -112,30 +111,30 @@ index 4e51ef954026..f75bb31f8a1b 100644 objp = cache_free_debugcheck(cachep, objp, caller); diff --git a/mm/slab.h b/mm/slab.h -index ad657ffa44e5..07a64aaf1f4f 100644 +index 68bdf498da3b..d3ba8f16b155 100644 --- a/mm/slab.h +++ b/mm/slab.h -@@ -78,6 +78,15 @@ extern const struct kmalloc_info_struct { - unsigned long size; +@@ -80,6 +80,15 @@ extern const struct kmalloc_info_struct { + unsigned int size; } kmalloc_info[]; +#ifdef CONFIG_PAX_MEMORY_SANITIZE +#ifdef CONFIG_X86_64 -+#define PAX_MEMORY_SANITIZE_VALUE '\xfe' ++#define PAX_MEMORY_SANITIZE_VALUE '\xfe' +#else -+#define PAX_MEMORY_SANITIZE_VALUE '\xff' ++#define PAX_MEMORY_SANITIZE_VALUE '\xff' +#endif +extern bool pax_sanitize_slab; +#endif + - unsigned long calculate_alignment(slab_flags_t flags, - unsigned long align, unsigned long size); - + #ifndef CONFIG_SLOB + /* Kmalloc array related functions */ + void setup_kmalloc_cache_index_table(void); diff --git a/mm/slab_common.c b/mm/slab_common.c -index c8cb36774ba1..89839f6a55cc 100644 +index 65408ced18f1..fa458ea26e52 100644 --- a/mm/slab_common.c +++ b/mm/slab_common.c -@@ -49,7 +49,11 @@ static DECLARE_WORK(slab_caches_to_rcu_destroy_work, +@@ -58,7 +58,11 @@ static DECLARE_WORK(slab_caches_to_rcu_destroy_work, /* * Merge control. If this is set then no merging of slab caches will occur. */ @@ -147,7 +146,7 @@ index c8cb36774ba1..89839f6a55cc 100644 static int __init setup_slab_nomerge(char *str) { -@@ -72,6 +76,20 @@ unsigned int kmem_cache_size(struct kmem_cache *s) +@@ -81,6 +85,20 @@ unsigned int kmem_cache_size(struct kmem_cache *s) } EXPORT_SYMBOL(kmem_cache_size); @@ -166,9 +165,9 @@ index c8cb36774ba1..89839f6a55cc 100644 +#endif + #ifdef CONFIG_DEBUG_VM - static int kmem_cache_sanity_check(const char *name, size_t size) + static int kmem_cache_sanity_check(const char *name, unsigned int size) { -@@ -272,7 +290,11 @@ static inline void memcg_unlink_cache(struct kmem_cache *s) +@@ -291,7 +309,11 @@ static unsigned int calculate_alignment(slab_flags_t flags, */ int slab_unmergeable(struct kmem_cache *s) { @@ -181,7 +180,7 @@ index c8cb36774ba1..89839f6a55cc 100644 return 1; if (!is_root_cache(s)) -@@ -295,7 +317,11 @@ struct kmem_cache *find_mergeable(size_t size, size_t align, +@@ -317,7 +339,11 @@ struct kmem_cache *find_mergeable(unsigned int size, unsigned int align, { struct kmem_cache *s; @@ -194,7 +193,7 @@ index c8cb36774ba1..89839f6a55cc 100644 return NULL; if (ctor) -@@ -462,6 +488,11 @@ kmem_cache_create(const char *name, size_t size, size_t align, +@@ -467,6 +493,11 @@ kmem_cache_create_usercopy(const char *name, */ flags &= CACHE_CREATE_MASK; @@ -203,9 +202,9 @@ index c8cb36774ba1..89839f6a55cc 100644 + flags |= SLAB_NO_SANITIZE; +#endif + - s = __kmem_cache_alias(name, size, align, flags, ctor); - if (s) - goto out_unlock; + /* Fail closed on bad usersize of useroffset values. */ + if (WARN_ON(!usersize && useroffset) || + WARN_ON(size < usersize || size - usersize < useroffset)) diff --git a/mm/slob.c b/mm/slob.c index 623e8a5c46ce..1f2985096f84 100644 --- a/mm/slob.c @@ -223,34 +222,37 @@ index 623e8a5c46ce..1f2985096f84 100644 /* This slob page is about to become partially free. Easy! */ sp->units = units; diff --git a/mm/slub.c b/mm/slub.c -index cfd56e5a35fb..8b0b41e477e7 100644 +index 613c8dc2f409..3ae38641924a 100644 --- a/mm/slub.c +++ b/mm/slub.c -@@ -2966,6 +2966,23 @@ static __always_inline void slab_free(struct kmem_cache *s, struct page *page, - unsigned long addr) - { - slab_free_freelist_hook(s, head, tail); -+ +@@ -2985,8 +2985,25 @@ static __always_inline void slab_free(struct kmem_cache *s, struct page *page, + * With KASAN enabled slab_free_freelist_hook modifies the freelist + * to remove objects, whose reuse must be delayed. + */ +- if (slab_free_freelist_hook(s, &head, &tail)) ++ if (slab_free_freelist_hook(s, &head, &tail)) { +#ifdef CONFIG_PAX_MEMORY_SANITIZE -+ if (pax_sanitize_slab && !(s->flags & SLAB_NO_SANITIZE)) { -+ int offset = s->offset ? 0 : sizeof(void *); -+ void *x = head; ++ if (pax_sanitize_slab && !(s->flags & SLAB_NO_SANITIZE)) { ++ int offset = s->offset ? 0 : sizeof(void *); ++ void *x = head; ++ void *tail_obj = tail ? : head; + -+ while (1) { -+ memset(x + offset, PAX_MEMORY_SANITIZE_VALUE, s->object_size - offset); -+ if (s->ctor) -+ s->ctor(x); -+ if (x == tail_obj) -+ break; -+ x = get_freepointer(s, x); ++ while (1) { ++ memset(x + offset, PAX_MEMORY_SANITIZE_VALUE, s->object_size - offset); ++ if (s->ctor) ++ s->ctor(x); ++ if (x == tail_obj) ++ break; ++ x = get_freepointer(s, x); ++ } + } -+ } +#endif -+ - /* - * slab_free_freelist_hook() could have put the items into quarantine. - * If so, no need to free them. -@@ -3496,6 +3513,9 @@ static int calculate_sizes(struct kmem_cache *s, int forced_order) + do_slab_free(s, page, head, tail, cnt, addr); ++ } + } + + #ifdef CONFIG_KASAN +@@ -3512,6 +3529,9 @@ static int calculate_sizes(struct kmem_cache *s, int forced_order) s->inuse = size; if (((flags & (SLAB_TYPESAFE_BY_RCU | SLAB_POISON)) || @@ -261,28 +263,28 @@ index cfd56e5a35fb..8b0b41e477e7 100644 /* * Relocate free pointer after the object if it is not diff --git a/net/core/skbuff.c b/net/core/skbuff.c -index 08f574081315..77d017ef9bf5 100644 +index 345b51837ca8..a2888903091d 100644 --- a/net/core/skbuff.c +++ b/net/core/skbuff.c -@@ -3893,12 +3893,14 @@ void __init skb_init(void) - skbuff_head_cache = kmem_cache_create("skbuff_head_cache", +@@ -3917,14 +3917,14 @@ void __init skb_init(void) + skbuff_head_cache = kmem_cache_create_usercopy("skbuff_head_cache", sizeof(struct sk_buff), 0, - SLAB_HWCACHE_ALIGN|SLAB_PANIC, -+ SLAB_HWCACHE_ALIGN|SLAB_PANIC| -+ SLAB_NO_SANITIZE, ++ SLAB_HWCACHE_ALIGN|SLAB_PANIC|SLAB_NO_SANITIZE, + offsetof(struct sk_buff, cb), + sizeof_field(struct sk_buff, cb), NULL); skbuff_fclone_cache = kmem_cache_create("skbuff_fclone_cache", sizeof(struct sk_buff_fclones), 0, - SLAB_HWCACHE_ALIGN|SLAB_PANIC, -+ SLAB_HWCACHE_ALIGN|SLAB_PANIC| -+ SLAB_NO_SANITIZE, ++ SLAB_HWCACHE_ALIGN|SLAB_PANIC|SLAB_NO_SANITIZE, NULL); } diff --git a/security/Kconfig b/security/Kconfig -index b0cb9a5f9448..63d764a926c6 100644 +index c4302067a3ad..0846636e8b96 100644 --- a/security/Kconfig +++ b/security/Kconfig @@ -6,6 +6,37 @@ menu "Security options"