diff options
Diffstat (limited to 'target/linux')
9 files changed, 18 insertions, 228 deletions
diff --git a/target/linux/generic/patches-4.4/051-0002-ovl-override-creds-with-the-ones-from-the-superblock.patch b/target/linux/generic/patches-4.4/051-0002-ovl-override-creds-with-the-ones-from-the-superblock.patch index 8a7d00aeb0..77ceadf1df 100644 --- a/target/linux/generic/patches-4.4/051-0002-ovl-override-creds-with-the-ones-from-the-superblock.patch +++ b/target/linux/generic/patches-4.4/051-0002-ovl-override-creds-with-the-ones-from-the-superblock.patch @@ -58,7 +58,7 @@ Signed-off-by: Miklos Szeredi <mszeredi@redhat.com> --- a/fs/overlayfs/copy_up.c +++ b/fs/overlayfs/copy_up.c -@@ -303,7 +303,6 @@ int ovl_copy_up_one(struct dentry *paren +@@ -305,7 +305,6 @@ int ovl_copy_up_one(struct dentry *paren struct dentry *upperdir; struct dentry *upperdentry; const struct cred *old_cred; @@ -66,7 +66,7 @@ Signed-off-by: Miklos Szeredi <mszeredi@redhat.com> char *link = NULL; if (WARN_ON(!workdir)) -@@ -322,28 +321,7 @@ int ovl_copy_up_one(struct dentry *paren +@@ -324,28 +323,7 @@ int ovl_copy_up_one(struct dentry *paren return PTR_ERR(link); } @@ -96,7 +96,7 @@ Signed-off-by: Miklos Szeredi <mszeredi@redhat.com> err = -EIO; if (lock_rename(workdir, upperdir) != NULL) { -@@ -366,9 +344,7 @@ int ovl_copy_up_one(struct dentry *paren +@@ -368,9 +346,7 @@ int ovl_copy_up_one(struct dentry *paren out_unlock: unlock_rename(workdir, upperdir); revert_creds(old_cred); @@ -309,7 +309,7 @@ Signed-off-by: Miklos Szeredi <mszeredi@redhat.com> kfree(ufs); } -@@ -1068,10 +1078,14 @@ static int ovl_fill_super(struct super_b +@@ -1087,10 +1097,14 @@ static int ovl_fill_super(struct super_b else sb->s_d_op = &ovl_dentry_operations; @@ -325,7 +325,7 @@ Signed-off-by: Miklos Szeredi <mszeredi@redhat.com> root_dentry = d_make_root(ovl_new_inode(sb, S_IFDIR, oe)); if (!root_dentry) -@@ -1104,6 +1118,8 @@ static int ovl_fill_super(struct super_b +@@ -1123,6 +1137,8 @@ static int ovl_fill_super(struct super_b out_free_oe: kfree(oe); diff --git a/target/linux/generic/patches-4.4/051-0003-ovl-don-t-copy-up-opaqueness.patch b/target/linux/generic/patches-4.4/051-0003-ovl-don-t-copy-up-opaqueness.patch deleted file mode 100644 index da9e380a32..0000000000 --- a/target/linux/generic/patches-4.4/051-0003-ovl-don-t-copy-up-opaqueness.patch +++ /dev/null @@ -1,73 +0,0 @@ -From 0956254a2d5b9e2141385514553aeef694dfe3b5 Mon Sep 17 00:00:00 2001 -From: Miklos Szeredi <mszeredi@redhat.com> -Date: Mon, 8 Aug 2016 15:08:49 +0200 -Subject: [PATCH] ovl: don't copy up opaqueness - -When a copy up of a directory occurs which has the opaque xattr set, the -xattr remains in the upper directory. The immediate behavior with overlayfs -is that the upper directory is not treated as opaque, however after a -remount the opaque flag is used and upper directory is treated as opaque. -This causes files created in the lower layer to be hidden when using -multiple lower directories. - -Fix by not copying up the opaque flag. - -To reproduce: - - ----8<---------8<---------8<---------8<---------8<---------8<---- -mkdir -p l/d/s u v w mnt -mount -t overlay overlay -olowerdir=l,upperdir=u,workdir=w mnt -rm -rf mnt/d/ -mkdir -p mnt/d/n -umount mnt -mount -t overlay overlay -olowerdir=u:l,upperdir=v,workdir=w mnt -touch mnt/d/foo -umount mnt -mount -t overlay overlay -olowerdir=u:l,upperdir=v,workdir=w mnt -ls mnt/d - ----8<---------8<---------8<---------8<---------8<---------8<---- - -output should be: "foo n" - -Reported-by: Derek McGowan <dmcg@drizz.net> -Link: https://bugzilla.kernel.org/show_bug.cgi?id=151291 -Signed-off-by: Miklos Szeredi <mszeredi@redhat.com> -Cc: <stable@vger.kernel.org> ---- - fs/overlayfs/copy_up.c | 2 ++ - fs/overlayfs/inode.c | 2 +- - fs/overlayfs/overlayfs.h | 1 + - 3 files changed, 4 insertions(+), 1 deletion(-) - ---- a/fs/overlayfs/copy_up.c -+++ b/fs/overlayfs/copy_up.c -@@ -48,6 +48,8 @@ int ovl_copy_xattr(struct dentry *old, s - } - - for (name = buf; name < (buf + list_size); name += strlen(name) + 1) { -+ if (ovl_is_private_xattr(name)) -+ continue; - retry: - size = vfs_getxattr(old, name, value, value_size); - if (size == -ERANGE) ---- a/fs/overlayfs/inode.c -+++ b/fs/overlayfs/inode.c -@@ -219,7 +219,7 @@ static int ovl_readlink(struct dentry *d - } - - --static bool ovl_is_private_xattr(const char *name) -+bool ovl_is_private_xattr(const char *name) - { - return strncmp(name, OVL_XATTR_PRE_NAME, OVL_XATTR_PRE_LEN) == 0; - } ---- a/fs/overlayfs/overlayfs.h -+++ b/fs/overlayfs/overlayfs.h -@@ -175,6 +175,7 @@ ssize_t ovl_getxattr(struct dentry *dent - ssize_t ovl_listxattr(struct dentry *dentry, char *list, size_t size); - int ovl_removexattr(struct dentry *dentry, const char *name); - struct inode *ovl_d_select_inode(struct dentry *dentry, unsigned file_flags); -+bool ovl_is_private_xattr(const char *name); - - struct inode *ovl_new_inode(struct super_block *sb, umode_t mode, - struct ovl_entry *oe); diff --git a/target/linux/generic/patches-4.4/051-0004-ovl-remove-posix_acl_default-from-workdir.patch b/target/linux/generic/patches-4.4/051-0004-ovl-remove-posix_acl_default-from-workdir.patch deleted file mode 100644 index 1785c9ad55..0000000000 --- a/target/linux/generic/patches-4.4/051-0004-ovl-remove-posix_acl_default-from-workdir.patch +++ /dev/null @@ -1,49 +0,0 @@ -From c11b9fdd6a612f376a5e886505f1c54c16d8c380 Mon Sep 17 00:00:00 2001 -From: Miklos Szeredi <mszeredi@redhat.com> -Date: Thu, 1 Sep 2016 11:11:59 +0200 -Subject: [PATCH] ovl: remove posix_acl_default from workdir - -Clear out posix acl xattrs on workdir and also reset the mode after -creation so that an inherited sgid bit is cleared. - -Signed-off-by: Miklos Szeredi <mszeredi@redhat.com> -Cc: <stable@vger.kernel.org> ---- - fs/overlayfs/super.c | 19 +++++++++++++++++++ - 1 file changed, 19 insertions(+) - ---- a/fs/overlayfs/super.c -+++ b/fs/overlayfs/super.c -@@ -773,6 +773,10 @@ retry: - struct kstat stat = { - .mode = S_IFDIR | 0, - }; -+ struct iattr attr = { -+ .ia_valid = ATTR_MODE, -+ .ia_mode = stat.mode, -+ }; - - if (work->d_inode) { - err = -EEXIST; -@@ -788,6 +792,21 @@ retry: - err = ovl_create_real(dir, work, &stat, NULL, NULL, true); - if (err) - goto out_dput; -+ -+ err = vfs_removexattr(work, XATTR_NAME_POSIX_ACL_DEFAULT); -+ if (err && err != -ENODATA) -+ goto out_dput; -+ -+ err = vfs_removexattr(work, XATTR_NAME_POSIX_ACL_ACCESS); -+ if (err && err != -ENODATA) -+ goto out_dput; -+ -+ /* Clear any inherited mode bits */ -+ mutex_lock(&work->d_inode->i_mutex); -+ err = notify_change(work, &attr, NULL); -+ mutex_unlock(&work->d_inode->i_mutex); -+ if (err) -+ goto out_dput; - } - out_unlock: - mutex_unlock(&dir->i_mutex); diff --git a/target/linux/generic/patches-4.4/051-0006-ovl-listxattr-use-strnlen.patch b/target/linux/generic/patches-4.4/051-0006-ovl-listxattr-use-strnlen.patch deleted file mode 100644 index 82ad20db4c..0000000000 --- a/target/linux/generic/patches-4.4/051-0006-ovl-listxattr-use-strnlen.patch +++ /dev/null @@ -1,53 +0,0 @@ -From 7cb35119d067191ce9ebc380a599db0b03cbd9d9 Mon Sep 17 00:00:00 2001 -From: Miklos Szeredi <mszeredi@redhat.com> -Date: Thu, 1 Sep 2016 11:12:00 +0200 -Subject: [PATCH] ovl: listxattr: use strnlen() - -Be defensive about what underlying fs provides us in the returned xattr -list buffer. If it's not properly null terminated, bail out with a warning -insead of BUG. - -Signed-off-by: Miklos Szeredi <mszeredi@redhat.com> -Cc: <stable@vger.kernel.org> ---- - fs/overlayfs/inode.c | 17 ++++++++++------- - 1 file changed, 10 insertions(+), 7 deletions(-) - ---- a/fs/overlayfs/inode.c -+++ b/fs/overlayfs/inode.c -@@ -277,7 +277,8 @@ ssize_t ovl_listxattr(struct dentry *den - struct path realpath; - enum ovl_path_type type = ovl_path_real(dentry, &realpath); - ssize_t res; -- int off; -+ size_t len; -+ char *s; - - res = vfs_listxattr(realpath.dentry, list, size); - if (res <= 0 || size == 0) -@@ -287,17 +288,19 @@ ssize_t ovl_listxattr(struct dentry *den - return res; - - /* filter out private xattrs */ -- for (off = 0; off < res;) { -- char *s = list + off; -- size_t slen = strlen(s) + 1; -+ for (s = list, len = res; len;) { -+ size_t slen = strnlen(s, len) + 1; - -- BUG_ON(off + slen > res); -+ /* underlying fs providing us with an broken xattr list? */ -+ if (WARN_ON(slen > len)) -+ return -EIO; - -+ len -= slen; - if (ovl_is_private_xattr(s)) { - res -= slen; -- memmove(s, s + slen, res - off); -+ memmove(s, s + slen, len); - } else { -- off += slen; -+ s += slen; - } - } - diff --git a/target/linux/generic/patches-4.4/051-0007-ovl-fix-workdir-creation.patch b/target/linux/generic/patches-4.4/051-0007-ovl-fix-workdir-creation.patch deleted file mode 100644 index 1f50170bfc..0000000000 --- a/target/linux/generic/patches-4.4/051-0007-ovl-fix-workdir-creation.patch +++ /dev/null @@ -1,35 +0,0 @@ -From e1ff3dd1ae52cef5b5373c8cc4ad949c2c25a71c Mon Sep 17 00:00:00 2001 -From: Miklos Szeredi <mszeredi@redhat.com> -Date: Mon, 5 Sep 2016 13:55:20 +0200 -Subject: [PATCH] ovl: fix workdir creation - -Workdir creation fails in latest kernel. - -Fix by allowing EOPNOTSUPP as a valid return value from -vfs_removexattr(XATTR_NAME_POSIX_ACL_*). Upper filesystem may not support -ACL and still be perfectly able to support overlayfs. - -Reported-by: Martin Ziegler <ziegler@uni-freiburg.de> -Signed-off-by: Miklos Szeredi <mszeredi@redhat.com> -Fixes: c11b9fdd6a61 ("ovl: remove posix_acl_default from workdir") -Cc: <stable@vger.kernel.org> ---- - fs/overlayfs/super.c | 4 ++-- - 1 file changed, 2 insertions(+), 2 deletions(-) - ---- a/fs/overlayfs/super.c -+++ b/fs/overlayfs/super.c -@@ -794,11 +794,11 @@ retry: - goto out_dput; - - err = vfs_removexattr(work, XATTR_NAME_POSIX_ACL_DEFAULT); -- if (err && err != -ENODATA) -+ if (err && err != -ENODATA && err != -EOPNOTSUPP) - goto out_dput; - - err = vfs_removexattr(work, XATTR_NAME_POSIX_ACL_ACCESS); -- if (err && err != -ENODATA) -+ if (err && err != -ENODATA && err != -EOPNOTSUPP) - goto out_dput; - - /* Clear any inherited mode bits */ diff --git a/target/linux/generic/patches-4.4/903-debloat_direct_io.patch b/target/linux/generic/patches-4.4/903-debloat_direct_io.patch index 460da1dbe0..afdc48b92c 100644 --- a/target/linux/generic/patches-4.4/903-debloat_direct_io.patch +++ b/target/linux/generic/patches-4.4/903-debloat_direct_io.patch @@ -26,7 +26,7 @@ endif --- a/include/linux/fs.h +++ b/include/linux/fs.h -@@ -2691,6 +2691,7 @@ enum { +@@ -2716,6 +2716,7 @@ enum { DIO_SKIP_DIO_COUNT = 0x08, }; @@ -34,7 +34,7 @@ void dio_end_io(struct bio *bio, int error); ssize_t __blockdev_direct_IO(struct kiocb *iocb, struct inode *inode, -@@ -2698,6 +2699,18 @@ ssize_t __blockdev_direct_IO(struct kioc +@@ -2723,6 +2724,18 @@ ssize_t __blockdev_direct_IO(struct kioc loff_t offset, get_block_t get_block, dio_iodone_t end_io, dio_submit_t submit_io, int flags); diff --git a/target/linux/imx6/patches-4.4/203-net-igb-add-phy-read-write-functions-that-accept-phy.patch b/target/linux/imx6/patches-4.4/203-net-igb-add-phy-read-write-functions-that-accept-phy.patch index 9d19af5cd7..48f6d0d293 100644 --- a/target/linux/imx6/patches-4.4/203-net-igb-add-phy-read-write-functions-that-accept-phy.patch +++ b/target/linux/imx6/patches-4.4/203-net-igb-add-phy-read-write-functions-that-accept-phy.patch @@ -16,7 +16,7 @@ Signed-off-by: Tim Harvey <tharvey@gateworks.com> --- a/drivers/net/ethernet/intel/igb/e1000_82575.c +++ b/drivers/net/ethernet/intel/igb/e1000_82575.c -@@ -2153,7 +2153,7 @@ static s32 igb_read_phy_reg_82580(struct +@@ -2154,7 +2154,7 @@ static s32 igb_read_phy_reg_82580(struct if (ret_val) goto out; @@ -25,7 +25,7 @@ Signed-off-by: Tim Harvey <tharvey@gateworks.com> hw->phy.ops.release(hw); -@@ -2178,7 +2178,7 @@ static s32 igb_write_phy_reg_82580(struc +@@ -2179,7 +2179,7 @@ static s32 igb_write_phy_reg_82580(struc if (ret_val) goto out; diff --git a/target/linux/imx6/patches-4.4/204-net-igb-register-mii_bus-for-SerDes-w-external-phy.patch b/target/linux/imx6/patches-4.4/204-net-igb-register-mii_bus-for-SerDes-w-external-phy.patch index 2b1cf9627b..bbd972177b 100644 --- a/target/linux/imx6/patches-4.4/204-net-igb-register-mii_bus-for-SerDes-w-external-phy.patch +++ b/target/linux/imx6/patches-4.4/204-net-igb-register-mii_bus-for-SerDes-w-external-phy.patch @@ -23,7 +23,7 @@ Signed-off-by: Tim Harvey <tharvey@gateworks.com> --- a/drivers/net/ethernet/intel/igb/e1000_82575.c +++ b/drivers/net/ethernet/intel/igb/e1000_82575.c -@@ -612,13 +612,25 @@ static s32 igb_get_invariants_82575(stru +@@ -613,13 +613,25 @@ static s32 igb_get_invariants_82575(stru switch (link_mode) { case E1000_CTRL_EXT_LINK_MODE_1000BASE_KX: hw->phy.media_type = e1000_media_type_internal_serdes; @@ -49,7 +49,7 @@ Signed-off-by: Tim Harvey <tharvey@gateworks.com> } /* fall through for I2C based SGMII */ case E1000_CTRL_EXT_LINK_MODE_PCIE_SERDES: -@@ -635,8 +647,11 @@ static s32 igb_get_invariants_82575(stru +@@ -636,8 +648,11 @@ static s32 igb_get_invariants_82575(stru hw->phy.media_type = e1000_media_type_copper; dev_spec->sgmii_active = true; } @@ -221,7 +221,7 @@ Signed-off-by: Tim Harvey <tharvey@gateworks.com> /** * igb_probe - Device Initialization Routine * @pdev: PCI device information struct -@@ -2639,6 +2760,13 @@ static int igb_probe(struct pci_dev *pde +@@ -2641,6 +2762,13 @@ static int igb_probe(struct pci_dev *pde } } pm_runtime_put_noidle(&pdev->dev); @@ -235,7 +235,7 @@ Signed-off-by: Tim Harvey <tharvey@gateworks.com> return 0; err_register: -@@ -2786,6 +2914,10 @@ static void igb_remove(struct pci_dev *p +@@ -2788,6 +2916,10 @@ static void igb_remove(struct pci_dev *p struct e1000_hw *hw = &adapter->hw; pm_runtime_get_noresume(&pdev->dev); @@ -246,7 +246,7 @@ Signed-off-by: Tim Harvey <tharvey@gateworks.com> #ifdef CONFIG_IGB_HWMON igb_sysfs_exit(adapter); #endif -@@ -3102,6 +3234,12 @@ static int __igb_open(struct net_device +@@ -3111,6 +3243,12 @@ static int __igb_open(struct net_device if (!resuming) pm_runtime_put(&pdev->dev); @@ -259,7 +259,7 @@ Signed-off-by: Tim Harvey <tharvey@gateworks.com> /* start the watchdog. */ hw->mac.get_link_status = 1; schedule_work(&adapter->watchdog_task); -@@ -7093,21 +7231,41 @@ void igb_alloc_rx_buffers(struct igb_rin +@@ -7102,21 +7240,41 @@ void igb_alloc_rx_buffers(struct igb_rin static int igb_mii_ioctl(struct net_device *netdev, struct ifreq *ifr, int cmd) { struct igb_adapter *adapter = netdev_priv(netdev); diff --git a/target/linux/ramips/patches-4.4/0031-uvc-add-iPassion-iP2970-support.patch b/target/linux/ramips/patches-4.4/0031-uvc-add-iPassion-iP2970-support.patch index 0279568f87..c6a837d76c 100644 --- a/target/linux/ramips/patches-4.4/0031-uvc-add-iPassion-iP2970-support.patch +++ b/target/linux/ramips/patches-4.4/0031-uvc-add-iPassion-iP2970-support.patch @@ -13,7 +13,7 @@ Signed-off-by: John Crispin <blogic@openwrt.org> --- a/drivers/media/usb/uvc/uvc_driver.c +++ b/drivers/media/usb/uvc/uvc_driver.c -@@ -2539,6 +2539,18 @@ static struct usb_device_id uvc_ids[] = +@@ -2559,6 +2559,18 @@ static struct usb_device_id uvc_ids[] = .bInterfaceSubClass = 1, .bInterfaceProtocol = 0, .driver_info = UVC_QUIRK_FORCE_Y8 }, @@ -225,7 +225,7 @@ Signed-off-by: John Crispin <blogic@openwrt.org> for (i = 0; i < UVC_URBS; ++i) { --- a/drivers/media/usb/uvc/uvcvideo.h +++ b/drivers/media/usb/uvc/uvcvideo.h -@@ -152,7 +152,9 @@ +@@ -164,7 +164,9 @@ #define UVC_QUIRK_RESTRICT_FRAME_RATE 0x00000200 #define UVC_QUIRK_RESTORE_CTRLS_ON_INIT 0x00000400 #define UVC_QUIRK_FORCE_Y8 0x00000800 @@ -236,7 +236,7 @@ Signed-off-by: John Crispin <blogic@openwrt.org> /* Format flags */ #define UVC_FMT_FLAG_COMPRESSED 0x00000001 #define UVC_FMT_FLAG_STREAM 0x00000002 -@@ -550,6 +552,7 @@ struct uvc_device { +@@ -562,6 +564,7 @@ struct uvc_device { __u8 *status; struct input_dev *input; char input_phys[64]; |