From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1754335Ab1LBT3F (ORCPT ); Fri, 2 Dec 2011 14:29:05 -0500 Received: from mail-bw0-f46.google.com ([209.85.214.46]:51754 "EHLO mail-bw0-f46.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1753551Ab1LBT3C (ORCPT ); Fri, 2 Dec 2011 14:29:02 -0500 Date: Fri, 2 Dec 2011 23:28:57 +0400 From: Cyrill Gorcunov To: Kees Cook Cc: Alexey Dobriyan , linux-kernel@vger.kernel.org, Andrew Morton , Tejun Heo , Andrew Vagin , Serge Hallyn , Pavel Emelyanov , Vasiliy Kulikov Subject: Re: [rfc 1/3] fs, proc: Add start_data, end_data, start_brk members to /proc/$pid/stat Message-ID: <20111202192857.GM14515@moon> References: <20111129191252.769160532@openvz.org> <20111129191638.756761754@openvz.org> <20111129200627.GO5169@outflux.net> <20111202002405.GA7701@p183.telecom.by> <20111202072800.GC14515@moon> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: User-Agent: Mutt/1.5.21 (2010-09-15) Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Fri, Dec 02, 2011 at 11:23:32AM -0800, Kees Cook wrote: > > > > I perhaps miss some history here, you mean just print 0 > > instead of 1, right? > > The history is that when "0" is seen for start_code, tools like "ps" > assumed the process was a kernel thread, so "1" was used as a hack to > not break userspace reporting. So yeah, since this is a new field, > it's fine to just do: > > + (mm && permitted) ? mm->start_data : 0, > + (mm && permitted) ? mm->end_data : 0, > + (mm && permitted) ? mm->start_brk : 0, > Yup, thanks a lot Kees, I'll update. Cyrill