[linux] 04/07: mm, proc: drop priv parameter from is_stack
debian-kernel at lists.debian.org
debian-kernel at lists.debian.org
Mon Jun 19 15:38:53 UTC 2017
This is an automated email from the git hooks/post-receive script.
carnil pushed a commit to branch stretch-security
in repository linux.
commit 7a9a3d1ef2e55b7b284c0a4b8a65c13361dc8c5a
Author: Salvatore Bonaccorso <carnil at debian.org>
Date: Thu Jun 15 19:03:24 2017 +0200
mm, proc: drop priv parameter from is_stack
---
debian/changelog | 1 +
...mm-proc-drop-priv-parameter-from-is_stack.patch | 89 ++++++++++++++++++++++
debian/patches/series | 1 +
3 files changed, 91 insertions(+)
diff --git a/debian/changelog b/debian/changelog
index a0358ee..6bbe3a0 100644
--- a/debian/changelog
+++ b/debian/changelog
@@ -3,6 +3,7 @@ linux (4.9.30-2+deb9u1) UNRELEASED; urgency=medium
* mm: enlarge stack guard gap (CVE-2017-1000364)
* mm: allow to configure stack gap size
* mm, proc: cap the stack gap for unpopulated growing vmas
+ * mm, proc: drop priv parameter from is_stack
-- Salvatore Bonaccorso <carnil at debian.org> Tue, 13 Jun 2017 19:05:45 +0200
diff --git a/debian/patches/bugfix/all/mm-proc-drop-priv-parameter-from-is_stack.patch b/debian/patches/bugfix/all/mm-proc-drop-priv-parameter-from-is_stack.patch
new file mode 100644
index 0000000..bdb1cf6
--- /dev/null
+++ b/debian/patches/bugfix/all/mm-proc-drop-priv-parameter-from-is_stack.patch
@@ -0,0 +1,89 @@
+From: Michal Hocko <mhocko at suse.com>
+Date: Wed, 14 Jun 2017 08:17:20 +0200
+Subject: mm, proc: drop priv parameter from is_stack
+Bug-Debian-Security: https://security-tracker.debian.org/tracker/CVE-2017-1000364
+
+We do not really need priv parameter since b18cb64ead40 ("fs/proc: Stop
+trying to report thread stacks") simplified is_stack.
+
+Signed-off-by: Michal Hocko <mhocko at suse.com>
+---
+ fs/proc/task_mmu.c | 10 ++++------
+ fs/proc/task_nommu.c | 5 ++---
+ 2 files changed, 6 insertions(+), 9 deletions(-)
+
+diff --git a/fs/proc/task_mmu.c b/fs/proc/task_mmu.c
+index 6f38f96d725f..f05faa18d8b6 100644
+--- a/fs/proc/task_mmu.c
++++ b/fs/proc/task_mmu.c
+@@ -266,8 +266,7 @@ static int do_maps_open(struct inode *inode, struct file *file,
+ * Indicate if the VMA is a stack for the given task; for
+ * /proc/PID/maps that is the stack of the main task.
+ */
+-static int is_stack(struct proc_maps_private *priv,
+- struct vm_area_struct *vma)
++static int is_stack(struct vm_area_struct *vma)
+ {
+ /*
+ * We make no effort to guess what a given thread considers to be
+@@ -283,7 +282,6 @@ show_map_vma(struct seq_file *m, struct vm_area_struct *vma, int is_pid)
+ {
+ struct mm_struct *mm = vma->vm_mm;
+ struct file *file = vma->vm_file;
+- struct proc_maps_private *priv = m->private;
+ vm_flags_t flags = vma->vm_flags;
+ unsigned long ino = 0;
+ unsigned long long pgoff = 0;
+@@ -349,7 +347,7 @@ show_map_vma(struct seq_file *m, struct vm_area_struct *vma, int is_pid)
+ goto done;
+ }
+
+- if (is_stack(priv, vma))
++ if (is_stack(vma))
+ name = "[stack]";
+ }
+
+@@ -809,7 +807,7 @@ static int show_smap(struct seq_file *m, void *v, int is_pid)
+ (vma->vm_flags & VM_LOCKED) ?
+ (unsigned long)(mss.pss >> (10 + PSS_SHIFT)) : 0);
+
+- if (is_stack(m->private, vma))
++ if (is_stack(vma))
+ seq_printf(m, "Stack_Gap: %8lu kB\n", stack_guard_gap >>10);
+
+ arch_show_smap(m, vma);
+@@ -1681,7 +1679,7 @@ static int show_numa_map(struct seq_file *m, void *v, int is_pid)
+ seq_file_path(m, file, "\n\t= ");
+ } else if (vma->vm_start <= mm->brk && vma->vm_end >= mm->start_brk) {
+ seq_puts(m, " heap");
+- } else if (is_stack(proc_priv, vma)) {
++ } else if (is_stack(vma)) {
+ seq_puts(m, " stack");
+ }
+
+diff --git a/fs/proc/task_nommu.c b/fs/proc/task_nommu.c
+index 23266694db11..dea90b566a6e 100644
+--- a/fs/proc/task_nommu.c
++++ b/fs/proc/task_nommu.c
+@@ -125,8 +125,7 @@ unsigned long task_statm(struct mm_struct *mm,
+ return size;
+ }
+
+-static int is_stack(struct proc_maps_private *priv,
+- struct vm_area_struct *vma)
++static int is_stack(struct vm_area_struct *vma)
+ {
+ struct mm_struct *mm = vma->vm_mm;
+
+@@ -178,7 +177,7 @@ static int nommu_vma_show(struct seq_file *m, struct vm_area_struct *vma,
+ if (file) {
+ seq_pad(m, ' ');
+ seq_file_path(m, file, "");
+- } else if (mm && is_stack(priv, vma)) {
++ } else if (mm && is_stack(vma)) {
+ seq_pad(m, ' ');
+ seq_printf(m, "[stack]");
+ }
+--
+2.11.0
+
diff --git a/debian/patches/series b/debian/patches/series
index a29e4d4..3818751 100644
--- a/debian/patches/series
+++ b/debian/patches/series
@@ -123,6 +123,7 @@ bugfix/all/ipv6-fix-out-of-bound-writes-in-__ip6_append_data.patch
bugfix/all/mm-enlarge-stack-guard-gap.patch
bugfix/all/mm-allow-to-configure-stack-gap-size.patch
bugfix/all/mm-proc-cap-the-stack-gap-for-unpopulated-growing-vm.patch
+bugfix/all/mm-proc-drop-priv-parameter-from-is_stack.patch
# Fix exported symbol versions
bugfix/ia64/revert-ia64-move-exports-to-definitions.patch
--
Alioth's /usr/local/bin/git-commit-notice on /srv/git.debian.org/git/kernel/linux.git
More information about the Kernel-svn-changes
mailing list