mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: Alexey Dobriyan <adobriyan@gmail.com>
To: Jarod Wilson <jarod@redhat.com>
Cc: Andrew Morton <akpm@linux-foundation.org>,
	linux-kernel@vger.kernel.org,
	"Eric W. Biederman" <ebiederm@xmission.com>,
	Al Viro <viro@zeniv.linux.org.uk>,
	Miklos Szeredi <miklos@szeredi.hu>, Zefan Li <lizefan@huawei.com>,
	Oleg Nesterov <oleg@redhat.com>
Subject: Re: [PATCH] fs/proc: allow larger /proc/<pid>/cmdline output
Date: Fri, 10 Apr 2015 17:11:40 +0300	[thread overview]
Message-ID: <20150410141140.GA27200@p183.telecom.by> (raw)
In-Reply-To: <20150410121838.GA13391@redhat.com>

On Fri, Apr 10, 2015 at 08:18:38AM -0400, Jarod Wilson wrote:
> On Thu, Apr 09, 2015 at 09:12:00PM -0700, Andrew Morton wrote:
> > On Thu,  9 Apr 2015 23:59:02 -0400 Jarod Wilson <jarod@redhat.com> wrote:
> > 
> > > There are people who run java. Sometimes, when it misbehaves, they try to
> > > figure out what's going on by dumping /proc/<pid>/cmdline, but the length
> > > of that output is currently capped by PAGE_SIZE (so x86_64's 4k, in most
> > > cases), and sometimes, java command lines are longer than 4k characters.
> > > 
> > > This change allows the user to request a larger max length, up to 4x
> > > PAGE_SIZE, but the default out-of-the-box setting should keep things the
> > > same as they ever were. The 4x maximum is somewhat arbitrary, but seemed
> > > like it should be more than enough, because really, if you have more than
> > > 16k characters on your command line, you're probably doing it wrong...
> > > 
> > > I've tested this lightly with non-java shell commands with really long
> > > parameters, and things are perfectly stable after several hundred
> > > iterations of exercising things on a system booted with both
> > > proc_pid_maxlen=8192 and 16384. I wouldn't call my testing exhaustive,
> > > and I may not have considered something that will blow up horribly here,
> > > so comments and clues welcomed.
> > > 
> > > Using single_open_size() looked less messy than giving proc_pid_cmdline()
> > > its own .start op that would allow multiple buffers.
> > > 
> > > Note: I've only added this extended sizing for /proc/<pid>/cmdline output,
> > > rather than for all /proc/<pid>/foo elements, thinking that nothing else
> > > should ever really be that long, but anything that is can simply switch
> > > from using the ONE() macro to the ONE_SIZE() macro.
> > 
> > Why have an upper limit at all?
> 
> Just trying to be conservative and keep people from doing anything too
> insane, but I didn't really have any particularly good reason beyond that
> for capping it. I'll remove the upper bound next iteration.

There is no need for next iteration. Andrew has been ignoring real fix for more
than a month now!

	Alexey

  reply	other threads:[~2015-04-10 14:11 UTC|newest]

Thread overview: 11+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2015-04-10  3:59 Jarod Wilson
2015-04-10  4:12 ` Andrew Morton
2015-04-10 12:18   ` Jarod Wilson
2015-04-10 14:11     ` Alexey Dobriyan [this message]
2015-04-10 14:13       ` [PATCH try #3] proc: fix PAGE_SIZE limit of /proc/$PID/cmdline Alexey Dobriyan
2015-04-10 18:01         ` Jarod Wilson
2015-04-10 22:09           ` Alexey Dobriyan
2015-04-13 18:28             ` Jarod Wilson
2015-04-13 20:23               ` Andrew Morton
2015-04-10 20:45       ` [PATCH] fs/proc: allow larger /proc/<pid>/cmdline output Andrew Morton
2015-04-13 18:24         ` Jarod Wilson

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20150410141140.GA27200@p183.telecom.by \
    --to=adobriyan@gmail.com \
    --cc=akpm@linux-foundation.org \
    --cc=ebiederm@xmission.com \
    --cc=jarod@redhat.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=lizefan@huawei.com \
    --cc=miklos@szeredi.hu \
    --cc=oleg@redhat.com \
    --cc=viro@zeniv.linux.org.uk \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox

all inboxes | Powered by JetHome®