From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-14.6 required=3.0 tests=DKIMWL_WL_MED,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,HEADER_FROM_DIFFERENT_DOMAINS,INCLUDES_PATCH, MAILING_LIST_MULTI,SIGNED_OFF_BY,SPF_PASS,URIBL_BLOCKED,USER_IN_DEF_DKIM_WL autolearn=ham autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id E71DEC43387 for ; Mon, 14 Jan 2019 18:21:58 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.kernel.org (Postfix) with ESMTP id B462E2086D for ; Mon, 14 Jan 2019 18:21:58 +0000 (UTC) Authentication-Results: mail.kernel.org; dkim=pass (2048-bit key) header.d=google.com header.i=@google.com header.b="v5TSN3vA" Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1726734AbfANSV6 (ORCPT ); Mon, 14 Jan 2019 13:21:58 -0500 Received: from mail-yw1-f67.google.com ([209.85.161.67]:38438 "EHLO mail-yw1-f67.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726732AbfANSV5 (ORCPT ); Mon, 14 Jan 2019 13:21:57 -0500 Received: by mail-yw1-f67.google.com with SMTP id d190so8995574ywb.5 for ; Mon, 14 Jan 2019 10:21:56 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=20161025; h=mime-version:references:in-reply-to:from:date:message-id:subject:to :cc; bh=ncUlT/gscEPSg7OX0nCZTP7ISz8JN5D3GlEuoSPQd7k=; b=v5TSN3vA9HOwC8HQC5FQKWNS4Pc7CyYN+myxxS8elRsBc0wVcTRbaqfN/vVRXWOM9q QA6aIdjAfZiB0pn91pc4T937sB/l/C7NcRf+Yt4ysnp0hRCK86IhrdkoTITsLgrUQyR9 KVg+Bp5AWClhWVomrHmCqdf2B0UTzrRv9mci+jQefLI1fDN2nTjvyhLT8keGpysH1rYR IwUeg97ZpAY9nUAYk++5XWVu+nbU+347eqN4xzVxzovCFxrMcNjdMuLnZqWOP9anXk9M ps0ZsiVdDqpzntEmtS3BReKgR7K+N1MxqZBhxN7e4UJx0acjtteJS9d8xpNZ9z22CENm ZLBg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:references:in-reply-to:from:date :message-id:subject:to:cc; bh=ncUlT/gscEPSg7OX0nCZTP7ISz8JN5D3GlEuoSPQd7k=; b=OsD9//qBIGQgcyAu5H9l5VseVXXQop1In9Njut01oheFNLsi8qeGSQFm+oJoCs+XyL Yvs11rxvCMM/N1JvFgIdXcHh0pesaoPOQF8PO565CdbXWeWxgfmOLPEMCPmcRI/RtP7D Is7hDQLBandHJjN99j12UqNNplpGuLbKvsJH/7FCA/1WSra2GSwGG9RPjMLHyRI/ZS01 MWVc96hJh/Ha/1TRj63Txix35iKnRXP9vQsQsLLyZF29PH1pK6xjI8+r2oQidlwa3Q9w W6ZUFMGMQWQoeCIv5jVaNpZ6WqVbfahXZtzYSkj2JWghh+KUEKNSig9W39zoaU4ce6EO iwJw== X-Gm-Message-State: AJcUukevDL8AshVOcVedOKUBk3CAzE/pPHwr0OqF8UFCIeMr91P6IYI3 miGFE6+IcS9/Df1s/Cfzh/RL4KdQdDMnFocwwCpzAw== X-Google-Smtp-Source: ALg8bN7Rr6l6QvxQ5lOlwZMVtq1QUfmmW4tjVLyvRNLrVI8BzC3q/KySc4t11/rhQGvzW1LJCCPZeXe9oJGd3T+riI0= X-Received: by 2002:a81:4853:: with SMTP id v80mr25365184ywa.266.1547490116282; Mon, 14 Jan 2019 10:21:56 -0800 (PST) MIME-Version: 1.0 References: <20190114181336.74501-1-gwendal@chromium.org> In-Reply-To: <20190114181336.74501-1-gwendal@chromium.org> From: Guenter Roeck Date: Mon, 14 Jan 2019 10:21:45 -0800 Message-ID: Subject: Re: [PATCH v2] proc: Remove empty line in /proc/self/status To: Gwendal Grignou Cc: Greg Kroah-Hartman , "# v4 . 10+" , Guenter Roeck , Kees Cook Content-Type: text/plain; charset="UTF-8" Sender: stable-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: stable@vger.kernel.org On Mon, Jan 14, 2019 at 10:13 AM Gwendal Grignou wrote: > > Prevent an empty line in /proc/self/status, allow iotop to work. > > iotop does not like empty lines, fails with: > 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 > > [reading /proc/self/status] > > Fixes: 84964fa3e5a0 ("proc: Provide details on speculation flaw mitigations") > > Signed-off-by: Gwendal Grignou > --- > v2: Format commit message properly with proper subject and fixes > keyword. > You might want to mention that this patch only applies to v4.4.y. v4.9.y has a similar problem, but only if CONFIG_SECCOMP=n, and would require a slightly different patch to fix. Other releases are, as far as I can see, not affected. Guenter > fs/proc/array.c | 2 +- > 1 file changed, 1 insertion(+), 1 deletion(-) > > diff --git a/fs/proc/array.c b/fs/proc/array.c > index 0c142916a8c7d..f11df9ab4256e 100644 > --- a/fs/proc/array.c > +++ b/fs/proc/array.c > @@ -334,7 +334,7 @@ static inline void task_seccomp(struct seq_file *m, struct task_struct *p) > #ifdef CONFIG_SECCOMP > seq_printf(m, "Seccomp:\t%d\n", p->seccomp.mode); > #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"); > -- > 2.20.1.97.g81188d93c3-goog >