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]
Date:	Thu, 26 Jul 2007 12:52:40 -0700
From:	Andrew Morton <akpm@...ux-foundation.org>
To:	Will Woods <wwoods@...hat.com>
Cc:	Neil Horman <nhorman@...driver.com>, linux-kernel@...r.kernel.org
Subject: Re: [PATCH] core_pattern: Add ability for core_pattern to parse
 arguments when pattern is a pipe

On Thu, 26 Jul 2007 15:36:24 -0400 Will Woods <wwoods@...hat.com> wrote:

> On Thu, 2007-07-26 at 11:48 -0700, Andrew Morton wrote:
> > On Thu, 26 Jul 2007 13:40:19 -0400 Neil Horman <nhorman@...driver.com> wrote:
> > 
> > > 	Currently, core dumps can be redirected to a pipe by placing the
> > > following string template in /proc/sys/kernel/core_pattern:
> > > |<path/to/application>
> > > This patch extends this ability, allowing the core_pattern to contain arguments
> > > to be passed as an argv array to the userspace helper application.  It also add
> > > a format specifier, %c, which allows the RLIM_CORE value of the crashing
> > > application to be passed on the command line, since RLIMIT_CORE is reduced to
> > > zero when execing the userspace helper
> > 
> > This all seems to be getting a bit nutty.  Who needs this feature
> > and what will they do with it, etc?
> 
> We're using it for doing a system-wide crash dump handler. Currently
> Ubuntu's using it with their Apport tool[1] for this purpose; I'm
> adapting that for Fedora. 

Can you please copy the relevant Ubuntu people on the patches then?  It
would be valuable to get their input on the proposal.

> The Ubuntu approach requires a kernel patch that adds a bunch of process
> information (process pid, RLIMIT_CORE, etc) to the environment of the
> crash handler[2]. Most of that information can instead be parsed out of
> the ELF headers - which is what I wrote code to do[3]. The problem that
> remains is determining the value of RLIMIT_CORE. (This is used to
> determine whether the user wants a normal corefile, thus retaining
> normal core dump behavior). 
> 
> As I understand it, getrlimit() won't return the correct values while
> dumping to a pipe. So we need to pass the original RLIMIT_CORE to the
> userspace helper somehow. It seems sensible to pass arguments to a
> userspace program by using argv[]. So there we are.

yup.  The changelog should clearly document this new kernel/userspace
interface, please.  Things like what the argv format will be, which args
are optional, etc.

> There's probably many other uses for this stuff but that's the specific
> one we're targeting. Does that make sense? If there's an easier way to
> get the original RLIMIT_CORE from inside the crash handler, I'd love to
> hear it.
> 

I'm still emerging from the "what the heck is this" state ;)

You need to tell us these things...
-
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