lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <20150410141140.GA27200@p183.telecom.by>
Date:	Fri, 10 Apr 2015 17:11:40 +0300
From:	Alexey Dobriyan <adobriyan@...il.com>
To:	Jarod Wilson <jarod@...hat.com>
Cc:	Andrew Morton <akpm@...ux-foundation.org>,
	linux-kernel@...r.kernel.org,
	"Eric W. Biederman" <ebiederm@...ssion.com>,
	Al Viro <viro@...iv.linux.org.uk>,
	Miklos Szeredi <miklos@...redi.hu>,
	Zefan Li <lizefan@...wei.com>, Oleg Nesterov <oleg@...hat.com>
Subject: Re: [PATCH] fs/proc: allow larger /proc/<pid>/cmdline output

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@...hat.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
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ