Received: by 2002:ad5:474a:0:0:0:0:0 with SMTP id i10csp6257116imu; Mon, 21 Jan 2019 05:59:05 -0800 (PST) X-Google-Smtp-Source: ALg8bN6BYd2Ksd5FkDYA40axI0tv33GRhxP7FMwagrS6PQQqd2KR6AEaT7i3sTm1UxMcADJ3iWUd X-Received: by 2002:a63:bd51:: with SMTP id d17mr28575289pgp.443.1548079144987; Mon, 21 Jan 2019 05:59:04 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1548079144; cv=none; d=google.com; s=arc-20160816; b=TDI8fkzfkIsE3ivezf1RKK8XUwRstXGYdc9fIIl52AQ4mI1Nlai7Z5QEXADx26h9Sv ZQJ86akTVMDJarDo8dBG9LZJJD351z1nV1v2LeZL3tCmQu6vRYE7I8OjaqltG1Nqm+x7 ZfQNySv59ekmtYBS6Y7qt7JFVMtH21u497sB0fzWGCLGHMlbvpZKmRxQJws75En52Z/t bC6ij/i3MLRXJJ/6pBaz4KU0B1bK9EpxadQYG3NxuxkwkPeigmfGQsgN50Z1ei+w9tfp Bct7/FQwTLoMouRwMG8yhkIVcQLmwzQ9z+xDGg6cHSpCAgSZSugDHw/tZREkewlwS5K/ KxgQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:content-transfer-encoding:mime-version :user-agent:references:in-reply-to:message-id:date:subject:cc:to :from:dkim-signature; bh=cVWcJd1C353rqkWgcBrQ+IEYQHLCSqhsicCYgDIqXjE=; b=ZUouQ8xTGeEGHMUJv//TR0585QCHVOQK7tJhaeCtPxUj2WT6EVgJznyUPInEEzzYOR xpwl0R+yDSs5UtTd47l+2NoFUzM/CPDC/1XCW3bkoWxxa5RoRYwVjAzZWSaLKJ9JKFzi i5DQeo+spf1fGizi3ZJ6cmVWzDvcGb+c6ZGQlnHNCbcP9ornv6/R2Bt1mXKcgnAsFO2/ a9deXY5B7zJ83iMiri72K+SqZsYxFKF8bdWC0Ro9uITKZDKK6+imQfAyCBpD7TGcjn3K lhU4wnag9ytlYVH1IpEGo5g713J/NxW/OY5x3mjC8Ahgdb1cv90PHhsuJXJJq//Wzl7C oivg== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@kernel.org header.s=default header.b=Uq071nEZ; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id b70si12191062pfe.168.2019.01.21.05.58.49; Mon, 21 Jan 2019 05:59:04 -0800 (PST) Received-SPF: pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; dkim=pass header.i=@kernel.org header.s=default header.b=Uq071nEZ; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1731808AbfAUNzt (ORCPT + 99 others); Mon, 21 Jan 2019 08:55:49 -0500 Received: from mail.kernel.org ([198.145.29.99]:40502 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1731750AbfAUNzn (ORCPT ); Mon, 21 Jan 2019 08:55:43 -0500 Received: from localhost (5356596B.cm-6-7b.dynamic.ziggo.nl [83.86.89.107]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPSA id 0087320861; Mon, 21 Jan 2019 13:55:41 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=default; t=1548078942; bh=P4VSzLHN2/PoZZijPe72Xz+7m82L7f49bJgALkMfZ/c=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=Uq071nEZa8BRl4qRtofkF2AFt76gCUjW0u3hy5aqfEfg7zh9lbMI6MdPew8ddN/4X m5+c8TOSFZAN+y0rOsuEtQZFut9BpWpp9+buHobWSFPeqn8JLJh1t8cAD5gw/ji+FO UqCGhmsog/51uHPpea3+2eo7pR4s8lBm8lKskD/I= From: Greg Kroah-Hartman To: linux-kernel@vger.kernel.org, stable@vger.kernel.org Cc: Greg Kroah-Hartman , Kees Cook , Gwendal Grignou , Guenter Roeck Subject: [PATCH 4.9 08/51] proc: Remove empty line in /proc/self/status Date: Mon, 21 Jan 2019 14:44:04 +0100 Message-Id: <20190121122454.204712750@linuxfoundation.org> X-Mailer: git-send-email 2.20.1 In-Reply-To: <20190121122453.700446926@linuxfoundation.org> References: <20190121122453.700446926@linuxfoundation.org> User-Agent: quilt/0.65 X-stable: review X-Patchwork-Hint: ignore MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org 4.9-stable review patch. If anyone has any objections, please let me know. ------------------ From: Guenter Roeck 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 Cc: Gwendal Grignou Signed-off-by: Guenter Roeck Acked-by: Kees Cook --- 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");