[lkml]   [2004]   [Jan]   [16]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
Messages in this thread
    SubjectRe: [PATCH] stronger ELF sanity checks v2
    On Friday 16 January 2004 10:08, Pavel Machek wrote:
    > Hi!
    > > On Tue, Jan 13, 2004 at 02:55:07AM +0100, Jesper Juhl wrote:
    > > > Here's the second version of my patch to add better sanity checks for
    > > > binfmt_elf
    > >
    > > I assume this breaks Brian Raiter's tiny ELF executables[1]. Even
    > > though these binaries are evil hacks that don't comply to standards
    > > and serve no serious purpose, I'm not sure what the purpose of the
    > > sanity checks is. Are there any risks associated with running
    > > non-compliant ELF executables? (Now that I mention it, the
    > You get vy ugly behaviour. If you compile executable with huge static
    > data, it will compile okay, link okay, *launch okay* and die on
    > segfault. That's wrong, it should have died on -ENOMEM during exec.
    > Pave

    Wouldn't that depend on the overcommit options?

    With permitted overcommit -
    compile/link ok
    launch - segfault/-ENOMEM if heap/stack + static data UPDATES exceed
    system capacity
    Without overcommit:
    -ENOMEM if the heap/stack can't be initialized; as in even the
    first page of the heap/stack fails - and before actual
    launch completes, as the situation you describe.

    If static data is just referenced, it should page in, and get dropped.
    To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
    the body of a message to
    More majordomo info at
    Please read the FAQ at

     \ /
      Last update: 2005-03-22 14:00    [W:0.041 / U:39.064 seconds]
    ©2003-2016 Jasper Spaans. hosted at Digital OceanAdvertise on this site