]> git.ipfire.org Git - thirdparty/kernel/stable-queue.git/commitdiff
4.9-stable patches
authorGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Fri, 18 Jan 2019 16:11:30 +0000 (17:11 +0100)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Fri, 18 Jan 2019 16:11:30 +0000 (17:11 +0100)
added patches:
proc-remove-empty-line-in-proc-self-status.patch

queue-4.9/proc-remove-empty-line-in-proc-self-status.patch [new file with mode: 0644]
queue-4.9/series

diff --git a/queue-4.9/proc-remove-empty-line-in-proc-self-status.patch b/queue-4.9/proc-remove-empty-line-in-proc-self-status.patch
new file mode 100644 (file)
index 0000000..63eccc2
--- /dev/null
@@ -0,0 +1,50 @@
+From linux@roeck-us.net  Fri Jan 18 17:08:19 2019
+From: Guenter Roeck <linux@roeck-us.net>
+Date: Wed, 16 Jan 2019 10:58:31 -0800
+Subject: proc: Remove empty line in /proc/self/status
+To: stable@vger.kernel.org
+Cc: Greg Kroah-Hartman <gregkh@linuxfoundation.org>, Guenter Roeck <linux@roeck-us.net>, Kees Cook <keescook@chromium.org>, Gwendal Grignou <gwendal@chromium.org>
+Message-ID: <1547665111-31650-1-git-send-email-linux@roeck-us.net>
+
+From: Guenter Roeck <linux@roeck-us.net>
+
+If CONFIG_SECCOMP=n, /proc/self/status includes an empty line. This causes
+the iotop application to bail out with an error message.
+
+File "/usr/local/lib64/python2.7/site-packages/iotop/data.py", line 196,
+       in parse_proc_pid_status
+key, value = line.split(':\t', 1)
+ValueError: need more than 1 value to unpack
+
+The problem is seen in v4.9.y but not upstream because commit af884cd4a5ae6
+("proc: report no_new_privs state") has not been backported to v4.9.y.
+The backport of commit fae1fa0fc6cc ("proc: Provide details on speculation
+flaw mitigations") tried to address the resulting differences but was
+wrong, introducing the problem.
+
+Fixes: 51ef9af2a35b ("proc: Provide details on speculation flaw mitigations")
+Cc: Kees Cook <keescook@chromium.org>
+Cc: Gwendal Grignou <gwendal@chromium.org>
+Signed-off-by: Guenter Roeck <linux@roeck-us.net>
+Acked-by: Kees Cook <keescook@chromium.org>
+---
+This patch only applies to v4.9.y. v4.4.y also needs to be fixed (see
+https://www.spinics.net/lists/stable/msg279131.html), but the fix
+is slightly different. v4.14.y and later are not affected.
+
+ fs/proc/array.c |    3 ++-
+ 1 file changed, 2 insertions(+), 1 deletion(-)
+
+--- a/fs/proc/array.c
++++ b/fs/proc/array.c
+@@ -346,8 +346,9 @@ static inline void task_seccomp(struct s
+ {
+ #ifdef CONFIG_SECCOMP
+       seq_put_decimal_ull(m, "Seccomp:\t", p->seccomp.mode);
++      seq_putc(m, '\n');
+ #endif
+-      seq_printf(m, "\nSpeculation_Store_Bypass:\t");
++      seq_printf(m, "Speculation_Store_Bypass:\t");
+       switch (arch_prctl_spec_ctrl_get(p, PR_SPEC_STORE_BYPASS)) {
+       case -EINVAL:
+               seq_printf(m, "unknown");
index b5491c25c0f9b6a83dbcff9bb4a91ca882dd4490..616ee0e4bc78f99528ffbe2ab2ae09083560ce65 100644 (file)
@@ -5,3 +5,4 @@ tty-don-t-hold-ldisc-lock-in-tty_reopen-if-ldisc-present.patch
 can-gw-ensure-dlc-boundaries-after-can-frame-modification.patch
 revert-f2fs-do-not-recover-from-previous-remained-wrong-dnodes.patch
 media-em28xx-fix-misplaced-reset-of-dev-v4l-field_count.patch
+proc-remove-empty-line-in-proc-self-status.patch