Received: by 2002:ad5:474a:0:0:0:0:0 with SMTP id i10csp2440017imu; Fri, 23 Nov 2018 09:13:19 -0800 (PST) X-Google-Smtp-Source: AFSGD/Vl5jWERyyZ6V9dzSU300AB1hJdHEN3k0rMTmYNDybfkeGr9bTckeKYcEYnOzDvNuDhA7cy X-Received: by 2002:a63:3204:: with SMTP id y4mr14741960pgy.41.1542993199414; Fri, 23 Nov 2018 09:13:19 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1542993199; cv=none; d=google.com; s=arc-20160816; b=XX0ibrSHrmJ/HOEWwuhI0GFNCKSdnfe33kZ0/gVfmeEvdYT0LJ2a5Ue573JCTpIEYV QQecmM37cf+RSf76WxmxZBSccgzx/sJMOv90pPwtofcVatt2WFQ2pVmmqgQZ/ILRSiyC kfR3qCtdrqVGLXk2iCTuQOva3RBGXHgB8pSVvYohXxuQxJ7p7zInZBvvBC+vqQ5xD8dB rL8wz9KGnPuL6QNYfbKOXAplvuq9ldoI+6Rf1zB52b4VKHoV+UXHPSwg0R4LLH/EsVfe 8fFBMxEfY9DtFRnQJJNxhfCGkrW7Dct+WxxMw07XWRVRDni60Ros4yD3cWF2DdNdOJNT PB4w== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:user-agent:in-reply-to :content-disposition:mime-version:references:message-id:subject:cc :to:from:date:dkim-signature; bh=aGf6iSkZLEQaXiYl1k8Acjxk4k+FUv2w5HCHkpUT0Jo=; b=h/LFDFRrI7GEFQNVSqk0pl89s+kyCc1vKth6tLzwfA6hahaJg3YSVU0tqiXPelhSp/ xSZn3NJ8RMNMx17DOf2t2I9jVgAb2/6hUeM85rZb72rXRgkGNlFhzrQOfDgBb3KLz+3Y YSO24OzRTmbWqeb2YouJwHP6HdtCoWXIfb3PaXEDKYwVlkWbJPNAEGZN79oVRhh3d5LO Nq8G3Je+Uq3X1ymxSZOzWeRC/tLL3MvqpauLBVgocLZ0X3da/PFnxuZXu9/SRZZHXIfY 8M158/jB4AKm0VwXMz5KrXaQLsM0r6bxuaF9ZwLQh4kxSz0G/g1qTbbMEJ40RJzlvw1d 6uoQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@gmail.com header.s=20161025 header.b=tNV4Pr3J; 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 z71si50042587pgd.490.2018.11.23.09.12.57; Fri, 23 Nov 2018 09:13:19 -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=tNV4Pr3J; 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 S2436946AbeKWARy (ORCPT + 99 others); Thu, 22 Nov 2018 19:17:54 -0500 Received: from mail-wr1-f67.google.com ([209.85.221.67]:45350 "EHLO mail-wr1-f67.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S2436758AbeKWARx (ORCPT ); Thu, 22 Nov 2018 19:17:53 -0500 Received: by mail-wr1-f67.google.com with SMTP id v6so9292092wrr.12; Thu, 22 Nov 2018 05:38:29 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=date:from:to:cc:subject:message-id:references:mime-version :content-disposition:in-reply-to:user-agent; bh=aGf6iSkZLEQaXiYl1k8Acjxk4k+FUv2w5HCHkpUT0Jo=; b=tNV4Pr3JcQAWRDoHl8Bxx08etjeq9iurir0kzoSpJSccARokPcJkHOBK74SUeMyXLr jd8g1WafDSFyN5uA2/ryxK2JnYStTgDZR4ZSTja6AScc0lHMw7WSTv4Tswh32Xhu/b76 PFYI6NgL8zm4yGOzZ4vX3cG10kMx2lpLTka7BN2pzRrADQCW1e7Rh7BTXLfkW55CXAWr S27DFOECuqI25KN4XFg5+lxVctLo0KDAzC0Oss9YT4Yv4JRE03TFrR9+yUezrXFlipC/ cg+UHTDDib9W34/TTjqq+LG8Qh5ao4AbKpldEcT2s2PIpkkFWx4rU07lovT7/ljr0rAM np8w== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:date:from:to:cc:subject:message-id:references :mime-version:content-disposition:in-reply-to:user-agent; bh=aGf6iSkZLEQaXiYl1k8Acjxk4k+FUv2w5HCHkpUT0Jo=; b=qIaOVZxtKl6Ec72B53ZjssxnLWdGi6CWN0wXM9AfBY5D6njx5+lqQBfARTrUo9gPTp oMLU3bxYZ4HPPZ9WnobMMAWRqN1zY16IEdDEhDEhAchsv8IupXVwcG4vr8PoA05RPuuY KA5qTfnt2sIxP+wdhp1bz8p5Q1HA6HXfadHyAYVjSfX0Ubvcw4H40blhtfqtMB6mPG/R PpiNf7tbcQslmp8uxW26T/HCe/1Rh5IvUBLi2yXDRk1fxkIHBDQYriQvUgEydGZTztxj G+F60FixsFm1yEOk8E0Yu10THoz0WlnEvW8FCgiZhGcjF/PaFvHE91R9ldyGPk4M4LOE I9lA== X-Gm-Message-State: AA+aEWbEtCsZ0l4lOR+7CIYkeFkHkBVpbaITD5fWEq4Spv2yxreZQT38 Uu4HY4282o0rqhWFpPPCKg== X-Received: by 2002:adf:c647:: with SMTP id u7-v6mr9476724wrg.174.1542893908930; Thu, 22 Nov 2018 05:38:28 -0800 (PST) Received: from avx2 (nat-minsk-pool-46-53-201-92.telecom.by. [46.53.201.92]) by smtp.gmail.com with ESMTPSA id i16sm6080036wmd.28.2018.11.22.05.38.27 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Thu, 22 Nov 2018 05:38:28 -0800 (PST) Date: Thu, 22 Nov 2018 16:38:26 +0300 From: Alexey Dobriyan To: Yafang Shao Cc: Andrew Morton , viro@zeniv.linux.org.uk, Kees Cook , LKML , linux-fsdevel@vger.kernel.org Subject: Re: [PATCH] procfs: fix the output format in /proc/PID/wchan Message-ID: <20181122133826.GA14139@avx2> References: <1542626272-29129-1-git-send-email-laoar.shao@gmail.com> <20181121192844.1cd1c2fa4801a324d059176c@linux-foundation.org> MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Disposition: inline In-Reply-To: User-Agent: Mutt/1.10.1 (2018-07-13) 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 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);