public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
From: Andrew Morton <andrewm@uow.edu.au>
To: Andreas Dilger <adilger@turbolinux.com>
Cc: Dawson Engler <engler@csl.stanford.edu>, linux-kernel@vger.kernel.org
Subject: Re: [CHECKER] large stack variables (>=1K) in 2.4.4 and 2.4.4-ac8
Date: Fri, 25 May 2001 13:38:12 +1000	[thread overview]
Message-ID: <3B0DD3A4.2E2AB76D@uow.edu.au> (raw)
In-Reply-To: <200105242110.OAA29766@csl.Stanford.EDU> "from Dawson Engler at May 24, 2001 02:10:00 pm" <200105242308.f4ON8fv8015978@webber.adilger.int>

Andreas Dilger wrote:
> 
> Dawson Engler writes:
> > Here are 37 errors where variables >= 1024 bytes are allocated on a
> > function's stack.
> 
> First of all, thanks very much for the work you are doing.  It really
> is useful, and a good way to catch those very rare error cases that
> would not otherwise be fixed.
> 
> I'm curious about this stack checker.  Does it check for a single
> stack allocation >= 1024 bytes, or does it also check for several
> individual, smaller allocations which total >= 1024 bytes inside
> a single function?  That would be equally useful.
> 
> On a side note, does anyone know if the kernel does checking if the
> stack overflowed at any time?

There's a little bit of code in show_task() which calculates
how close this task ever got to overrunning its kernel stack:

        {
                unsigned long * n = (unsigned long *) (p+1);
                while (!*n)
                        n++;
                free = (unsigned long) n - (unsigned long)(p+1);
        }
        printk("%5lu %5d %6d ", free, p->pid, p->p_pptr->pid);

SYSRQ-T will trigger this.

However it doesn't work, because do_fork() doesn't zero
out the stack pages when they're created.

-

  parent reply	other threads:[~2001-05-25  3:44 UTC|newest]

Thread overview: 36+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2001-05-24 21:10 [CHECKER] large stack variables (>=1K) in 2.4.4 and 2.4.4-ac8 Dawson Engler
2001-05-24 22:40 ` Anton Altaparmakov
2001-05-24 23:08 ` Andreas Dilger
2001-05-24 23:33   ` Andi Kleen
2001-05-25  5:20     ` Keith Owens
2001-05-25  6:33       ` Andreas Dilger
2001-05-25  6:53         ` Keith Owens
2001-05-25  8:20           ` Andi Kleen
2001-05-25  8:31             ` Keith Owens
2001-05-25  8:39               ` Andi Kleen
2001-05-25 14:03           ` Oliver Neukum
2001-05-25 14:07             ` Andi Kleen
2001-05-25 15:45               ` dean gaudet
2001-05-25 16:34                 ` Jonathan Lundell
2001-05-25 18:37                   ` dean gaudet
2001-05-25 17:49                     ` Jeff Dike
2001-05-25  7:11       ` David Welch
2001-05-25  8:08         ` Keith Owens
2001-05-25 15:31         ` dean gaudet
2001-05-25 15:49           ` Keith Owens
2001-05-25 18:46             ` dean gaudet
2001-05-25  8:14       ` Andi Kleen
2001-05-25  8:25         ` Keith Owens
2001-05-25  8:27           ` Andi Kleen
2001-05-25  8:37             ` Keith Owens
2001-05-25  8:17       ` Andi Kleen
2001-05-25 11:52     ` Brian Gerst
2001-05-25 11:53       ` Andi Kleen
2001-05-25 12:07         ` Brian Gerst
2001-05-25  3:38   ` Andrew Morton [this message]
  -- strict thread matches above, loose matches on Subject: below --
2001-05-24 23:01 Mikael Pettersson
2001-05-25  2:48 ` Dawson Engler
2001-05-25  3:00   ` Alexander Viro
2001-05-25  3:07     ` Dawson Engler
2001-05-25  4:23 Dunlap, Randy
2001-07-03  9:15 VDA

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=3B0DD3A4.2E2AB76D@uow.edu.au \
    --to=andrewm@uow.edu.au \
    --cc=adilger@turbolinux.com \
    --cc=engler@csl.stanford.edu \
    --cc=linux-kernel@vger.kernel.org \
    /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