kernel.4.13.12

This commit is contained in:
milisbir 2017-11-16 11:18:08 +02:00
parent 833c7daec4
commit 204b80a166
16 changed files with 12480 additions and 1727 deletions

View File

@ -1,10 +1,10 @@
aufs4.10 base patch
aufs4.13 base patch
diff --git a/MAINTAINERS b/MAINTAINERS
index 527d137..b6ea8ae 100644
index 1c3feff..1a12137 100644
--- a/MAINTAINERS
+++ b/MAINTAINERS
@@ -2308,6 +2308,19 @@ F: include/linux/audit.h
@@ -2392,6 +2392,19 @@ F: include/linux/audit.h
F: include/uapi/linux/audit.h
F: kernel/audit*
@ -25,10 +25,10 @@ index 527d137..b6ea8ae 100644
M: Miguel Ojeda Sandonis <miguel.ojeda.sandonis@gmail.com>
W: http://miguelojeda.es/auxdisplay.htm
diff --git a/drivers/block/loop.c b/drivers/block/loop.c
index f347285..b63f68b 100644
index f321b96..10707c3 100644
--- a/drivers/block/loop.c
+++ b/drivers/block/loop.c
@@ -701,6 +701,24 @@ static inline int is_loop_device(struct file *file)
@@ -700,6 +700,24 @@ static inline int is_loop_device(struct file *file)
return i && S_ISBLK(i->i_mode) && MAJOR(i->i_rdev) == LOOP_MAJOR;
}
@ -54,10 +54,10 @@ index f347285..b63f68b 100644
static ssize_t loop_attr_show(struct device *dev, char *page,
diff --git a/fs/dcache.c b/fs/dcache.c
index 95d71ed..8ca5f09 100644
index f901413..e3719a5 100644
--- a/fs/dcache.c
+++ b/fs/dcache.c
@@ -1164,7 +1164,7 @@ enum d_walk_ret {
@@ -1197,7 +1197,7 @@ enum d_walk_ret {
*
* The @enter() and @finish() callbacks are called with d_lock held.
*/
@ -67,10 +67,10 @@ index 95d71ed..8ca5f09 100644
void (*finish)(void *))
{
diff --git a/fs/fcntl.c b/fs/fcntl.c
index e1c54f2..9f07008 100644
index 3b01b64..659760e 100644
--- a/fs/fcntl.c
+++ b/fs/fcntl.c
@@ -29,7 +29,7 @@
@@ -31,7 +31,7 @@
#define SETFL_MASK (O_APPEND | O_NONBLOCK | O_NDELAY | O_DIRECT | O_NOATIME)
@ -79,7 +79,7 @@ index e1c54f2..9f07008 100644
{
struct inode * inode = file_inode(filp);
int error = 0;
@@ -60,6 +60,8 @@ static int setfl(int fd, struct file * filp, unsigned long arg)
@@ -62,6 +62,8 @@ static int setfl(int fd, struct file * filp, unsigned long arg)
if (filp->f_op->check_flags)
error = filp->f_op->check_flags(arg);
@ -89,10 +89,10 @@ index e1c54f2..9f07008 100644
return error;
diff --git a/fs/inode.c b/fs/inode.c
index 88110fd..9a9ba3a 100644
index 5037059..73820bf 100644
--- a/fs/inode.c
+++ b/fs/inode.c
@@ -1642,7 +1642,7 @@ EXPORT_SYMBOL(generic_update_time);
@@ -1641,7 +1641,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.
*/
@ -101,11 +101,28 @@ index 88110fd..9a9ba3a 100644
{
int (*update_time)(struct inode *, struct timespec *, int);
diff --git a/fs/namespace.c b/fs/namespace.c
index f8893dc..8601f8d 100644
--- a/fs/namespace.c
+++ b/fs/namespace.c
@@ -786,6 +786,12 @@ static inline int check_mnt(struct mount *mnt)
return mnt->mnt_ns == current->nsproxy->mnt_ns;
}
+/* for aufs, CONFIG_AUFS_BR_FUSE */
+int is_current_mnt_ns(struct vfsmount *mnt)
+{
+ return check_mnt(real_mount(mnt));
+}
+
/*
* vfsmount lock must be held for write
*/
diff --git a/fs/read_write.c b/fs/read_write.c
index 5816d4c..670b365 100644
index 0cc7033..6e542f0 100644
--- a/fs/read_write.c
+++ b/fs/read_write.c
@@ -515,6 +515,28 @@ ssize_t __vfs_write(struct file *file, const char __user *p, size_t count,
@@ -473,6 +473,28 @@ ssize_t __vfs_write(struct file *file, const char __user *p, size_t count,
}
EXPORT_SYMBOL(__vfs_write);
@ -135,10 +152,10 @@ index 5816d4c..670b365 100644
{
mm_segment_t old_fs;
diff --git a/fs/splice.c b/fs/splice.c
index 4ef78aa..178acc0 100644
index ae41201..9753304 100644
--- a/fs/splice.c
+++ b/fs/splice.c
@@ -857,8 +857,8 @@ EXPORT_SYMBOL(generic_splice_sendpage);
@@ -853,8 +853,8 @@ EXPORT_SYMBOL(generic_splice_sendpage);
/*
* Attempt to initiate a splice from pipe to file.
*/
@ -149,7 +166,7 @@ index 4ef78aa..178acc0 100644
{
ssize_t (*splice_write)(struct pipe_inode_info *, struct file *,
loff_t *, size_t, unsigned int);
@@ -874,9 +874,9 @@ static long do_splice_from(struct pipe_inode_info *pipe, struct file *out,
@@ -870,9 +870,9 @@ static long do_splice_from(struct pipe_inode_info *pipe, struct file *out,
/*
* Attempt to initiate a splice from a file to a pipe.
*/
@ -188,18 +205,18 @@ index 61eb82c..e700888 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 2ba0743..d1c583b 100644
index cbfe127..9b21bb5 100644
--- a/include/linux/fs.h
+++ b/include/linux/fs.h
@@ -1240,6 +1240,7 @@ extern void fasync_free(struct fasync_struct *);
@@ -1262,6 +1262,7 @@ extern void fasync_free(struct fasync_struct *);
/* can be called from interrupts */
extern void kill_fasync(struct fasync_struct **, int, int);
+extern int setfl(int fd, struct file * filp, unsigned long arg);
extern void __f_setown(struct file *filp, struct pid *, enum pid_type, int force);
extern void f_setown(struct file *filp, unsigned long arg, int force);
extern int f_setown(struct file *filp, unsigned long arg, int force);
extern void f_delown(struct file *filp);
@@ -1664,6 +1665,7 @@ struct file_operations {
@@ -1683,6 +1684,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);
@ -207,7 +224,7 @@ index 2ba0743..d1c583b 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);
@@ -1717,6 +1719,12 @@ ssize_t rw_copy_check_uvector(int type, const struct iovec __user * uvector,
@@ -1753,6 +1755,12 @@ ssize_t rw_copy_check_uvector(int type, const struct iovec __user * uvector,
struct iovec *fast_pointer,
struct iovec **ret_pointer);
@ -220,7 +237,7 @@ index 2ba0743..d1c583b 100644
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 *);
extern ssize_t vfs_read(struct file *, char __user *, size_t, loff_t *);
@@ -2108,6 +2116,7 @@ extern int current_umask(void);
@@ -2157,6 +2165,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);
@ -228,7 +245,7 @@ index 2ba0743..d1c583b 100644
/* /sys/fs */
extern struct kobject *fs_kobj;
@@ -2387,6 +2396,7 @@ static inline bool sb_is_blkdev_sb(struct super_block *sb)
@@ -2437,6 +2446,7 @@ static inline bool sb_is_blkdev_sb(struct super_block *sb)
return false;
}
#endif
@ -236,11 +253,51 @@ index 2ba0743..d1c583b 100644
extern int sync_filesystem(struct super_block *);
extern const struct file_operations def_blk_fops;
extern const struct file_operations def_chr_fops;
diff --git a/include/linux/lockdep.h b/include/linux/lockdep.h
index fffe49f..f753750 100644
--- a/include/linux/lockdep.h
+++ b/include/linux/lockdep.h
@@ -317,6 +317,8 @@ static inline int lockdep_match_key(struct lockdep_map *lock,
return lock->key == key;
}
+struct lock_class *lockdep_hlock_class(struct held_lock *hlock);
+
/*
* Acquire a lock.
*
@@ -448,6 +450,7 @@ struct lock_class_key { };
#define lockdep_depth(tsk) (0)
+#define lockdep_is_held(lock) (1)
#define lockdep_is_held_type(l, r) (1)
#define lockdep_assert_held(l) do { (void)(l); } while (0)
diff --git a/include/linux/mnt_namespace.h b/include/linux/mnt_namespace.h
index 12b2ab5..8b810d1 100644
--- a/include/linux/mnt_namespace.h
+++ b/include/linux/mnt_namespace.h
@@ -5,11 +5,14 @@
struct mnt_namespace;
struct fs_struct;
struct user_namespace;
+struct vfsmount;
extern struct mnt_namespace *copy_mnt_ns(unsigned long, struct mnt_namespace *,
struct user_namespace *, struct fs_struct *);
extern void put_mnt_ns(struct mnt_namespace *ns);
+extern int is_current_mnt_ns(struct vfsmount *mnt);
+
extern const struct file_operations proc_mounts_operations;
extern const struct file_operations proc_mountinfo_operations;
extern const struct file_operations proc_mountstats_operations;
diff --git a/include/linux/splice.h b/include/linux/splice.h
index 00a2116..1f0a4a2 100644
index db42746..12f3a5a 100644
--- a/include/linux/splice.h
+++ b/include/linux/splice.h
@@ -86,4 +86,10 @@ extern void spd_release_page(struct splice_pipe_desc *, unsigned int);
@@ -86,4 +86,10 @@ extern void splice_shrink_spd(struct splice_pipe_desc *);
extern const struct pipe_buf_operations page_cache_pipe_buf_ops;
extern const struct pipe_buf_operations default_pipe_buf_ops;
@ -251,3 +308,24 @@ index 00a2116..1f0a4a2 100644
+ struct pipe_inode_info *pipe, size_t len,
+ unsigned int flags);
#endif
diff --git a/kernel/locking/lockdep.c b/kernel/locking/lockdep.c
index 7d2499b..b072240 100644
--- a/kernel/locking/lockdep.c
+++ b/kernel/locking/lockdep.c
@@ -140,7 +140,7 @@ static struct lock_list list_entries[MAX_LOCKDEP_ENTRIES];
unsigned long nr_lock_classes;
static struct lock_class lock_classes[MAX_LOCKDEP_KEYS];
-static inline struct lock_class *hlock_class(struct held_lock *hlock)
+inline struct lock_class *lockdep_hlock_class(struct held_lock *hlock)
{
if (!hlock->class_idx) {
/*
@@ -151,6 +151,7 @@ static inline struct lock_class *hlock_class(struct held_lock *hlock)
}
return lock_classes + hlock->class_idx - 1;
}
+#define hlock_class(hlock) lockdep_hlock_class(hlock)
#ifdef CONFIG_LOCK_STAT
static DEFINE_PER_CPU(struct lock_class_stats[MAX_LOCKDEP_KEYS], cpu_lock_stats);

View File

@ -1,7 +1,7 @@
aufs4.10 kbuild patch
aufs4.13 kbuild patch
diff --git a/fs/Kconfig b/fs/Kconfig
index 83eab52..31f16c4 100644
index 7aee6d6..ec92031 100644
--- a/fs/Kconfig
+++ b/fs/Kconfig
@@ -248,6 +248,7 @@ source "fs/pstore/Kconfig"
@ -21,15 +21,3 @@ index 7bbaca9..a026491 100644
obj-$(CONFIG_PSTORE) += pstore/
obj-$(CONFIG_EFIVAR_FS) += efivarfs/
+obj-$(CONFIG_AUFS_FS) += aufs/
diff --git a/include/uapi/linux/Kbuild b/include/uapi/linux/Kbuild
index f330ba4..67d88cd 100644
--- a/include/uapi/linux/Kbuild
+++ b/include/uapi/linux/Kbuild
@@ -59,6 +59,7 @@ header-y += atmsvc.h
header-y += atm_tcp.h
header-y += atm_zatm.h
header-y += audit.h
+header-y += aufs_type.h
header-y += auto_fs4.h
header-y += auto_fs.h
header-y += auxvec.h

View File

@ -1,10 +1,10 @@
aufs4.10 loopback patch
aufs4.13 loopback patch
diff --git a/drivers/block/loop.c b/drivers/block/loop.c
index b63f68b..c0f4b8c 100644
index 10707c3..af32e47 100644
--- a/drivers/block/loop.c
+++ b/drivers/block/loop.c
@@ -551,7 +551,7 @@ static int do_req_filebacked(struct loop_device *lo, struct request *rq)
@@ -547,7 +547,7 @@ static int do_req_filebacked(struct loop_device *lo, struct request *rq)
}
struct switch_request {
@ -13,7 +13,7 @@ index b63f68b..c0f4b8c 100644
struct completion wait;
};
@@ -577,6 +577,7 @@ static void do_loop_switch(struct loop_device *lo, struct switch_request *p)
@@ -573,6 +573,7 @@ static void do_loop_switch(struct loop_device *lo, struct switch_request *p)
mapping = file->f_mapping;
mapping_set_gfp_mask(old_file->f_mapping, lo->old_gfp_mask);
lo->lo_backing_file = file;
@ -21,7 +21,7 @@ index b63f68b..c0f4b8c 100644
lo->lo_blocksize = S_ISBLK(mapping->host->i_mode) ?
mapping->host->i_bdev->bd_block_size : PAGE_SIZE;
lo->old_gfp_mask = mapping_gfp_mask(mapping);
@@ -589,11 +590,13 @@ static void do_loop_switch(struct loop_device *lo, struct switch_request *p)
@@ -585,11 +586,13 @@ static void do_loop_switch(struct loop_device *lo, struct switch_request *p)
* First it needs to flush existing IO, it does this by sending a magic
* BIO down the pipe. The completion of this BIO does the actual switch.
*/
@ -36,10 +36,10 @@ index b63f68b..c0f4b8c 100644
/* freeze queue and wait for completion of scheduled requests */
blk_mq_freeze_queue(lo->lo_queue);
@@ -612,7 +615,16 @@ static int loop_switch(struct loop_device *lo, struct file *file)
*/
static int loop_flush(struct loop_device *lo)
{
@@ -611,7 +614,16 @@ static int loop_flush(struct loop_device *lo)
/* loop not yet configured, no running thread, nothing to flush */
if (lo->lo_state != Lo_bound)
return 0;
- return loop_switch(lo, NULL);
+ return loop_switch(lo, NULL, NULL);
+}
@ -54,7 +54,7 @@ index b63f68b..c0f4b8c 100644
}
static void loop_reread_partitions(struct loop_device *lo,
@@ -649,6 +661,7 @@ static int loop_change_fd(struct loop_device *lo, struct block_device *bdev,
@@ -648,6 +660,7 @@ static int loop_change_fd(struct loop_device *lo, struct block_device *bdev,
unsigned int arg)
{
struct file *file, *old_file;
@ -62,7 +62,7 @@ index b63f68b..c0f4b8c 100644
struct inode *inode;
int error;
@@ -665,9 +678,16 @@ static int loop_change_fd(struct loop_device *lo, struct block_device *bdev,
@@ -664,9 +677,16 @@ static int loop_change_fd(struct loop_device *lo, struct block_device *bdev,
file = fget(arg);
if (!file)
goto out;
@ -79,7 +79,7 @@ index b63f68b..c0f4b8c 100644
error = -EINVAL;
@@ -679,17 +699,21 @@ static int loop_change_fd(struct loop_device *lo, struct block_device *bdev,
@@ -678,17 +698,21 @@ static int loop_change_fd(struct loop_device *lo, struct block_device *bdev,
goto out_putf;
/* and ... switch */
@ -102,7 +102,7 @@ index b63f68b..c0f4b8c 100644
out:
return error;
}
@@ -876,7 +900,7 @@ static int loop_prepare_queue(struct loop_device *lo)
@@ -882,7 +906,7 @@ static int loop_prepare_queue(struct loop_device *lo)
static int loop_set_fd(struct loop_device *lo, fmode_t mode,
struct block_device *bdev, unsigned int arg)
{
@ -111,7 +111,7 @@ index b63f68b..c0f4b8c 100644
struct inode *inode;
struct address_space *mapping;
unsigned lo_blocksize;
@@ -891,6 +915,12 @@ static int loop_set_fd(struct loop_device *lo, fmode_t mode,
@@ -897,6 +921,12 @@ static int loop_set_fd(struct loop_device *lo, fmode_t mode,
file = fget(arg);
if (!file)
goto out;
@ -124,7 +124,7 @@ index b63f68b..c0f4b8c 100644
error = -EBUSY;
if (lo->lo_state != Lo_unbound)
@@ -943,6 +973,7 @@ static int loop_set_fd(struct loop_device *lo, fmode_t mode,
@@ -949,6 +979,7 @@ static int loop_set_fd(struct loop_device *lo, fmode_t mode,
lo->lo_device = bdev;
lo->lo_flags = lo_flags;
lo->lo_backing_file = file;
@ -132,7 +132,7 @@ index b63f68b..c0f4b8c 100644
lo->transfer = NULL;
lo->ioctl = NULL;
lo->lo_sizelimit = 0;
@@ -975,6 +1006,8 @@ static int loop_set_fd(struct loop_device *lo, fmode_t mode,
@@ -981,6 +1012,8 @@ static int loop_set_fd(struct loop_device *lo, fmode_t mode,
out_putf:
fput(file);
@ -141,7 +141,7 @@ index b63f68b..c0f4b8c 100644
out:
/* This is safe: open() is still holding a reference. */
module_put(THIS_MODULE);
@@ -1021,6 +1054,7 @@ loop_init_xfer(struct loop_device *lo, struct loop_func_table *xfer,
@@ -1027,6 +1060,7 @@ loop_init_xfer(struct loop_device *lo, struct loop_func_table *xfer,
static int loop_clr_fd(struct loop_device *lo)
{
struct file *filp = lo->lo_backing_file;
@ -149,7 +149,7 @@ index b63f68b..c0f4b8c 100644
gfp_t gfp = lo->old_gfp_mask;
struct block_device *bdev = lo->lo_device;
@@ -1052,6 +1086,7 @@ static int loop_clr_fd(struct loop_device *lo)
@@ -1058,6 +1092,7 @@ static int loop_clr_fd(struct loop_device *lo)
spin_lock_irq(&lo->lo_lock);
lo->lo_state = Lo_rundown;
lo->lo_backing_file = NULL;
@ -157,7 +157,7 @@ index b63f68b..c0f4b8c 100644
spin_unlock_irq(&lo->lo_lock);
loop_release_xfer(lo);
@@ -1096,6 +1131,8 @@ static int loop_clr_fd(struct loop_device *lo)
@@ -1102,6 +1137,8 @@ static int loop_clr_fd(struct loop_device *lo)
* bd_mutex which is usually taken before lo_ctl_mutex.
*/
fput(filp);
@ -167,7 +167,7 @@ index b63f68b..c0f4b8c 100644
}
diff --git a/drivers/block/loop.h b/drivers/block/loop.h
index fb2237c..c3888c5 100644
index fecd3f9..6b3a7c9 100644
--- a/drivers/block/loop.h
+++ b/drivers/block/loop.h
@@ -46,7 +46,7 @@ struct loop_device {
@ -180,10 +180,10 @@ index fb2237c..c3888c5 100644
unsigned lo_blocksize;
void *key_data;
diff --git a/fs/aufs/f_op.c b/fs/aufs/f_op.c
index 6da0f10..d211f9e 100644
index 8aff060..e853272 100644
--- a/fs/aufs/f_op.c
+++ b/fs/aufs/f_op.c
@@ -351,7 +351,7 @@ static ssize_t aufs_read_iter(struct kiocb *kio, struct iov_iter *iov_iter)
@@ -357,7 +357,7 @@ static ssize_t aufs_read_iter(struct kiocb *kio, struct iov_iter *iov_iter)
if (IS_ERR(h_file))
goto out;
@ -193,12 +193,12 @@ index 6da0f10..d211f9e 100644
if (file->f_mapping != h_file->f_mapping) {
file->f_mapping = h_file->f_mapping;
diff --git a/fs/aufs/loop.c b/fs/aufs/loop.c
index 61e9197..9910bea 100644
index e35f015..b37f1ae 100644
--- a/fs/aufs/loop.c
+++ b/fs/aufs/loop.c
@@ -132,3 +132,19 @@ void au_loopback_fin(void)
symbol_put(loop_backing_file);
au_delayed_kfree(au_warn_loopback_array);
kfree(au_warn_loopback_array);
}
+
+/* ---------------------------------------------------------------------- */
@ -242,10 +242,10 @@ index e2df495..36e5052 100644
#endif /* __KERNEL__ */
diff --git a/fs/aufs/super.c b/fs/aufs/super.c
index 0e9bbc3..b90d52f 100644
index 3c300125..128d790 100644
--- a/fs/aufs/super.c
+++ b/fs/aufs/super.c
@@ -837,7 +837,10 @@ static const struct super_operations aufs_sop = {
@@ -838,7 +838,10 @@ static const struct super_operations aufs_sop = {
.statfs = aufs_statfs,
.put_super = aufs_put_super,
.sync_fs = aufs_sync_fs,
@ -258,10 +258,10 @@ index 0e9bbc3..b90d52f 100644
/* ---------------------------------------------------------------------- */
diff --git a/include/linux/fs.h b/include/linux/fs.h
index a808c7c..214b51f 100644
index 9b21bb5..f7124fa 100644
--- a/include/linux/fs.h
+++ b/include/linux/fs.h
@@ -1791,6 +1791,10 @@ struct super_operations {
@@ -1814,6 +1814,10 @@ struct super_operations {
struct shrink_control *);
long (*free_cached_objects)(struct super_block *,
struct shrink_control *);

View File

@ -1,10 +1,10 @@
aufs4.10 mmap patch
aufs4.13 mmap patch
diff --git a/fs/proc/base.c b/fs/proc/base.c
index 87c9a9a..a0196f0 100644
index 719c2e9..a1b7968 100644
--- a/fs/proc/base.c
+++ b/fs/proc/base.c
@@ -1958,7 +1958,7 @@ static int map_files_get_link(struct dentry *dentry, struct path *path)
@@ -1986,7 +1986,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) {
@ -30,10 +30,10 @@ index 7563437..7c0dc0f 100644
ino = inode->i_ino;
}
diff --git a/fs/proc/task_mmu.c b/fs/proc/task_mmu.c
index 8f96a49..0d10404 100644
index fe8f326..b2f7f1a 100644
--- a/fs/proc/task_mmu.c
+++ b/fs/proc/task_mmu.c
@@ -291,7 +291,10 @@ show_map_vma(struct seq_file *m, struct vm_area_struct *vma, int is_pid)
@@ -293,7 +293,10 @@ show_map_vma(struct seq_file *m, struct vm_area_struct *vma, int is_pid)
const char *name = NULL;
if (file) {
@ -45,7 +45,7 @@ index 8f96a49..0d10404 100644
dev = inode->i_sb->s_dev;
ino = inode->i_ino;
pgoff = ((loff_t)vma->vm_pgoff) << PAGE_SHIFT;
@@ -1628,7 +1631,7 @@ static int show_numa_map(struct seq_file *m, void *v, int is_pid)
@@ -1640,7 +1643,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;
@ -55,10 +55,10 @@ index 8f96a49..0d10404 100644
struct mm_walk walk = {
.hugetlb_entry = gather_hugetlb_stats,
diff --git a/fs/proc/task_nommu.c b/fs/proc/task_nommu.c
index 3717562..6a328f1 100644
index 23266694..58e59b6 100644
--- a/fs/proc/task_nommu.c
+++ b/fs/proc/task_nommu.c
@@ -155,7 +155,10 @@ static int nommu_vma_show(struct seq_file *m, struct vm_area_struct *vma,
@@ -157,7 +157,10 @@ static int nommu_vma_show(struct seq_file *m, struct vm_area_struct *vma,
file = vma->vm_file;
if (file) {
@ -71,10 +71,10 @@ index 3717562..6a328f1 100644
ino = inode->i_ino;
pgoff = (loff_t)vma->vm_pgoff << PAGE_SHIFT;
diff --git a/include/linux/mm.h b/include/linux/mm.h
index b84615b..3978a35 100644
index c1f6c95..2d660a5 100644
--- a/include/linux/mm.h
+++ b/include/linux/mm.h
@@ -1257,6 +1257,28 @@ static inline int fixup_user_fault(struct task_struct *tsk,
@@ -1307,6 +1307,28 @@ static inline int fixup_user_fault(struct task_struct *tsk,
}
#endif
@ -104,10 +104,10 @@ index b84615b..3978a35 100644
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 808751d..66fc765 100644
index 3cadee0..d0142c1 100644
--- a/include/linux/mm_types.h
+++ b/include/linux/mm_types.h
@@ -275,6 +275,7 @@ struct vm_region {
@@ -259,6 +259,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 */
@ -115,7 +115,7 @@ index 808751d..66fc765 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
@@ -349,6 +350,7 @@ struct vm_area_struct {
@@ -333,6 +334,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). */
@ -124,10 +124,10 @@ index 808751d..66fc765 100644
#ifndef CONFIG_MMU
diff --git a/kernel/fork.c b/kernel/fork.c
index 11c5c8a..48e7ef7 100644
index b7e9e57..e731a9a 100644
--- a/kernel/fork.c
+++ b/kernel/fork.c
@@ -626,7 +626,7 @@ static __latent_entropy int dup_mmap(struct mm_struct *mm,
@@ -663,7 +663,7 @@ static __latent_entropy int dup_mmap(struct mm_struct *mm,
struct inode *inode = file_inode(file);
struct address_space *mapping = file->f_mapping;
@ -137,12 +137,12 @@ index 11c5c8a..48e7ef7 100644
atomic_dec(&inode->i_writecount);
i_mmap_lock_write(mapping);
diff --git a/mm/Makefile b/mm/Makefile
index 295bd7a..14fa1c8 100644
index 411bd24..e7de927 100644
--- a/mm/Makefile
+++ b/mm/Makefile
@@ -37,7 +37,7 @@ obj-y := filemap.o mempool.o oom_kill.o \
@@ -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 \
compaction.o vmacache.o swap_slots.o \
interval_tree.o list_lru.o workingset.o \
- debug.o $(mmu-y)
+ prfile.o debug.o $(mmu-y)
@ -150,20 +150,20 @@ index 295bd7a..14fa1c8 100644
obj-y += init-mm.o
diff --git a/mm/filemap.c b/mm/filemap.c
index 3f9afde..bb050b0 100644
index 65b4b6e..12f4c94 100644
--- a/mm/filemap.c
+++ b/mm/filemap.c
@@ -2397,7 +2397,7 @@ int filemap_page_mkwrite(struct vm_area_struct *vma, struct vm_fault *vmf)
@@ -2543,7 +2543,7 @@ int filemap_page_mkwrite(struct vm_fault *vmf)
int ret = VM_FAULT_LOCKED;
sb_start_pagefault(inode->i_sb);
- file_update_time(vma->vm_file);
+ vma_file_update_time(vma);
- file_update_time(vmf->vma->vm_file);
+ vma_file_update_time(vmf->vma);
lock_page(page);
if (page->mapping != inode->i_mapping) {
unlock_page(page);
diff --git a/mm/mmap.c b/mm/mmap.c
index dc4291d..4b3a2aa 100644
index f19efcf..7fdd59e 100644
--- a/mm/mmap.c
+++ b/mm/mmap.c
@@ -170,7 +170,7 @@ static struct vm_area_struct *remove_vma(struct vm_area_struct *vma)
@ -175,7 +175,7 @@ index dc4291d..4b3a2aa 100644
mpol_put(vma_policy(vma));
kmem_cache_free(vm_area_cachep, vma);
return next;
@@ -879,7 +879,7 @@ int __vma_adjust(struct vm_area_struct *vma, unsigned long start,
@@ -895,7 +895,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);
@ -184,7 +184,7 @@ index dc4291d..4b3a2aa 100644
}
if (next->anon_vma)
anon_vma_merge(vma, next);
@@ -1727,8 +1727,8 @@ unsigned long mmap_region(struct file *file, unsigned long addr,
@@ -1745,8 +1745,8 @@ unsigned long mmap_region(struct file *file, unsigned long addr,
return addr;
unmap_and_free_vma:
@ -194,7 +194,7 @@ index dc4291d..4b3a2aa 100644
/* Undo any partial mapping done by a device driver. */
unmap_region(mm, vma, prev, vma->vm_start, vma->vm_end);
@@ -2533,7 +2533,7 @@ static int __split_vma(struct mm_struct *mm, struct vm_area_struct *vma,
@@ -2568,7 +2568,7 @@ int __split_vma(struct mm_struct *mm, struct vm_area_struct *vma,
goto out_free_mpol;
if (new->vm_file)
@ -203,7 +203,7 @@ index dc4291d..4b3a2aa 100644
if (new->vm_ops && new->vm_ops->open)
new->vm_ops->open(new);
@@ -2552,7 +2552,7 @@ static int __split_vma(struct mm_struct *mm, struct vm_area_struct *vma,
@@ -2587,7 +2587,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)
@ -212,7 +212,7 @@ index dc4291d..4b3a2aa 100644
unlink_anon_vmas(new);
out_free_mpol:
mpol_put(vma_policy(new));
@@ -2703,7 +2703,7 @@ SYSCALL_DEFINE5(remap_file_pages, unsigned long, start, unsigned long, size,
@@ -2741,7 +2741,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;
@ -221,7 +221,7 @@ index dc4291d..4b3a2aa 100644
pr_warn_once("%s (%d) uses deprecated remap_file_pages() syscall. See Documentation/vm/remap_file_pages.txt.\n",
current->comm, current->pid);
@@ -2778,10 +2778,27 @@ SYSCALL_DEFINE5(remap_file_pages, unsigned long, start, unsigned long, size,
@@ -2816,10 +2816,27 @@ SYSCALL_DEFINE5(remap_file_pages, unsigned long, start, unsigned long, size,
}
}
@ -230,7 +230,7 @@ index dc4291d..4b3a2aa 100644
+ file = vma->vm_file;
+ prfile = vma->vm_prfile;
ret = do_mmap_pgoff(vma->vm_file, start, size,
prot, flags, pgoff, &populate);
prot, flags, pgoff, &populate, NULL);
+ if (!IS_ERR_VALUE(ret) && file && prfile) {
+ struct vm_area_struct *new_vma;
+
@ -250,7 +250,7 @@ index dc4291d..4b3a2aa 100644
out:
up_write(&mm->mmap_sem);
if (populate)
@@ -3056,7 +3073,7 @@ struct vm_area_struct *copy_vma(struct vm_area_struct **vmap,
@@ -3110,7 +3127,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)
@ -260,10 +260,10 @@ index dc4291d..4b3a2aa 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 24f9f5f..ac0d37a 100644
index fc184f5..637ea81 100644
--- a/mm/nommu.c
+++ b/mm/nommu.c
@@ -636,7 +636,7 @@ static void __put_nommu_region(struct vm_region *region)
@@ -641,7 +641,7 @@ static void __put_nommu_region(struct vm_region *region)
up_write(&nommu_region_sem);
if (region->vm_file)
@ -272,7 +272,7 @@ index 24f9f5f..ac0d37a 100644
/* IO memory and memory shared directly out of the pagecache
* from ramfs/tmpfs mustn't be released here */
@@ -794,7 +794,7 @@ static void delete_vma(struct mm_struct *mm, struct vm_area_struct *vma)
@@ -799,7 +799,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)
@ -281,7 +281,7 @@ index 24f9f5f..ac0d37a 100644
put_nommu_region(vma->vm_region);
kmem_cache_free(vm_area_cachep, vma);
}
@@ -1320,7 +1320,7 @@ unsigned long do_mmap(struct file *file,
@@ -1326,7 +1326,7 @@ unsigned long do_mmap(struct file *file,
goto error_just_free;
}
}
@ -290,7 +290,7 @@ index 24f9f5f..ac0d37a 100644
kmem_cache_free(vm_region_jar, region);
region = pregion;
result = start;
@@ -1395,10 +1395,10 @@ unsigned long do_mmap(struct file *file,
@@ -1401,10 +1401,10 @@ unsigned long do_mmap(struct file *file,
up_write(&nommu_region_sem);
error:
if (region->vm_file)
@ -305,18 +305,18 @@ index 24f9f5f..ac0d37a 100644
diff --git a/mm/prfile.c b/mm/prfile.c
new file mode 100644
index 0000000..b323b8a
index 0000000..1ef053b
--- /dev/null
+++ b/mm/prfile.c
@@ -0,0 +1,86 @@
@@ -0,0 +1,85 @@
+/*
+ * Mainly for aufs which mmap(2) diffrent file and wants to print different path
+ * in /proc/PID/maps.
+ * Mainly for aufs which mmap(2) different file and wants to print different
+ * path in /proc/PID/maps.
+ * Call these functions via macros defined in linux/mm.h.
+ *
+ * See Documentation/filesystems/aufs/design/06mmap.txt
+ *
+ * Copyright (c) 2014 Junjro R. Okajima
+ * Copyright (c) 2014-2017 Junjro R. Okajima
+ * Copyright (c) 2014 Ian Campbell
+ */
+
@ -330,8 +330,7 @@ index 0000000..b323b8a
+{
+#ifdef PRFILE_TRACE
+ if (pr)
+ pr_info("%s:%d: %s, %s\n", func, line, func2,
+ f ? (char *)f->f_path.dentry->d_name.name : "(null)");
+ pr_info("%s:%d: %s, %pD2\n", func, line, func2, f);
+#endif
+}
+

View File

@ -1,10 +1,10 @@
aufs4.10 standalone patch
aufs4.13 standalone patch
diff --git a/fs/dcache.c b/fs/dcache.c
index 8ca5f09..b1ff5be 100644
index e3719a5..3203470 100644
--- a/fs/dcache.c
+++ b/fs/dcache.c
@@ -1272,6 +1272,7 @@ void d_walk(struct dentry *parent, void *data,
@@ -1305,6 +1305,7 @@ void d_walk(struct dentry *parent, void *data,
seq = 1;
goto again;
}
@ -12,7 +12,7 @@ index 8ca5f09..b1ff5be 100644
struct check_mount {
struct vfsmount *mnt;
@@ -2864,6 +2865,7 @@ void d_exchange(struct dentry *dentry1, struct dentry *dentry2)
@@ -2894,6 +2895,7 @@ void d_exchange(struct dentry *dentry1, struct dentry *dentry2)
write_sequnlock(&rename_lock);
}
@ -21,10 +21,10 @@ index 8ca5f09..b1ff5be 100644
/**
* d_ancestor - search for an ancestor
diff --git a/fs/exec.c b/fs/exec.c
index e579466..2566b16 100644
index 62175cb..f0b6fdd 100644
--- a/fs/exec.c
+++ b/fs/exec.c
@@ -104,6 +104,7 @@ bool path_noexec(const struct path *path)
@@ -109,6 +109,7 @@ bool path_noexec(const struct path *path)
return (path->mnt->mnt_flags & MNT_NOEXEC) ||
(path->mnt->mnt_sb->s_iflags & SB_I_NOEXEC);
}
@ -33,10 +33,10 @@ index e579466..2566b16 100644
#ifdef CONFIG_USELIB
/*
diff --git a/fs/fcntl.c b/fs/fcntl.c
index 9f07008..d60b682 100644
index 659760e..5c37087 100644
--- a/fs/fcntl.c
+++ b/fs/fcntl.c
@@ -82,6 +82,7 @@ int setfl(int fd, struct file * filp, unsigned long arg)
@@ -84,6 +84,7 @@ int setfl(int fd, struct file * filp, unsigned long arg)
out:
return error;
}
@ -45,10 +45,10 @@ index 9f07008..d60b682 100644
static void f_modown(struct file *filp, struct pid *pid, enum pid_type type,
int force)
diff --git a/fs/file_table.c b/fs/file_table.c
index 6d982b5..9a3c6c8 100644
index 72e861a..01ae52f 100644
--- a/fs/file_table.c
+++ b/fs/file_table.c
@@ -147,6 +147,7 @@ struct file *get_empty_filp(void)
@@ -148,6 +148,7 @@ struct file *get_empty_filp(void)
}
return ERR_PTR(-ENFILE);
}
@ -56,7 +56,7 @@ index 6d982b5..9a3c6c8 100644
/**
* alloc_file - allocate and initialize a 'struct file'
@@ -258,6 +259,7 @@ void flush_delayed_fput(void)
@@ -260,6 +261,7 @@ void flush_delayed_fput(void)
{
delayed_fput(NULL);
}
@ -64,7 +64,7 @@ index 6d982b5..9a3c6c8 100644
static DECLARE_DELAYED_WORK(delayed_fput_work, delayed_fput);
@@ -300,6 +302,7 @@ void __fput_sync(struct file *file)
@@ -302,6 +304,7 @@ void __fput_sync(struct file *file)
}
EXPORT_SYMBOL(fput);
@ -72,7 +72,7 @@ index 6d982b5..9a3c6c8 100644
void put_filp(struct file *file)
{
@@ -308,6 +311,7 @@ void put_filp(struct file *file)
@@ -310,6 +313,7 @@ void put_filp(struct file *file)
file_free(file);
}
}
@ -81,10 +81,10 @@ index 6d982b5..9a3c6c8 100644
void __init files_init(void)
{
diff --git a/fs/inode.c b/fs/inode.c
index 9a9ba3a..a3a18d8 100644
index 73820bf..7db829e 100644
--- a/fs/inode.c
+++ b/fs/inode.c
@@ -1651,6 +1651,7 @@ int update_time(struct inode *inode, struct timespec *time, int flags)
@@ -1650,6 +1650,7 @@ int update_time(struct inode *inode, struct timespec *time, int flags)
return update_time(inode, time, flags);
}
@ -93,10 +93,10 @@ index 9a9ba3a..a3a18d8 100644
/**
* touch_atime - update the access time
diff --git a/fs/namespace.c b/fs/namespace.c
index 487ba30..642069d 100644
index 8601f8d..2268be6 100644
--- a/fs/namespace.c
+++ b/fs/namespace.c
@@ -462,6 +462,7 @@ void __mnt_drop_write(struct vfsmount *mnt)
@@ -463,6 +463,7 @@ void __mnt_drop_write(struct vfsmount *mnt)
mnt_dec_writers(real_mount(mnt));
preempt_enable();
}
@ -104,7 +104,15 @@ index 487ba30..642069d 100644
/**
* mnt_drop_write - give up write access to a mount
@@ -1872,6 +1873,7 @@ int iterate_mounts(int (*f)(struct vfsmount *, void *), void *arg,
@@ -791,6 +792,7 @@ int is_current_mnt_ns(struct vfsmount *mnt)
{
return check_mnt(real_mount(mnt));
}
+EXPORT_SYMBOL_GPL(is_current_mnt_ns);
/*
* vfsmount lock must be held for write
@@ -1829,6 +1831,7 @@ int iterate_mounts(int (*f)(struct vfsmount *, void *), void *arg,
}
return 0;
}
@ -113,7 +121,7 @@ index 487ba30..642069d 100644
static void cleanup_group_ids(struct mount *mnt, struct mount *end)
{
diff --git a/fs/notify/group.c b/fs/notify/group.c
index fbe3cbe..bdfc61e 100644
index 3235753..14a2d48 100644
--- a/fs/notify/group.c
+++ b/fs/notify/group.c
@@ -22,6 +22,7 @@
@ -124,7 +132,7 @@ index fbe3cbe..bdfc61e 100644
#include <linux/fsnotify_backend.h>
#include "fsnotify.h"
@@ -100,6 +101,7 @@ void fsnotify_get_group(struct fsnotify_group *group)
@@ -109,6 +110,7 @@ void fsnotify_get_group(struct fsnotify_group *group)
{
atomic_inc(&group->refcnt);
}
@ -132,7 +140,7 @@ index fbe3cbe..bdfc61e 100644
/*
* Drop a reference to a group. Free it if it's through.
@@ -109,6 +111,7 @@ void fsnotify_put_group(struct fsnotify_group *group)
@@ -118,6 +120,7 @@ void fsnotify_put_group(struct fsnotify_group *group)
if (atomic_dec_and_test(&group->refcnt))
fsnotify_final_destroy_group(group);
}
@ -140,7 +148,7 @@ index fbe3cbe..bdfc61e 100644
/*
* Create a new fsnotify_group and hold a reference for the group returned.
@@ -137,6 +140,7 @@ struct fsnotify_group *fsnotify_alloc_group(const struct fsnotify_ops *ops)
@@ -147,6 +150,7 @@ struct fsnotify_group *fsnotify_alloc_group(const struct fsnotify_ops *ops)
return group;
}
@ -149,43 +157,43 @@ index fbe3cbe..bdfc61e 100644
int fsnotify_fasync(int fd, struct file *file, int on)
{
diff --git a/fs/notify/mark.c b/fs/notify/mark.c
index 6043306..fdb50e4 100644
index 9991f88..117042c 100644
--- a/fs/notify/mark.c
+++ b/fs/notify/mark.c
@@ -113,6 +113,7 @@ void fsnotify_put_mark(struct fsnotify_mark *mark)
mark->free_mark(mark);
}
@@ -118,6 +118,7 @@ static bool fsnotify_get_mark_safe(struct fsnotify_mark *mark)
{
return atomic_inc_not_zero(&mark->refcnt);
}
+EXPORT_SYMBOL_GPL(fsnotify_put_mark);
/* Calculate mask of events for a list of marks */
u32 fsnotify_recalc_mask(struct hlist_head *head)
@@ -230,6 +231,7 @@ void fsnotify_destroy_mark(struct fsnotify_mark *mark,
static void __fsnotify_recalc_mask(struct fsnotify_mark_connector *conn)
{
@@ -395,6 +396,7 @@ void fsnotify_destroy_mark(struct fsnotify_mark *mark,
mutex_unlock(&group->mark_mutex);
fsnotify_free_mark(mark);
}
+EXPORT_SYMBOL_GPL(fsnotify_destroy_mark);
void fsnotify_destroy_marks(struct hlist_head *head, spinlock_t *lock)
{
@@ -415,6 +417,7 @@ int fsnotify_add_mark_locked(struct fsnotify_mark *mark,
/*
* Sorting function for lists of fsnotify marks.
@@ -607,6 +609,7 @@ int fsnotify_add_mark_locked(struct fsnotify_mark *mark, struct inode *inode,
fsnotify_put_mark(mark);
return ret;
}
+EXPORT_SYMBOL_GPL(fsnotify_add_mark);
int fsnotify_add_mark(struct fsnotify_mark *mark, struct fsnotify_group *group,
struct inode *inode, struct vfsmount *mnt, int allow_dups)
@@ -521,6 +524,7 @@ void fsnotify_init_mark(struct fsnotify_mark *mark,
atomic_set(&mark->refcnt, 1);
mark->free_mark = free_mark;
int fsnotify_add_mark(struct fsnotify_mark *mark, struct inode *inode,
struct vfsmount *mnt, int allow_dups)
@@ -742,6 +745,7 @@ void fsnotify_init_mark(struct fsnotify_mark *mark,
fsnotify_get_group(group);
mark->group = group;
}
+EXPORT_SYMBOL_GPL(fsnotify_init_mark);
/*
* Destroy all marks in destroy_list, waits for SRCU period to finish before
diff --git a/fs/open.c b/fs/open.c
index 9921f70..80d94c0 100644
index 35bb784..92e08c5 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,
@ -196,7 +204,7 @@ index 9921f70..80d94c0 100644
long vfs_truncate(const struct path *path, loff_t length)
{
@@ -695,6 +696,7 @@ int open_check_o_direct(struct file *f)
@@ -691,6 +692,7 @@ int open_check_o_direct(struct file *f)
}
return 0;
}
@ -205,10 +213,10 @@ index 9921f70..80d94c0 100644
static int do_dentry_open(struct file *f,
struct inode *inode,
diff --git a/fs/read_write.c b/fs/read_write.c
index 670b365..f9f8bb1 100644
index 6e542f0..c6fa090 100644
--- a/fs/read_write.c
+++ b/fs/read_write.c
@@ -525,6 +525,7 @@ vfs_readf_t vfs_readf(struct file *file)
@@ -483,6 +483,7 @@ vfs_readf_t vfs_readf(struct file *file)
return new_sync_read;
return ERR_PTR(-ENOSYS);
}
@ -216,7 +224,7 @@ index 670b365..f9f8bb1 100644
vfs_writef_t vfs_writef(struct file *file)
{
@@ -536,6 +537,7 @@ vfs_writef_t vfs_writef(struct file *file)
@@ -494,6 +495,7 @@ vfs_writef_t vfs_writef(struct file *file)
return new_sync_write;
return ERR_PTR(-ENOSYS);
}
@ -225,10 +233,10 @@ index 670b365..f9f8bb1 100644
ssize_t __kernel_write(struct file *file, const char *buf, size_t count, loff_t *pos)
{
diff --git a/fs/splice.c b/fs/splice.c
index 178acc0..d1569fa 100644
index 9753304..b38e036 100644
--- a/fs/splice.c
+++ b/fs/splice.c
@@ -870,6 +870,7 @@ long do_splice_from(struct pipe_inode_info *pipe, struct file *out,
@@ -866,6 +866,7 @@ long do_splice_from(struct pipe_inode_info *pipe, struct file *out,
return splice_write(pipe, out, ppos, len, flags);
}
@ -236,7 +244,7 @@ index 178acc0..d1569fa 100644
/*
* Attempt to initiate a splice from a file to a pipe.
@@ -899,6 +900,7 @@ long do_splice_to(struct file *in, loff_t *ppos,
@@ -895,6 +896,7 @@ long do_splice_to(struct file *in, loff_t *ppos,
return splice_read(in, ppos, pipe, len, flags);
}
@ -257,7 +265,7 @@ index 7a5fa3f..c9b9d46 100644
/*
* Write out and wait upon all dirty data associated with this
diff --git a/fs/xattr.c b/fs/xattr.c
index 7e3317c..88910fe 100644
index 464c94b..0234d49 100644
--- a/fs/xattr.c
+++ b/fs/xattr.c
@@ -296,6 +296,7 @@ vfs_getxattr_alloc(struct dentry *dentry, const char *name, char **xattr_value,
@ -268,6 +276,18 @@ index 7e3317c..88910fe 100644
ssize_t
__vfs_getxattr(struct dentry *dentry, struct inode *inode, const char *name,
diff --git a/kernel/locking/lockdep.c b/kernel/locking/lockdep.c
index b072240..80657d7 100644
--- a/kernel/locking/lockdep.c
+++ b/kernel/locking/lockdep.c
@@ -151,6 +151,7 @@ inline struct lock_class *lockdep_hlock_class(struct held_lock *hlock)
}
return lock_classes + hlock->class_idx - 1;
}
+EXPORT_SYMBOL_GPL(lockdep_hlock_class);
#define hlock_class(hlock) lockdep_hlock_class(hlock)
#ifdef CONFIG_LOCK_STAT
diff --git a/kernel/task_work.c b/kernel/task_work.c
index d513051..e056d54 100644
--- a/kernel/task_work.c
@ -278,10 +298,10 @@ index d513051..e056d54 100644
}
+EXPORT_SYMBOL_GPL(task_work_run);
diff --git a/security/commoncap.c b/security/commoncap.c
index 8df676f..6b5cc07 100644
index 7abebd7..c079ce4 100644
--- a/security/commoncap.c
+++ b/security/commoncap.c
@@ -1061,12 +1061,14 @@ int cap_mmap_addr(unsigned long addr)
@@ -1062,12 +1062,14 @@ int cap_mmap_addr(unsigned long addr)
}
return ret;
}
@ -317,10 +337,10 @@ index 03c1652..f88c84b 100644
int devcgroup_inode_mknod(int mode, dev_t dev)
{
diff --git a/security/security.c b/security/security.c
index f825304..8dd441d 100644
index 3013237..342ce8b 100644
--- a/security/security.c
+++ b/security/security.c
@@ -443,6 +443,7 @@ int security_path_rmdir(const struct path *dir, struct dentry *dentry)
@@ -535,6 +535,7 @@ int security_path_rmdir(const struct path *dir, struct dentry *dentry)
return 0;
return call_int_hook(path_rmdir, 0, dir, dentry);
}
@ -328,7 +348,7 @@ index f825304..8dd441d 100644
int security_path_unlink(const struct path *dir, struct dentry *dentry)
{
@@ -459,6 +460,7 @@ int security_path_symlink(const struct path *dir, struct dentry *dentry,
@@ -551,6 +552,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);
}
@ -336,7 +356,7 @@ index f825304..8dd441d 100644
int security_path_link(struct dentry *old_dentry, const struct path *new_dir,
struct dentry *new_dentry)
@@ -467,6 +469,7 @@ int security_path_link(struct dentry *old_dentry, const struct path *new_dir,
@@ -559,6 +561,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);
}
@ -344,7 +364,7 @@ index f825304..8dd441d 100644
int security_path_rename(const struct path *old_dir, struct dentry *old_dentry,
const struct path *new_dir, struct dentry *new_dentry,
@@ -494,6 +497,7 @@ int security_path_truncate(const struct path *path)
@@ -586,6 +589,7 @@ int security_path_truncate(const struct path *path)
return 0;
return call_int_hook(path_truncate, 0, path);
}
@ -352,7 +372,7 @@ index f825304..8dd441d 100644
int security_path_chmod(const struct path *path, umode_t mode)
{
@@ -501,6 +505,7 @@ int security_path_chmod(const struct path *path, umode_t mode)
@@ -593,6 +597,7 @@ int security_path_chmod(const struct path *path, umode_t mode)
return 0;
return call_int_hook(path_chmod, 0, path, mode);
}
@ -360,7 +380,7 @@ index f825304..8dd441d 100644
int security_path_chown(const struct path *path, kuid_t uid, kgid_t gid)
{
@@ -508,6 +513,7 @@ int security_path_chown(const struct path *path, kuid_t uid, kgid_t gid)
@@ -600,6 +605,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);
}
@ -368,7 +388,7 @@ index f825304..8dd441d 100644
int security_path_chroot(const struct path *path)
{
@@ -593,6 +599,7 @@ int security_inode_readlink(struct dentry *dentry)
@@ -685,6 +691,7 @@ int security_inode_readlink(struct dentry *dentry)
return 0;
return call_int_hook(inode_readlink, 0, dentry);
}
@ -376,7 +396,7 @@ index f825304..8dd441d 100644
int security_inode_follow_link(struct dentry *dentry, struct inode *inode,
bool rcu)
@@ -608,6 +615,7 @@ int security_inode_permission(struct inode *inode, int mask)
@@ -700,6 +707,7 @@ int security_inode_permission(struct inode *inode, int mask)
return 0;
return call_int_hook(inode_permission, 0, inode, mask);
}
@ -384,7 +404,7 @@ index f825304..8dd441d 100644
int security_inode_setattr(struct dentry *dentry, struct iattr *attr)
{
@@ -779,6 +787,7 @@ int security_file_permission(struct file *file, int mask)
@@ -871,6 +879,7 @@ int security_file_permission(struct file *file, int mask)
return fsnotify_perm(file, mask);
}
@ -392,7 +412,7 @@ index f825304..8dd441d 100644
int security_file_alloc(struct file *file)
{
@@ -838,6 +847,7 @@ int security_mmap_file(struct file *file, unsigned long prot,
@@ -930,6 +939,7 @@ int security_mmap_file(struct file *file, unsigned long prot,
return ret;
return ima_file_mmap(file, prot);
}

View File

@ -1,10 +1,10 @@
aufs4.10 standalone patch
aufs4.13 standalone patch
diff --git a/fs/dcache.c b/fs/dcache.c
index 8ca5f09..b1ff5be 100644
index e3719a5..3203470 100644
--- a/fs/dcache.c
+++ b/fs/dcache.c
@@ -1272,6 +1272,7 @@ void d_walk(struct dentry *parent, void *data,
@@ -1305,6 +1305,7 @@ void d_walk(struct dentry *parent, void *data,
seq = 1;
goto again;
}
@ -12,7 +12,7 @@ index 8ca5f09..b1ff5be 100644
struct check_mount {
struct vfsmount *mnt;
@@ -2864,6 +2865,7 @@ void d_exchange(struct dentry *dentry1, struct dentry *dentry2)
@@ -2894,6 +2895,7 @@ void d_exchange(struct dentry *dentry1, struct dentry *dentry2)
write_sequnlock(&rename_lock);
}
@ -21,10 +21,10 @@ index 8ca5f09..b1ff5be 100644
/**
* d_ancestor - search for an ancestor
diff --git a/fs/exec.c b/fs/exec.c
index e579466..2566b16 100644
index 62175cb..f0b6fdd 100644
--- a/fs/exec.c
+++ b/fs/exec.c
@@ -104,6 +104,7 @@ bool path_noexec(const struct path *path)
@@ -109,6 +109,7 @@ bool path_noexec(const struct path *path)
return (path->mnt->mnt_flags & MNT_NOEXEC) ||
(path->mnt->mnt_sb->s_iflags & SB_I_NOEXEC);
}
@ -33,10 +33,10 @@ index e579466..2566b16 100644
#ifdef CONFIG_USELIB
/*
diff --git a/fs/fcntl.c b/fs/fcntl.c
index 9f07008..d60b682 100644
index 659760e..5c37087 100644
--- a/fs/fcntl.c
+++ b/fs/fcntl.c
@@ -82,6 +82,7 @@ int setfl(int fd, struct file * filp, unsigned long arg)
@@ -84,6 +84,7 @@ int setfl(int fd, struct file * filp, unsigned long arg)
out:
return error;
}
@ -45,10 +45,10 @@ index 9f07008..d60b682 100644
static void f_modown(struct file *filp, struct pid *pid, enum pid_type type,
int force)
diff --git a/fs/file_table.c b/fs/file_table.c
index 6d982b5..9a3c6c8 100644
index 72e861a..01ae52f 100644
--- a/fs/file_table.c
+++ b/fs/file_table.c
@@ -147,6 +147,7 @@ struct file *get_empty_filp(void)
@@ -148,6 +148,7 @@ struct file *get_empty_filp(void)
}
return ERR_PTR(-ENFILE);
}
@ -56,7 +56,7 @@ index 6d982b5..9a3c6c8 100644
/**
* alloc_file - allocate and initialize a 'struct file'
@@ -258,6 +259,7 @@ void flush_delayed_fput(void)
@@ -260,6 +261,7 @@ void flush_delayed_fput(void)
{
delayed_fput(NULL);
}
@ -64,7 +64,7 @@ index 6d982b5..9a3c6c8 100644
static DECLARE_DELAYED_WORK(delayed_fput_work, delayed_fput);
@@ -300,6 +302,7 @@ void __fput_sync(struct file *file)
@@ -302,6 +304,7 @@ void __fput_sync(struct file *file)
}
EXPORT_SYMBOL(fput);
@ -72,7 +72,7 @@ index 6d982b5..9a3c6c8 100644
void put_filp(struct file *file)
{
@@ -308,6 +311,7 @@ void put_filp(struct file *file)
@@ -310,6 +313,7 @@ void put_filp(struct file *file)
file_free(file);
}
}
@ -81,10 +81,10 @@ index 6d982b5..9a3c6c8 100644
void __init files_init(void)
{
diff --git a/fs/inode.c b/fs/inode.c
index 9a9ba3a..a3a18d8 100644
index 73820bf..7db829e 100644
--- a/fs/inode.c
+++ b/fs/inode.c
@@ -1651,6 +1651,7 @@ int update_time(struct inode *inode, struct timespec *time, int flags)
@@ -1650,6 +1650,7 @@ int update_time(struct inode *inode, struct timespec *time, int flags)
return update_time(inode, time, flags);
}
@ -93,10 +93,10 @@ index 9a9ba3a..a3a18d8 100644
/**
* touch_atime - update the access time
diff --git a/fs/namespace.c b/fs/namespace.c
index 487ba30..642069d 100644
index 8601f8d..2268be6 100644
--- a/fs/namespace.c
+++ b/fs/namespace.c
@@ -462,6 +462,7 @@ void __mnt_drop_write(struct vfsmount *mnt)
@@ -463,6 +463,7 @@ void __mnt_drop_write(struct vfsmount *mnt)
mnt_dec_writers(real_mount(mnt));
preempt_enable();
}
@ -104,7 +104,15 @@ index 487ba30..642069d 100644
/**
* mnt_drop_write - give up write access to a mount
@@ -1872,6 +1873,7 @@ int iterate_mounts(int (*f)(struct vfsmount *, void *), void *arg,
@@ -791,6 +792,7 @@ int is_current_mnt_ns(struct vfsmount *mnt)
{
return check_mnt(real_mount(mnt));
}
+EXPORT_SYMBOL_GPL(is_current_mnt_ns);
/*
* vfsmount lock must be held for write
@@ -1829,6 +1831,7 @@ int iterate_mounts(int (*f)(struct vfsmount *, void *), void *arg,
}
return 0;
}
@ -113,7 +121,7 @@ index 487ba30..642069d 100644
static void cleanup_group_ids(struct mount *mnt, struct mount *end)
{
diff --git a/fs/notify/group.c b/fs/notify/group.c
index fbe3cbe..bdfc61e 100644
index 3235753..14a2d48 100644
--- a/fs/notify/group.c
+++ b/fs/notify/group.c
@@ -22,6 +22,7 @@
@ -124,7 +132,7 @@ index fbe3cbe..bdfc61e 100644
#include <linux/fsnotify_backend.h>
#include "fsnotify.h"
@@ -100,6 +101,7 @@ void fsnotify_get_group(struct fsnotify_group *group)
@@ -109,6 +110,7 @@ void fsnotify_get_group(struct fsnotify_group *group)
{
atomic_inc(&group->refcnt);
}
@ -132,7 +140,7 @@ index fbe3cbe..bdfc61e 100644
/*
* Drop a reference to a group. Free it if it's through.
@@ -109,6 +111,7 @@ void fsnotify_put_group(struct fsnotify_group *group)
@@ -118,6 +120,7 @@ void fsnotify_put_group(struct fsnotify_group *group)
if (atomic_dec_and_test(&group->refcnt))
fsnotify_final_destroy_group(group);
}
@ -140,7 +148,7 @@ index fbe3cbe..bdfc61e 100644
/*
* Create a new fsnotify_group and hold a reference for the group returned.
@@ -137,6 +140,7 @@ struct fsnotify_group *fsnotify_alloc_group(const struct fsnotify_ops *ops)
@@ -147,6 +150,7 @@ struct fsnotify_group *fsnotify_alloc_group(const struct fsnotify_ops *ops)
return group;
}
@ -149,43 +157,43 @@ index fbe3cbe..bdfc61e 100644
int fsnotify_fasync(int fd, struct file *file, int on)
{
diff --git a/fs/notify/mark.c b/fs/notify/mark.c
index 6043306..fdb50e4 100644
index 9991f88..117042c 100644
--- a/fs/notify/mark.c
+++ b/fs/notify/mark.c
@@ -113,6 +113,7 @@ void fsnotify_put_mark(struct fsnotify_mark *mark)
mark->free_mark(mark);
}
@@ -118,6 +118,7 @@ static bool fsnotify_get_mark_safe(struct fsnotify_mark *mark)
{
return atomic_inc_not_zero(&mark->refcnt);
}
+EXPORT_SYMBOL_GPL(fsnotify_put_mark);
/* Calculate mask of events for a list of marks */
u32 fsnotify_recalc_mask(struct hlist_head *head)
@@ -230,6 +231,7 @@ void fsnotify_destroy_mark(struct fsnotify_mark *mark,
static void __fsnotify_recalc_mask(struct fsnotify_mark_connector *conn)
{
@@ -395,6 +396,7 @@ void fsnotify_destroy_mark(struct fsnotify_mark *mark,
mutex_unlock(&group->mark_mutex);
fsnotify_free_mark(mark);
}
+EXPORT_SYMBOL_GPL(fsnotify_destroy_mark);
void fsnotify_destroy_marks(struct hlist_head *head, spinlock_t *lock)
{
@@ -415,6 +417,7 @@ int fsnotify_add_mark_locked(struct fsnotify_mark *mark,
/*
* Sorting function for lists of fsnotify marks.
@@ -607,6 +609,7 @@ int fsnotify_add_mark_locked(struct fsnotify_mark *mark, struct inode *inode,
fsnotify_put_mark(mark);
return ret;
}
+EXPORT_SYMBOL_GPL(fsnotify_add_mark);
int fsnotify_add_mark(struct fsnotify_mark *mark, struct fsnotify_group *group,
struct inode *inode, struct vfsmount *mnt, int allow_dups)
@@ -521,6 +524,7 @@ void fsnotify_init_mark(struct fsnotify_mark *mark,
atomic_set(&mark->refcnt, 1);
mark->free_mark = free_mark;
int fsnotify_add_mark(struct fsnotify_mark *mark, struct inode *inode,
struct vfsmount *mnt, int allow_dups)
@@ -742,6 +745,7 @@ void fsnotify_init_mark(struct fsnotify_mark *mark,
fsnotify_get_group(group);
mark->group = group;
}
+EXPORT_SYMBOL_GPL(fsnotify_init_mark);
/*
* Destroy all marks in destroy_list, waits for SRCU period to finish before
diff --git a/fs/open.c b/fs/open.c
index 9921f70..80d94c0 100644
index 35bb784..92e08c5 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,
@ -196,7 +204,7 @@ index 9921f70..80d94c0 100644
long vfs_truncate(const struct path *path, loff_t length)
{
@@ -695,6 +696,7 @@ int open_check_o_direct(struct file *f)
@@ -691,6 +692,7 @@ int open_check_o_direct(struct file *f)
}
return 0;
}
@ -205,10 +213,10 @@ index 9921f70..80d94c0 100644
static int do_dentry_open(struct file *f,
struct inode *inode,
diff --git a/fs/read_write.c b/fs/read_write.c
index 670b365..f9f8bb1 100644
index 6e542f0..c6fa090 100644
--- a/fs/read_write.c
+++ b/fs/read_write.c
@@ -525,6 +525,7 @@ vfs_readf_t vfs_readf(struct file *file)
@@ -483,6 +483,7 @@ vfs_readf_t vfs_readf(struct file *file)
return new_sync_read;
return ERR_PTR(-ENOSYS);
}
@ -216,7 +224,7 @@ index 670b365..f9f8bb1 100644
vfs_writef_t vfs_writef(struct file *file)
{
@@ -536,6 +537,7 @@ vfs_writef_t vfs_writef(struct file *file)
@@ -494,6 +495,7 @@ vfs_writef_t vfs_writef(struct file *file)
return new_sync_write;
return ERR_PTR(-ENOSYS);
}
@ -225,10 +233,10 @@ index 670b365..f9f8bb1 100644
ssize_t __kernel_write(struct file *file, const char *buf, size_t count, loff_t *pos)
{
diff --git a/fs/splice.c b/fs/splice.c
index 178acc0..d1569fa 100644
index 9753304..b38e036 100644
--- a/fs/splice.c
+++ b/fs/splice.c
@@ -870,6 +870,7 @@ long do_splice_from(struct pipe_inode_info *pipe, struct file *out,
@@ -866,6 +866,7 @@ long do_splice_from(struct pipe_inode_info *pipe, struct file *out,
return splice_write(pipe, out, ppos, len, flags);
}
@ -236,7 +244,7 @@ index 178acc0..d1569fa 100644
/*
* Attempt to initiate a splice from a file to a pipe.
@@ -899,6 +900,7 @@ long do_splice_to(struct file *in, loff_t *ppos,
@@ -895,6 +896,7 @@ long do_splice_to(struct file *in, loff_t *ppos,
return splice_read(in, ppos, pipe, len, flags);
}
@ -257,7 +265,7 @@ index 7a5fa3f..c9b9d46 100644
/*
* Write out and wait upon all dirty data associated with this
diff --git a/fs/xattr.c b/fs/xattr.c
index 7e3317c..88910fe 100644
index 464c94b..0234d49 100644
--- a/fs/xattr.c
+++ b/fs/xattr.c
@@ -296,6 +296,7 @@ vfs_getxattr_alloc(struct dentry *dentry, const char *name, char **xattr_value,
@ -268,6 +276,18 @@ index 7e3317c..88910fe 100644
ssize_t
__vfs_getxattr(struct dentry *dentry, struct inode *inode, const char *name,
diff --git a/kernel/locking/lockdep.c b/kernel/locking/lockdep.c
index b072240..80657d7 100644
--- a/kernel/locking/lockdep.c
+++ b/kernel/locking/lockdep.c
@@ -151,6 +151,7 @@ inline struct lock_class *lockdep_hlock_class(struct held_lock *hlock)
}
return lock_classes + hlock->class_idx - 1;
}
+EXPORT_SYMBOL_GPL(lockdep_hlock_class);
#define hlock_class(hlock) lockdep_hlock_class(hlock)
#ifdef CONFIG_LOCK_STAT
diff --git a/kernel/task_work.c b/kernel/task_work.c
index d513051..e056d54 100644
--- a/kernel/task_work.c
@ -278,10 +298,10 @@ index d513051..e056d54 100644
}
+EXPORT_SYMBOL_GPL(task_work_run);
diff --git a/security/commoncap.c b/security/commoncap.c
index 8df676f..6b5cc07 100644
index 7abebd7..c079ce4 100644
--- a/security/commoncap.c
+++ b/security/commoncap.c
@@ -1061,12 +1061,14 @@ int cap_mmap_addr(unsigned long addr)
@@ -1062,12 +1062,14 @@ int cap_mmap_addr(unsigned long addr)
}
return ret;
}
@ -317,10 +337,10 @@ index 03c1652..f88c84b 100644
int devcgroup_inode_mknod(int mode, dev_t dev)
{
diff --git a/security/security.c b/security/security.c
index f825304..8dd441d 100644
index 3013237..342ce8b 100644
--- a/security/security.c
+++ b/security/security.c
@@ -443,6 +443,7 @@ int security_path_rmdir(const struct path *dir, struct dentry *dentry)
@@ -535,6 +535,7 @@ int security_path_rmdir(const struct path *dir, struct dentry *dentry)
return 0;
return call_int_hook(path_rmdir, 0, dir, dentry);
}
@ -328,7 +348,7 @@ index f825304..8dd441d 100644
int security_path_unlink(const struct path *dir, struct dentry *dentry)
{
@@ -459,6 +460,7 @@ int security_path_symlink(const struct path *dir, struct dentry *dentry,
@@ -551,6 +552,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);
}
@ -336,7 +356,7 @@ index f825304..8dd441d 100644
int security_path_link(struct dentry *old_dentry, const struct path *new_dir,
struct dentry *new_dentry)
@@ -467,6 +469,7 @@ int security_path_link(struct dentry *old_dentry, const struct path *new_dir,
@@ -559,6 +561,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);
}
@ -344,7 +364,7 @@ index f825304..8dd441d 100644
int security_path_rename(const struct path *old_dir, struct dentry *old_dentry,
const struct path *new_dir, struct dentry *new_dentry,
@@ -494,6 +497,7 @@ int security_path_truncate(const struct path *path)
@@ -586,6 +589,7 @@ int security_path_truncate(const struct path *path)
return 0;
return call_int_hook(path_truncate, 0, path);
}
@ -352,7 +372,7 @@ index f825304..8dd441d 100644
int security_path_chmod(const struct path *path, umode_t mode)
{
@@ -501,6 +505,7 @@ int security_path_chmod(const struct path *path, umode_t mode)
@@ -593,6 +597,7 @@ int security_path_chmod(const struct path *path, umode_t mode)
return 0;
return call_int_hook(path_chmod, 0, path, mode);
}
@ -360,7 +380,7 @@ index f825304..8dd441d 100644
int security_path_chown(const struct path *path, kuid_t uid, kgid_t gid)
{
@@ -508,6 +513,7 @@ int security_path_chown(const struct path *path, kuid_t uid, kgid_t gid)
@@ -600,6 +605,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);
}
@ -368,7 +388,7 @@ index f825304..8dd441d 100644
int security_path_chroot(const struct path *path)
{
@@ -593,6 +599,7 @@ int security_inode_readlink(struct dentry *dentry)
@@ -685,6 +691,7 @@ int security_inode_readlink(struct dentry *dentry)
return 0;
return call_int_hook(inode_readlink, 0, dentry);
}
@ -376,7 +396,7 @@ index f825304..8dd441d 100644
int security_inode_follow_link(struct dentry *dentry, struct inode *inode,
bool rcu)
@@ -608,6 +615,7 @@ int security_inode_permission(struct inode *inode, int mask)
@@ -700,6 +707,7 @@ int security_inode_permission(struct inode *inode, int mask)
return 0;
return call_int_hook(inode_permission, 0, inode, mask);
}
@ -384,7 +404,7 @@ index f825304..8dd441d 100644
int security_inode_setattr(struct dentry *dentry, struct iattr *attr)
{
@@ -779,6 +787,7 @@ int security_file_permission(struct file *file, int mask)
@@ -871,6 +879,7 @@ int security_file_permission(struct file *file, int mask)
return fsnotify_perm(file, mask);
}
@ -392,7 +412,7 @@ index f825304..8dd441d 100644
int security_file_alloc(struct file *file)
{
@@ -838,6 +847,7 @@ int security_mmap_file(struct file *file, unsigned long prot,
@@ -930,6 +939,7 @@ int security_mmap_file(struct file *file, unsigned long prot,
return ret;
return ima_file_mmap(file, prot);
}

File diff suppressed because it is too large Load Diff

File diff suppressed because it is too large Load Diff

View File

@ -11,6 +11,7 @@ CONFIG_AUFS_INO_T_64=y
# CONFIG_AUFS_FHSM is not set
# CONFIG_AUFS_XATTR is not set
CONFIG_AUFS_RDU=y
# CONFIG_AUFS_DIRREN is not set
CONFIG_AUFS_SHWH=y
CONFIG_AUFS_BR_RAMFS=y
CONFIG_AUFS_BR_FUSE=y

File diff suppressed because it is too large Load Diff

View File

@ -5,7 +5,7 @@ rm -Rf aufs4-standalone
git clone git://github.com/sfjro/aufs4-standalone.git aufs4-standalone
cd aufs4-standalone
git branch -r
git checkout origin/aufs4.10
git checkout origin/aufs4.13
# modify what you want
@ -15,16 +15,16 @@ git checkout origin/aufs4.10
rm -v $(find . -type f -name '*.orig')
grep -qse 'EXPORT_SYMBOL(' aufs4-standalone.patch && \
sed -i-old -e 's|EXPORT_SYMBOL(|EXPORT_SYMBOL_GPL(|' aufs4-standalone.patch
rm -rf ../tmp/linux-4.10
mkdir -p ../tmp/linux-4.10
cp -a fs ../tmp/linux-4.10
cp -a include ../tmp/linux-4.10
cp -a Documentation ../tmp/linux-4.10
rm ../tmp/linux-4.10/include/uapi/linux/Kbuild
rm -rf ../tmp/linux-4.13
mkdir -p ../tmp/linux-4.13
cp -a fs ../tmp/linux-4.13
cp -a include ../tmp/linux-4.13
cp -a Documentation ../tmp/linux-4.13
rm ../tmp/linux-4.13/include/uapi/linux/Kbuild
cd ../tmp
diff -Naur null linux-4.10 | filterdiff | \
sed -e 's|null\(/include/uapi/linux/Kbuild\)|linux-4.10-old\1|;s|^--- null.*|--- /dev/null|;\|linux-4.10/include/uapi/linux/Kbuild|,${\|@@ -0,0 +1 @@|,$d}' \
| bzip2 > aufs$(sed -ne 's|#define.*AUFS_VERSION.*"\(.*\)"|\1|p' linux-4.10/include/uapi/linux/aufs_type.h).patch.bz2
diff -Naur null linux-4.13 | filterdiff | \
sed -e 's|null\(/include/uapi/linux/Kbuild\)|linux-4.13-old\1|;s|^--- null.*|--- /dev/null|;\|linux-4.13/include/uapi/linux/Kbuild|,${\|@@ -0,0 +1 @@|,$d}' \
| bzip2 > aufs$(sed -ne 's|#define.*AUFS_VERSION.*"\(.*\)"|\1|p' linux-4.13/include/uapi/linux/aufs_type.h).patch.bz2
mv *.bz2 $OLDPWD
cd $OLDPWD
mv *patch* ..

View File

@ -1,14 +1,18 @@
#!/bin/bash
surum=4.10.17
surum=4.13.12
sonek=milis
depmod ${surum}-$sonek
cd /boot
if [ -f kernel ];then
rm kernel
fi
[ -L /boot/kernel ] && rm -rf /boot/kernel
ln -s kernel-$surum kernel
if [ -f initramfs ];then
mv initramfs initramfs_eski
fi
dracut -N --force --xz --omit systemd --add-drivers "ahci" -f /boot/initramfs $surum-$sonek
os-prober
grub-mkconfig -o /boot/grub/grub.cfg
[ -f /usr/bin/dracut ] && dracut -N --force --xz --omit systemd --add-drivers "ahci" -f /boot/initramfs $surum-$sonek
[ -f /usr/bin/os-prober ] && os-prober
if [ -f /usr/bin/grub-mkconfig ];then
[ -f /boot/grub/grub.cfg ] && mv /boot/grub/grub.cfg /boot/grub/grub.cfg.eski
grub-mkconfig -o /boot/grub/grub.cfg
fi
cd -

View File

@ -1,7 +1,7 @@
aufs4.10 lockdep patch
aufs4.13 lockdep patch
diff --git a/include/linux/lockdep.h b/include/linux/lockdep.h
index 1e327bb..0345cbf 100644
index f753750..3e7ef18 100644
--- a/include/linux/lockdep.h
+++ b/include/linux/lockdep.h
@@ -16,7 +16,7 @@ struct lockdep_map;
@ -23,7 +23,7 @@ index 1e327bb..0345cbf 100644
* Subtract one because we offset hlock->class_idx by 1 in order
* to make 0 mean no class. This avoids overflowing the class_idx
diff --git a/kernel/locking/lockdep_internals.h b/kernel/locking/lockdep_internals.h
index c2b8849..9c8f717 100644
index c08fbd2..b868e7b 100644
--- a/kernel/locking/lockdep_internals.h
+++ b/kernel/locking/lockdep_internals.h
@@ -66,15 +66,15 @@ enum {

View File

@ -1,15 +1,16 @@
# Tanım: kararli kernel surumu
# Tanım: Kararli kernel sürümü
# URL: http://www.kernel.org
# Paketçi: milisarge
# Gerekler: linux-firmware intel-ucode
isim=kernel
_basekernel=4.10
surum=4.10.17
_basekernel=4.13
surum=4.13.12
devir=1
kaynak=(http://www.kernel.org/pub/linux/kernel/v4.x/linux-4.10.tar.xz
kaynak=(http://www.kernel.org/pub/linux/kernel/v4.x/linux-$_basekernel.tar.xz
http://www.kernel.org/pub/linux/kernel/v4.x/patch-${surum}.xz
https://github.com/copperhead/linux-hardened/releases/download/4.13.12.a/linux-hardened-${surum}.a.patch
config
aufs4-loopback.patch
aufs4-base.patch
@ -27,12 +28,15 @@ kaynak=(http://www.kernel.org/pub/linux/kernel/v4.x/linux-4.10.tar.xz
derle() {
cd "${SRC}/linux-${_basekernel}"
cd "${SRC}/linux-$_basekernel"
cp "${SRC}/patch-$surum.xz" .
unxz patch-$surum.xz
# güncel kernel yama
patch -p1 -i "patch-${surum}"
# güvenli kernel yaması
patch -p1 -i "${SRC}/linux-hardened-${surum}.a.patch"
patch -p1 -i "${SRC}/i8042-fix-aliases.patch"
#çalışan sistem aufs yamaları
@ -42,9 +46,11 @@ derle() {
patch -p1 -i "${SRC}/aufs4-loopback.patch"
patch -p1 -i "${SRC}/aufs4-mmap.patch"
patch -p1 -i "${SRC}/aufs4-standalone.patch"
patch -p1 -i "${SRC}/lockdep-debug.patch"
#patch -p1 -i "${SRC}/lockdep-debug.patch"
patch -p1 -i "${SRC}/tmpfs-idr.patch"
patch -p1 -i "${SRC}/vfs-ino.patch"
#fix error: too few arguments to function 'loop_switch' error with RC aufs patches
sed -i "s|return loop_switch(lo, NULL);|return loop_switch(lo, NULL, NULL);|g" drivers/block/loop.c
cat "${SRC}/config" > ./.config
@ -59,13 +65,10 @@ derle() {
export KBUILD_BUILD_USER="milisarge"
export KBUILD_BUILD_HOST="`uname -m`.milislinux.org"
# get kernel version
make prepare
# rewrite configuration
yes "" | make config >/dev/null
# ayarları onaylama
yes "" | make oldconfig >/dev/null
# build!
# derleme
make ${MAKEFLAGS} bzImage modules
KARCH=x86
@ -78,17 +81,17 @@ derle() {
make INSTALL_MOD_PATH="${PKG}" modules_install
cp arch/$KARCH/boot/bzImage "${PKG}/boot/kernel-${surum}"
# add vmlinux
# vmlinux un source a eklenmesi,modül derlerken bu geçici silinecek
install -D -m644 vmlinux "${PKG}/usr/src/linux-${_kernver}/vmlinux"
# remove build and source links
# derleme kalıntılarının temizlenmesi
rm -f "${PKG}"/lib/modules/${_kernver}/{source,build}
# remove the firmware
# firmwarelerin temizlenmesi
rm -rf "${PKG}/lib/firmware"
# gzip -9 all modules to save 100MB of space
# modüllerin sıkıştırılarak ek yer kazanılması
find "${PKG}" -name '*.ko' -exec gzip -9 {} \;
#linux-headers
#linux-headers / linux modülleri
install -dm755 "${PKG}/lib/modules/${_kernver}"
@ -146,11 +149,7 @@ derle() {
mkdir -p "${PKG}/usr/src/linux-${_kernver}/drivers/media/i2c/${i}"
cp -a drivers/media/i2c/${i}/*.h "${PKG}/usr/src/linux-${_kernver}/drivers/media/i2c/${i}"
done
# add docbook makefile
install -D -m644 Documentation/DocBook/Makefile \
"${PKG}/usr/src/linux-${_kernver}/Documentation/DocBook/Makefile"
# add dm headers
mkdir -p "${PKG}/usr/src/linux-${_kernver}/drivers/md"
cp drivers/md/*.h "${PKG}/usr/src/linux-${_kernver}/drivers/md"

View File

@ -1,5 +1,5 @@
diff --git a/include/linux/shmem_fs.h b/include/linux/shmem_fs.h
index ff078e7..1edb519 100644
index a7d6bd2..9e93fbc 100644
--- a/include/linux/shmem_fs.h
+++ b/include/linux/shmem_fs.h
@@ -24,10 +24,13 @@ struct shmem_inode_info {
@ -19,10 +19,10 @@ index ff078e7..1edb519 100644
umode_t mode; /* Mount mode for root directory */
unsigned char huge; /* Whether to try for hugepages */
diff --git a/mm/shmem.c b/mm/shmem.c
index 3a7587a..ee08dfd 100644
index fbcb3c9..859e4c2 100644
--- a/mm/shmem.c
+++ b/mm/shmem.c
@@ -104,9 +104,13 @@ static unsigned long shmem_default_max_blocks(void)
@@ -110,9 +110,13 @@ static unsigned long shmem_default_max_blocks(void)
return totalram_pages / 2;
}
@ -38,7 +38,7 @@ index 3a7587a..ee08dfd 100644
}
#endif
@@ -1052,6 +1056,11 @@ static void shmem_evict_inode(struct inode *inode)
@@ -1068,6 +1072,11 @@ static void shmem_evict_inode(struct inode *inode)
simple_xattrs_free(&info->xattrs);
WARN_ON(inode->i_blocks);
@ -50,7 +50,7 @@ index 3a7587a..ee08dfd 100644
shmem_free_inode(inode->i_sb);
clear_inode(inode);
}
@@ -2120,13 +2129,13 @@ static struct inode *shmem_get_inode(struct super_block *sb, const struct inode
@@ -2148,13 +2157,13 @@ static struct inode *shmem_get_inode(struct super_block *sb, const struct inode
struct inode *inode;
struct shmem_inode_info *info;
struct shmem_sb_info *sbinfo = SHMEM_SB(sb);
@ -65,7 +65,7 @@ index 3a7587a..ee08dfd 100644
inode_init_owner(inode, dir, mode);
inode->i_blocks = 0;
inode->i_atime = inode->i_mtime = inode->i_ctime = current_time(inode);
@@ -2168,6 +2177,25 @@ static struct inode *shmem_get_inode(struct super_block *sb, const struct inode
@@ -2196,6 +2205,25 @@ static struct inode *shmem_get_inode(struct super_block *sb, const struct inode
mpol_shared_policy_init(&info->policy, NULL);
break;
}
@ -91,7 +91,7 @@ index 3a7587a..ee08dfd 100644
} else
shmem_free_inode(sb);
return inode;
@@ -3240,8 +3268,7 @@ static struct dentry *shmem_get_parent(struct dentry *child)
@@ -3381,8 +3409,7 @@ static struct dentry *shmem_get_parent(struct dentry *child)
static int shmem_match(struct inode *ino, void *vfh)
{
__u32 *fh = vfh;
@ -101,7 +101,7 @@ index 3a7587a..ee08dfd 100644
return ino->i_ino == inum && fh[0] == ino->i_generation;
}
@@ -3252,14 +3279,11 @@ static struct dentry *shmem_fh_to_dentry(struct super_block *sb,
@@ -3393,14 +3420,11 @@ static struct dentry *shmem_fh_to_dentry(struct super_block *sb,
struct dentry *dentry = NULL;
u64 inum;
@ -119,7 +119,7 @@ index 3a7587a..ee08dfd 100644
if (inode) {
dentry = d_find_alias(inode);
iput(inode);
@@ -3271,30 +3295,15 @@ static struct dentry *shmem_fh_to_dentry(struct super_block *sb,
@@ -3412,30 +3436,15 @@ static struct dentry *shmem_fh_to_dentry(struct super_block *sb,
static int shmem_encode_fh(struct inode *inode, __u32 *fh, int *len,
struct inode *parent)
{
@ -153,7 +153,7 @@ index 3a7587a..ee08dfd 100644
return 1;
}
@@ -3358,7 +3367,7 @@ static int shmem_parse_options(char *options, struct shmem_sb_info *sbinfo,
@@ -3499,7 +3508,7 @@ static int shmem_parse_options(char *options, struct shmem_sb_info *sbinfo,
goto bad_val;
} else if (!strcmp(this_char,"nr_inodes")) {
sbinfo->max_inodes = memparse(value, &rest);
@ -162,7 +162,7 @@ index 3a7587a..ee08dfd 100644
goto bad_val;
} else if (!strcmp(this_char,"mode")) {
if (remount)
@@ -3423,7 +3432,7 @@ static int shmem_remount_fs(struct super_block *sb, int *flags, char *data)
@@ -3564,7 +3573,7 @@ static int shmem_remount_fs(struct super_block *sb, int *flags, char *data)
{
struct shmem_sb_info *sbinfo = SHMEM_SB(sb);
struct shmem_sb_info config = *sbinfo;
@ -171,7 +171,7 @@ index 3a7587a..ee08dfd 100644
int error = -EINVAL;
config.mpol = NULL;
@@ -3472,7 +3481,7 @@ static int shmem_show_options(struct seq_file *seq, struct dentry *root)
@@ -3613,7 +3622,7 @@ static int shmem_show_options(struct seq_file *seq, struct dentry *root)
seq_printf(seq, ",size=%luk",
sbinfo->max_blocks << (PAGE_SHIFT - 10));
if (sbinfo->max_inodes != shmem_default_max_inodes())
@ -180,7 +180,7 @@ index 3a7587a..ee08dfd 100644
if (sbinfo->mode != (S_IRWXUGO | S_ISVTX))
seq_printf(seq, ",mode=%03ho", sbinfo->mode);
if (!uid_eq(sbinfo->uid, GLOBAL_ROOT_UID))
@@ -3566,6 +3575,8 @@ static void shmem_put_super(struct super_block *sb)
@@ -3707,6 +3716,8 @@ static void shmem_put_super(struct super_block *sb)
{
struct shmem_sb_info *sbinfo = SHMEM_SB(sb);
@ -189,7 +189,7 @@ index 3a7587a..ee08dfd 100644
percpu_counter_destroy(&sbinfo->used_blocks);
mpol_put(sbinfo->mpol);
kfree(sbinfo);
@@ -3584,6 +3595,8 @@ int shmem_fill_super(struct super_block *sb, void *data, int silent)
@@ -3725,6 +3736,8 @@ int shmem_fill_super(struct super_block *sb, void *data, int silent)
if (!sbinfo)
return -ENOMEM;
@ -198,7 +198,7 @@ index 3a7587a..ee08dfd 100644
sbinfo->mode = S_IRWXUGO | S_ISVTX;
sbinfo->uid = current_fsuid();
sbinfo->gid = current_fsgid();
@@ -3691,6 +3704,15 @@ static void shmem_destroy_inodecache(void)
@@ -3833,6 +3846,15 @@ static void shmem_destroy_inodecache(void)
kmem_cache_destroy(shmem_inode_cachep);
}
@ -214,11 +214,11 @@ index 3a7587a..ee08dfd 100644
static const struct address_space_operations shmem_aops = {
.writepage = shmem_writepage,
.set_page_dirty = __set_page_dirty_no_writeback,
@@ -3823,6 +3845,7 @@ int __init shmem_init(void)
@@ -3965,6 +3987,7 @@ int __init shmem_init(void)
pr_err("Could not kern_mount tmpfs\n");
goto out1;
}
+ shmem_no_idr(shm_mnt->mnt_sb);
#ifdef CONFIG_TRANSPARENT_HUGE_PAGECACHE
if (has_transparent_hugepage() && shmem_huge < SHMEM_HUGE_DENY)
if (has_transparent_hugepage() && shmem_huge > SHMEM_HUGE_DENY)

View File

@ -1,5 +1,5 @@
diff --git a/fs/inode.c b/fs/inode.c
index 88110fd..64a2f22 100644
index 5037059..b55807b 100644
--- a/fs/inode.c
+++ b/fs/inode.c
@@ -855,6 +855,8 @@ unsigned int get_next_ino(void)