Received: by 2002:ad5:474a:0:0:0:0:0 with SMTP id i10csp3218465imu; Sat, 24 Nov 2018 00:21:58 -0800 (PST) X-Google-Smtp-Source: AFSGD/Xy4TD5hbWWQk6wXJdp3/4NQINTWeokPyW7p8cEaOKohEy1KWvr6QaPozs8U8mBzz+s+Oii X-Received: by 2002:a17:902:66e5:: with SMTP id e92-v6mr18759918plk.92.1543047718427; Sat, 24 Nov 2018 00:21:58 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1543047718; cv=none; d=google.com; s=arc-20160816; b=HzagrPQeE0hQZnCmfL2+tiAIGJ1UwHhqV3vIMFdGCbnjWYWt/JJSXy+fcbBLp5nUyE +vhvqxY0R8TthLQZerS4Xjqx4/JqGq3qHroLlPvbtp6VL8YV2IOUNNchlrTAIJLRpWIw N4Oy8qU4W7dUq5itCrwWneKOETr07aJ5bpBujEq8tAM3lhQueNSE+MAm82Nel8Dx1dLs LD9dIKrGi+3QcZVaQgJ15oXlsUhejaKdYoVZ8BSJ/lz5kMr7TKiM6L+KrJFYeZ9G3rlp mlNSihieoYBApNRbKP/PNqOwm0N1TApQUP3QTW4B1/mqBFubewv1r/rdApq7kZ568uoM fRfw== 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=JrC00WIYhhedll7l9dt/xU+eCXaR7xec2dE4AO2mhsA=; b=Tc1clKkBLXwojMyAMdvz8CQIfPqEeyswdZ9b08CW8p47V1JTZIfhDOO6crwQLfuHdM SoLea330n8P4FbWTC3NhIxb6KpMn/5rH+K777qPGBX4aLJZEiPVqWnvvsRQCXty+jhbv dS7OXXo+wgDJVugfcwQHJG/4fIphZACDclZyR5bVTPGxv2GsEujcV3am4CAm9nV8xtpK WQBVGv1Dc4pSPVnRCCC8+bu1+HGvhW4XNL+nS0n2hMGctvCCSyYGKilAFOvfQUtQIPxR oBGZFU3dZ9MXHE72p9iSffLWIC6pgi4L1IatAwtsqztdt+NCT+3kpMdXB7rV0Mh35EBZ sSPQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@gmail.com header.s=20161025 header.b=MhH0SIgk; 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 w5si33179560pfl.279.2018.11.24.00.21.44; Sat, 24 Nov 2018 00:21:58 -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=MhH0SIgk; 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 S2503065AbeKWUlf (ORCPT + 99 others); Fri, 23 Nov 2018 15:41:35 -0500 Received: from mail-io1-f67.google.com ([209.85.166.67]:47091 "EHLO mail-io1-f67.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S2387962AbeKWUlf (ORCPT ); Fri, 23 Nov 2018 15:41:35 -0500 Received: by mail-io1-f67.google.com with SMTP id v10so2751041ios.13; Fri, 23 Nov 2018 01:58:00 -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=JrC00WIYhhedll7l9dt/xU+eCXaR7xec2dE4AO2mhsA=; b=MhH0SIgk0M+7kXQtBFMgX5x3EOYR/PLv6jM5iZiDwwlgAiePO1gbq4IobZdtwkkhG2 EswwQP4vlNCi99fg3hXQdxYVeOzW+6UuQqzF2Kl/rf9ExHTXdWqV4bCFTi2LLk7YuMav HeCsm95BZ9XfqkUO6beGP5iIpcMynCDQuhWnG9ewJPGEzyVZzaqNa2kt2L7A4Inc383Y jQUwl3mCs4mBxfJWQjv2heboQHKDjhNp9jLeFX2zowMro5Cckc5D2xP1+kxTT6egLtpB V1rnWi8XV6CYaOKyotR1YfB7Zb9FtnpYI1DfCGCKLjae1ZzZ8T/om32HRpORiQtI/jyn Lizw== 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=JrC00WIYhhedll7l9dt/xU+eCXaR7xec2dE4AO2mhsA=; b=kARX2qp/EvHCz/zES8f+KBOcIuY6dM8mI/HbiKsvOv62+ysu1lZD1qg17kQR3uvXYa j2Nmfc72CyI0Z6BHJKQtozEBlpiRE9VuoXiE0SvrwRVJbkOzEmg8QwurUhMQovoreAII 0QBjzh6f7kS6+VZ5DwxucckXJW7qmDn6BBSLRR3M+SkszyMAloO2Bi1LefTV/lVpojta MVskXaPD9xAB9R8TU1OD1fQxu/gdeNUU4FGoiPO2SD0gy64CDfetgPpdsfKd+lBXc3NM JkQKLlQOUMnKpZnRdY+diWA15bv8gOMViZsRk6863xgqUqAAmkY8yeDpYOkULSAbBhyY nsAg== X-Gm-Message-State: AA+aEWZh2Mopnvm4z9IUn5WRGh98v7SFJPh0M+YJmOBI8BQIpSjSmQD7 DUrAXmt2ihEWa3ABlLlmqFlLIHl0sLtJL3ocf2o= X-Received: by 2002:a6b:b706:: with SMTP id h6mr10383958iof.295.1542967080108; Fri, 23 Nov 2018 01:58:00 -0800 (PST) MIME-Version: 1.0 References: <1542626272-29129-1-git-send-email-laoar.shao@gmail.com> <20181121192844.1cd1c2fa4801a324d059176c@linux-foundation.org> <20181122133826.GA14139@avx2> In-Reply-To: <20181122133826.GA14139@avx2> From: Yafang Shao Date: Fri, 23 Nov 2018 17:57:23 +0800 Message-ID: Subject: Re: [PATCH] procfs: fix the output format in /proc/PID/wchan To: Alexey Dobriyan , Andrew Morton Cc: 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 9:38 PM Alexey Dobriyan wrote: > > On Thu, Nov 22, 2018 at 09:29:52PM +0800, Yafang Shao wrote: > > 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 ? > > char buf[16]; > rv = read(fd, buf, sizeof(buf)); > assert(rv == 1); That's really a break, so we can't apply this patch. Hi Andrew, I found that you have applied this patch to -mm tree, could you pls. help revert it as it may break something ? Thanks Yafang