Received: by 2002:ad5:474a:0:0:0:0:0 with SMTP id i10csp2250788imu; Fri, 23 Nov 2018 06:38:59 -0800 (PST) X-Google-Smtp-Source: AFSGD/WDpYBiNwyUzk2uEVHjxYIGM155QKyoOnVS6wutt4xdcpWdLzf9i4Q6fo+DBMMULdSn/JDs X-Received: by 2002:a17:902:481:: with SMTP id e1-v6mr15873536ple.132.1542983939413; Fri, 23 Nov 2018 06:38:59 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1542983939; cv=none; d=google.com; s=arc-20160816; b=VcAKjO9yCN/DDnzoxhTDs54UDXs6kdbZu1iGCW9su+sXtpJ3cEL7byekUnLA0Nyii6 GE2DzBiam9y/b/7hWljgynLj7K6/tlbzhPX3aa2euDUya+TAx5YxXTq18POquve3GA7Q qgyU9nFh+VOBOV3MzVZHdgY0kRpuZjEKB9LxdcZvTzZOmUmcncOrXZ/Wwjh2AeeACmE9 j5PogsfIrXpdL6xSQxAqw2x7xUvWOhyY+/muhLhxjrpt24UNRd243WQbvkSRWeVf/fCn NOZ44znxuw1VPLhhXeLyRR05R37zFLPXqtlMF1sCrkQpCqglsaT+SMduUxNgoZnVInCR NPnw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:cc:to:subject:message-id:date:from :in-reply-to:references:mime-version:dkim-signature; bh=qSqVZ4wC8BLB3KS1Rh2X9uFvpKZ1m3iw2AqC6OIl35Q=; b=RQtr0uR61j+CxEzYKK6EZjjx/a+doF88iqHpJjEmp2p4yPuK/XfA0FD5EP1571wKK7 x4OlPZ/f8o7+NKAmIDslSNaGfy08TgurFAYeSr5KfKPftou6HSEPnELSPRuSugtctp2Q tp5TBAEqjDanp2sfpVZa9QfOsQbOc2tyLURiXqSsxXNEwZHGZY/i6tljPuRZcq3wuUBS JDNBjdPxQR90bmqSwuW027cRj3iczGJqli/JFo4hbTG+sHuw/WhP5dRgStr5lVwe73Tz dRFguN2urdYrkCuCfE+EpdzHASFFynCGuHeQzrz8pk579PWTw3JEVzhhK0I5/tbxg8gY N0qA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@gmail.com header.s=20161025 header.b=msP7tJNs; 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; dmarc=pass (p=NONE sp=QUARANTINE dis=NONE) header.from=gmail.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id 61si3025848plc.364.2018.11.23.06.38.36; Fri, 23 Nov 2018 06:38:59 -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=@gmail.com header.s=20161025 header.b=msP7tJNs; 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; dmarc=pass (p=NONE sp=QUARANTINE dis=NONE) header.from=gmail.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S2436893AbeKWAJu (ORCPT + 99 others); Thu, 22 Nov 2018 19:09:50 -0500 Received: from mail-io1-f68.google.com ([209.85.166.68]:45190 "EHLO mail-io1-f68.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1729285AbeKWAJu (ORCPT ); Thu, 22 Nov 2018 19:09:50 -0500 Received: by mail-io1-f68.google.com with SMTP id w7so6605461iom.12; Thu, 22 Nov 2018 05:30:28 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=mime-version:references:in-reply-to:from:date:message-id:subject:to :cc; bh=qSqVZ4wC8BLB3KS1Rh2X9uFvpKZ1m3iw2AqC6OIl35Q=; b=msP7tJNs3o7XbBIPba0uK11VNSIwfE4JmLYh3+T4TUM+jbqs9qMUy3bwH6ijJVvoWu jVXXRwViOxQeLmp4+hsThgFncQAEohoweiOoJwoSkWlgYxo0cqWBd6396AwK9LSThgmk a1Fr8e0NjhzDGZexkxtUNUQ3zHbDs9nbF+9rLnJpX5jpPBPoMnIkzXjSJnpo2CLvpRqe eKTYZltlbw4llzxHJkvOLv/BaoEOITSzM+0dbNMmutK/Hcba5qb8iH4Q6xShSPfhZxft XkrpwVLU4/0rsnvKSUxQn1A1SQhkN7vkBO121QnbOlRfym3tpGP4sO+mO+TElTy11UPs RcrA== 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=qSqVZ4wC8BLB3KS1Rh2X9uFvpKZ1m3iw2AqC6OIl35Q=; b=sfidQad56fQFKYhnzvMK6bGqqjsj+IRD5aV5MSKo6jsHy0Oyp65dVQ1PZFmMl8IsrA C6MNjQIQdo4EGCgsFFHpdOCMNnOqXNkiQa0oFlu3Rz3S1DQuIeoz5IQDco3IC7rXQgu2 fHCiEmUED41LCfslgTW5l8WA4OrUMToorRMYyJvj6uqEKUKBzP6lD3b7JjePDQrE8cKN +IDLgMtINRpMXAE3LEcopXgNHYfr0yY6CVlsj8Uo7t4Q+dAKbQp7WX/KduG0oPQIj+3a UE8gbGi0xNyFwDayMKS71mvD1bLFvmY3fNZw89lpkQ00rSrbisKEXAa3DH7LywxLLIKR v9EA== X-Gm-Message-State: AA+aEWZ+7YPZdYRskFaZuBs8t5uSeOiPl++S9yN+UuH5LXkJhCJMadlJ uvd2wv843SGRhE8MlFSmVASdp0FgMfP9Hk8sflQ= X-Received: by 2002:a5d:8497:: with SMTP id t23mr1030918iom.11.1542893428528; Thu, 22 Nov 2018 05:30:28 -0800 (PST) MIME-Version: 1.0 References: <1542626272-29129-1-git-send-email-laoar.shao@gmail.com> <20181121192844.1cd1c2fa4801a324d059176c@linux-foundation.org> In-Reply-To: From: Yafang Shao Date: Thu, 22 Nov 2018 21:29:52 +0800 Message-ID: Subject: Re: [PATCH] procfs: fix the output format in /proc/PID/wchan To: Alexey Dobriyan Cc: Andrew Morton , viro@zeniv.linux.org.uk, Kees Cook , LKML , linux-fsdevel@vger.kernel.org Content-Type: text/plain; charset="UTF-8" Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Thu, Nov 22, 2018 at 7:40 PM Alexey Dobriyan wrote: > > On Wed, Nov 21, 2018 at 07:28:44PM -0800, Andrew Morton wrote: > > On Mon, 19 Nov 2018 19:17:52 +0800 Yafang Shao wrote: > > > > > Just add the missing newline. > > > > > > ... > > > > > > --- a/fs/proc/base.c > > > +++ b/fs/proc/base.c > > > @@ -370,11 +370,12 @@ static int proc_pid_wchan(struct seq_file *m, struct pid_namespace *ns, > > > wchan = get_wchan(task); > > > if (wchan && !lookup_symbol_name(wchan, symname)) { > > > seq_puts(m, symname); > > > + seq_putc(m, '\n'); > > > return 0; > > > } > > > > > > print0: > > > - seq_putc(m, '0'); > > > + seq_puts(m, "0\n"); > > > return 0; > > > } > > > #endif /* CONFIG_KALLSYMS */ > > > > What is presently wrong with the wchan output? The changelog > > should explain such things, please. > > It is just newline to make "cat /proc/*/wchan" output look cool. > But newline can break something. Could you pls. show some examples for what the newline may break ? Thanks Yafang