From: Jan Stancek <jstancek@redhat.com>
To: ltp@lists.linux.it
Subject: [LTP] [PATCH] syscalls/setrlimit: add setrlimit04
Date: Mon, 17 Jul 2017 03:01:40 -0400 (EDT) [thread overview]
Message-ID: <812380836.53324474.1500274900880.JavaMail.zimbra@redhat.com> (raw)
In-Reply-To: <87h8yfi3v6.fsf@our.domain.is.not.set>
----- Original Message -----
>
> Hi Jan,
>
> Jan Stancek writes:
>
> > + * DESCRIPTION
> > + * Attempt to run a trivial binary with stack < 1MB.
> > + *
> > + * Early patches for stack guard gap caused that gap size was
> > + * contributing towards stack limit. This caused failures
> > + * for new processes (E2BIG) when ulimit was set to anything
> > + * lower than size of gap. commit 1be7107fbe18 "mm: larger
> > + * stack guard gap, between vmas" sets default gap size to 1M
> > + * (for systems with 4k pages), so let's set stack limit to 512kB
> > + * and confirm we can still run some trivial binary.
> > + */
>
> The first sentance is difficult to parse. I think you are saying that in
> the early patches the stack gaurd gap was included in the stack
> size.
Yes. I didn't dig into details, but I think your formula below
is close.
> The stack size is then compared to the stack limit, so a process
> would fail to start if
>
> [initial process stack usage] + [stack gap] > [stack limit].
>
> However the stack gap should not be included in this calculation.
next prev parent reply other threads:[~2017-07-17 7:01 UTC|newest]
Thread overview: 9+ messages / expand[flat|nested] mbox.gz Atom feed top
2017-07-14 11:12 [LTP] [PATCH] syscalls/setrlimit: add setrlimit04 Jan Stancek
2017-07-14 12:45 ` Richard Palethorpe
2017-07-17 7:01 ` Jan Stancek [this message]
2017-07-17 5:01 ` Li Wang
2017-07-17 6:50 ` Jan Stancek
2017-07-17 7:50 ` Li Wang
2017-07-17 9:43 ` Jan Stancek
2017-10-02 13:11 ` Cyril Hrubis
2017-10-02 13:55 ` Jan Stancek
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=812380836.53324474.1500274900880.JavaMail.zimbra@redhat.com \
--to=jstancek@redhat.com \
--cc=ltp@lists.linux.it \
/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