From: Greg Kroah-Hartman Date: Fri, 31 Aug 2018 20:05:23 +0000 (-0700) Subject: drop broken smb3 patch from 4.9 and 4.4 X-Git-Tag: v3.18.121~35 X-Git-Url: http://git.ipfire.org/?a=commitdiff_plain;h=2e1d382431ea64c1595cd136d204c99b673cd4b6;p=thirdparty%2Fkernel%2Fstable-queue.git drop broken smb3 patch from 4.9 and 4.4 --- diff --git a/queue-4.4/series b/queue-4.4/series index e9bcfb1247d..292dc501107 100644 --- a/queue-4.4/series +++ b/queue-4.4/series @@ -42,7 +42,6 @@ cifs-add-missing-debug-entries-for-kconfig-options.patch cifs-check-kmalloc-before-use.patch smb3-do-not-send-smb3-set_info-if-nothing-changed.patch smb3-don-t-request-leases-in-symlink-creation-and-query.patch -smb3-fill-in-statfs-fsid-and-correct-namelen.patch btrfs-don-t-leak-ret-from-do_chunk_alloc.patch s390-kvm-fix-deadlock-when-killed-by-oom.patch ext4-check-for-nul-characters-in-extended-attribute-s-name.patch diff --git a/queue-4.4/smb3-fill-in-statfs-fsid-and-correct-namelen.patch b/queue-4.4/smb3-fill-in-statfs-fsid-and-correct-namelen.patch deleted file mode 100644 index 402fbd0745f..00000000000 --- a/queue-4.4/smb3-fill-in-statfs-fsid-and-correct-namelen.patch +++ /dev/null @@ -1,112 +0,0 @@ -From 21ba3845b59c733a79ed4fe1c4f3732e7ece9df7 Mon Sep 17 00:00:00 2001 -From: Steve French -Date: Sun, 24 Jun 2018 23:18:52 -0500 -Subject: smb3: fill in statfs fsid and correct namelen - -From: Steve French - -commit 21ba3845b59c733a79ed4fe1c4f3732e7ece9df7 upstream. - -Fil in the correct namelen (typically 255 not 4096) in the -statfs response and also fill in a reasonably unique fsid -(in this case taken from the volume id, and the creation time -of the volume). - -In the case of the POSIX statfs all fields are now filled in, -and in the case of non-POSIX mounts, all fields are filled -in which can be. - -Signed-off-by: Steve French -CC: Stable -Reviewed-by: Aurelien Aptel -Signed-off-by: Greg Kroah-Hartman - ---- - fs/cifs/cifsfs.c | 18 ++++++++++-------- - fs/cifs/smb2ops.c | 2 ++ - fs/cifs/smb2pdu.c | 8 ++++++++ - fs/cifs/smb2pdu.h | 11 +++++++++++ - 4 files changed, 31 insertions(+), 8 deletions(-) - ---- a/fs/cifs/cifsfs.c -+++ b/fs/cifs/cifsfs.c -@@ -189,14 +189,16 @@ cifs_statfs(struct dentry *dentry, struc - - xid = get_xid(); - -- /* -- * PATH_MAX may be too long - it would presumably be total path, -- * but note that some servers (includinng Samba 3) have a shorter -- * maximum path. -- * -- * Instead could get the real value via SMB_QUERY_FS_ATTRIBUTE_INFO. -- */ -- buf->f_namelen = PATH_MAX; -+ if (le32_to_cpu(tcon->fsAttrInfo.MaxPathNameComponentLength) > 0) -+ buf->f_namelen = -+ le32_to_cpu(tcon->fsAttrInfo.MaxPathNameComponentLength); -+ else -+ buf->f_namelen = PATH_MAX; -+ -+ buf->f_fsid.val[0] = tcon->vol_serial_number; -+ /* are using part of create time for more randomness, see man statfs */ -+ buf->f_fsid.val[1] = (int)le64_to_cpu(tcon->vol_create_time); -+ - buf->f_files = 0; /* undefined */ - buf->f_ffree = 0; /* unlimited */ - ---- a/fs/cifs/smb2ops.c -+++ b/fs/cifs/smb2ops.c -@@ -316,6 +316,8 @@ smb3_qfs_tcon(const unsigned int xid, st - SMB2_QFS_attr(xid, tcon, fid.persistent_fid, fid.volatile_fid, - FS_DEVICE_INFORMATION); - SMB2_QFS_attr(xid, tcon, fid.persistent_fid, fid.volatile_fid, -+ FS_VOLUME_INFORMATION); -+ SMB2_QFS_attr(xid, tcon, fid.persistent_fid, fid.volatile_fid, - FS_SECTOR_SIZE_INFORMATION); /* SMB3 specific */ - SMB2_close(xid, tcon, fid.persistent_fid, fid.volatile_fid); - return; ---- a/fs/cifs/smb2pdu.c -+++ b/fs/cifs/smb2pdu.c -@@ -2875,6 +2875,9 @@ SMB2_QFS_attr(const unsigned int xid, st - } else if (level == FS_SECTOR_SIZE_INFORMATION) { - max_len = sizeof(struct smb3_fs_ss_info); - min_len = sizeof(struct smb3_fs_ss_info); -+ } else if (level == FS_VOLUME_INFORMATION) { -+ max_len = sizeof(struct smb3_fs_vol_info) + MAX_VOL_LABEL_LEN; -+ min_len = sizeof(struct smb3_fs_vol_info); - } else { - cifs_dbg(FYI, "Invalid qfsinfo level %d\n", level); - return -EINVAL; -@@ -2911,6 +2914,11 @@ SMB2_QFS_attr(const unsigned int xid, st - tcon->ss_flags = le32_to_cpu(ss_info->Flags); - tcon->perf_sector_size = - le32_to_cpu(ss_info->PhysicalBytesPerSectorForPerf); -+ } else if (level == FS_VOLUME_INFORMATION) { -+ struct smb3_fs_vol_info *vol_info = (struct smb3_fs_vol_info *) -+ (offset + (char *)rsp); -+ tcon->vol_serial_number = vol_info->VolumeSerialNumber; -+ tcon->vol_create_time = vol_info->VolumeCreationTime; - } - - qfsattr_exit: ---- a/fs/cifs/smb2pdu.h -+++ b/fs/cifs/smb2pdu.h -@@ -1085,6 +1085,17 @@ struct smb3_fs_ss_info { - __le32 ByteOffsetForPartitionAlignment; - } __packed; - -+/* volume info struct - see MS-FSCC 2.5.9 */ -+#define MAX_VOL_LABEL_LEN 32 -+struct smb3_fs_vol_info { -+ __le64 VolumeCreationTime; -+ __u32 VolumeSerialNumber; -+ __le32 VolumeLabelLength; /* includes trailing null */ -+ __u8 SupportsObjects; /* True if eg like NTFS, supports objects */ -+ __u8 Reserved; -+ __u8 VolumeLabel[0]; /* variable len */ -+} __packed; -+ - /* partial list of QUERY INFO levels */ - #define FILE_DIRECTORY_INFORMATION 1 - #define FILE_FULL_DIRECTORY_INFORMATION 2 diff --git a/queue-4.9/bpf-arm32-fix-stack-var-offset-in-jit.patch b/queue-4.9/bpf-arm32-fix-stack-var-offset-in-jit.patch deleted file mode 100644 index 637c80963fd..00000000000 --- a/queue-4.9/bpf-arm32-fix-stack-var-offset-in-jit.patch +++ /dev/null @@ -1,51 +0,0 @@ -From daniel@iogearbox.net Thu Aug 30 05:13:02 2018 -From: Daniel Borkmann -Date: Sat, 18 Aug 2018 00:21:34 +0200 -Subject: bpf, arm32: fix stack var offset in jit -To: gregkh@linuxfoundation.org -Cc: stable@vger.kernel.org, pbrobinson@gmail.com, mh+netdev@zugschlus.de, stefan.wahren@i2se.com, rmk+kernel@armlinux.org.uk, ast@kernel.org, daniel@iogearbox.net -Message-ID: <2006e3ef8d4e30f2c901a39423655df9acaf1ce2.1534544005.git.daniel@iogearbox.net> - -From: Daniel Borkmann - -Commit 38ca93060163 ("bpf, arm32: save 4 bytes of unneeded stack -space") messed up STACK_VAR() by 4 bytes presuming it was related -to skb scratch buffer space, but it clearly isn't as this refers -to the top word in stack, therefore restore it. This fixes a NULL -pointer dereference seen during bootup when JIT is enabled and BPF -program run in sk_filter_trim_cap() triggered by systemd-udevd. - -JIT rework in 1c35ba122d4a ("ARM: net: bpf: use negative numbers -for stacked registers") and 96cced4e774a ("ARM: net: bpf: access -eBPF scratch space using ARM FP register") removed the affected -parts, so only needed in 4.18 stable. - -Fixes: 38ca93060163 ("bpf, arm32: save 4 bytes of unneeded stack space") -Reported-by: Peter Robinson -Reported-by: Marc Haber -Tested-by: Stefan Wahren -Tested-by: Peter Robinson -Cc: Russell King -Cc: Alexei Starovoitov -Signed-off-by: Daniel Borkmann -Acked-by: Alexei Starovoitov ---- - arch/arm/net/bpf_jit_32.c | 2 +- - 1 file changed, 1 insertion(+), 1 deletion(-) - -diff --git a/arch/arm/net/bpf_jit_32.c b/arch/arm/net/bpf_jit_32.c -index f6a62ae..c864f6b 100644 ---- a/arch/arm/net/bpf_jit_32.c -+++ b/arch/arm/net/bpf_jit_32.c -@@ -238,7 +238,7 @@ static void jit_fill_hole(void *area, unsigned int size) - #define STACK_SIZE ALIGN(_STACK_SIZE, STACK_ALIGNMENT) - - /* Get the offset of eBPF REGISTERs stored on scratch space. */ --#define STACK_VAR(off) (STACK_SIZE - off) -+#define STACK_VAR(off) (STACK_SIZE - off - 4) - - #if __LINUX_ARM_ARCH__ < 7 - --- -2.9.5 - diff --git a/queue-4.9/series b/queue-4.9/series index 5748b2b9085..bbad47a12d9 100644 --- a/queue-4.9/series +++ b/queue-4.9/series @@ -54,11 +54,9 @@ cifs-check-kmalloc-before-use.patch smb3-enumerating-snapshots-was-leaving-part-of-the-data-off-end.patch smb3-do-not-send-smb3-set_info-if-nothing-changed.patch smb3-don-t-request-leases-in-symlink-creation-and-query.patch -smb3-fill-in-statfs-fsid-and-correct-namelen.patch kprobes-arm64-fix-p-uses-in-error-messages.patch arm64-mm-check-for-upper-page_shift-bits-in-pfn_valid.patch s390-kvm-fix-deadlock-when-killed-by-oom.patch ext4-check-for-nul-characters-in-extended-attribute-s-name.patch ext4-sysfs-print-ext4_super_block-fields-as-little-endian.patch ext4-reset-error-code-in-ext4_find_entry-in-fallback.patch -bpf-arm32-fix-stack-var-offset-in-jit.patch diff --git a/queue-4.9/smb3-fill-in-statfs-fsid-and-correct-namelen.patch b/queue-4.9/smb3-fill-in-statfs-fsid-and-correct-namelen.patch deleted file mode 100644 index 729ce10bd01..00000000000 --- a/queue-4.9/smb3-fill-in-statfs-fsid-and-correct-namelen.patch +++ /dev/null @@ -1,112 +0,0 @@ -From 21ba3845b59c733a79ed4fe1c4f3732e7ece9df7 Mon Sep 17 00:00:00 2001 -From: Steve French -Date: Sun, 24 Jun 2018 23:18:52 -0500 -Subject: smb3: fill in statfs fsid and correct namelen - -From: Steve French - -commit 21ba3845b59c733a79ed4fe1c4f3732e7ece9df7 upstream. - -Fil in the correct namelen (typically 255 not 4096) in the -statfs response and also fill in a reasonably unique fsid -(in this case taken from the volume id, and the creation time -of the volume). - -In the case of the POSIX statfs all fields are now filled in, -and in the case of non-POSIX mounts, all fields are filled -in which can be. - -Signed-off-by: Steve French -CC: Stable -Reviewed-by: Aurelien Aptel -Signed-off-by: Greg Kroah-Hartman - ---- - fs/cifs/cifsfs.c | 18 ++++++++++-------- - fs/cifs/smb2ops.c | 2 ++ - fs/cifs/smb2pdu.c | 8 ++++++++ - fs/cifs/smb2pdu.h | 11 +++++++++++ - 4 files changed, 31 insertions(+), 8 deletions(-) - ---- a/fs/cifs/cifsfs.c -+++ b/fs/cifs/cifsfs.c -@@ -193,14 +193,16 @@ cifs_statfs(struct dentry *dentry, struc - - xid = get_xid(); - -- /* -- * PATH_MAX may be too long - it would presumably be total path, -- * but note that some servers (includinng Samba 3) have a shorter -- * maximum path. -- * -- * Instead could get the real value via SMB_QUERY_FS_ATTRIBUTE_INFO. -- */ -- buf->f_namelen = PATH_MAX; -+ if (le32_to_cpu(tcon->fsAttrInfo.MaxPathNameComponentLength) > 0) -+ buf->f_namelen = -+ le32_to_cpu(tcon->fsAttrInfo.MaxPathNameComponentLength); -+ else -+ buf->f_namelen = PATH_MAX; -+ -+ buf->f_fsid.val[0] = tcon->vol_serial_number; -+ /* are using part of create time for more randomness, see man statfs */ -+ buf->f_fsid.val[1] = (int)le64_to_cpu(tcon->vol_create_time); -+ - buf->f_files = 0; /* undefined */ - buf->f_ffree = 0; /* unlimited */ - ---- a/fs/cifs/smb2ops.c -+++ b/fs/cifs/smb2ops.c -@@ -326,6 +326,8 @@ smb3_qfs_tcon(const unsigned int xid, st - SMB2_QFS_attr(xid, tcon, fid.persistent_fid, fid.volatile_fid, - FS_DEVICE_INFORMATION); - SMB2_QFS_attr(xid, tcon, fid.persistent_fid, fid.volatile_fid, -+ FS_VOLUME_INFORMATION); -+ SMB2_QFS_attr(xid, tcon, fid.persistent_fid, fid.volatile_fid, - FS_SECTOR_SIZE_INFORMATION); /* SMB3 specific */ - SMB2_close(xid, tcon, fid.persistent_fid, fid.volatile_fid); - return; ---- a/fs/cifs/smb2pdu.c -+++ b/fs/cifs/smb2pdu.c -@@ -3038,6 +3038,9 @@ SMB2_QFS_attr(const unsigned int xid, st - } else if (level == FS_SECTOR_SIZE_INFORMATION) { - max_len = sizeof(struct smb3_fs_ss_info); - min_len = sizeof(struct smb3_fs_ss_info); -+ } else if (level == FS_VOLUME_INFORMATION) { -+ max_len = sizeof(struct smb3_fs_vol_info) + MAX_VOL_LABEL_LEN; -+ min_len = sizeof(struct smb3_fs_vol_info); - } else { - cifs_dbg(FYI, "Invalid qfsinfo level %d\n", level); - return -EINVAL; -@@ -3074,6 +3077,11 @@ SMB2_QFS_attr(const unsigned int xid, st - tcon->ss_flags = le32_to_cpu(ss_info->Flags); - tcon->perf_sector_size = - le32_to_cpu(ss_info->PhysicalBytesPerSectorForPerf); -+ } else if (level == FS_VOLUME_INFORMATION) { -+ struct smb3_fs_vol_info *vol_info = (struct smb3_fs_vol_info *) -+ (offset + (char *)rsp); -+ tcon->vol_serial_number = vol_info->VolumeSerialNumber; -+ tcon->vol_create_time = vol_info->VolumeCreationTime; - } - - qfsattr_exit: ---- a/fs/cifs/smb2pdu.h -+++ b/fs/cifs/smb2pdu.h -@@ -1087,6 +1087,17 @@ struct smb3_fs_ss_info { - __le32 ByteOffsetForPartitionAlignment; - } __packed; - -+/* volume info struct - see MS-FSCC 2.5.9 */ -+#define MAX_VOL_LABEL_LEN 32 -+struct smb3_fs_vol_info { -+ __le64 VolumeCreationTime; -+ __u32 VolumeSerialNumber; -+ __le32 VolumeLabelLength; /* includes trailing null */ -+ __u8 SupportsObjects; /* True if eg like NTFS, supports objects */ -+ __u8 Reserved; -+ __u8 VolumeLabel[0]; /* variable len */ -+} __packed; -+ - /* partial list of QUERY INFO levels */ - #define FILE_DIRECTORY_INFORMATION 1 - #define FILE_FULL_DIRECTORY_INFORMATION 2