From: Alberto Bertogli <albertito-vOTlzuNH1/1M3YmQoIpPTg@public.gmane.org>
To: mtk.manpages-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org
Cc: linux-man-u79uwXL29TY76Z2rM5mHXA@public.gmane.org,
Alberto Bertogli
<albertito-vOTlzuNH1/1M3YmQoIpPTg@public.gmane.org>
Subject: [PATCH] getrlimit.2: Note the side-effects of setting RLIMIT_STACK to RLIM_INFINITY
Date: Sat, 17 Jul 2010 01:11:04 -0300 [thread overview]
Message-ID: <1279339864-7203-1-git-send-email-albertito@blitiri.com.ar> (raw)
Since 2.6.25 (commit cc503c1b4), setting RLIMIT_STACK to RLIM_INFINITY has the
side-effect of making the kernel use the old vm layout, which can be also be
selected manually by setting the personality flag ADDR_COMPAT_LAYOUT.
The details of the old vs. new layout can be found at
http://lwn.net/Articles/90311/.
Signed-off-by: Alberto Bertogli <albertito-vOTlzuNH1/1M3YmQoIpPTg@public.gmane.org>
---
Hi!
I just found this behaviour and I thought a note was appropriate for the man
page.
While it shouldn't be noticeable for most cases, I just hit a bug triggered by
it, so it's not _that_ strange.
Thanks a lot,
Alberto
man2/getrlimit.2 | 9 +++++++++
1 files changed, 9 insertions(+), 0 deletions(-)
diff --git a/man2/getrlimit.2 b/man2/getrlimit.2
index 35c9eed..b9df581 100644
--- a/man2/getrlimit.2
+++ b/man2/getrlimit.2
@@ -360,6 +360,15 @@ Since Linux 2.6.23,
this limit also determines the amount of space used for the process's
command-line arguments and environment variables; for details, see
.BR execve (2).
+Since Linux 2.6.25, if set to
+.B RLIM_INFINITY
+then as a side-effect this limit changes the way the kernel selects the layout
+of the addresses returned by
+.BR mmap (2),
+as if the ADDR_COMPAT_LAYOUT personality
+flag was enabled. This should not be noticeable to most applications.
+.\" from arch/x86/mm/mmap.c:mmap_is_legacy(), introduced by commit cc503c1b
+
.SH "RETURN VALUE"
On success, zero is returned.
On error, \-1 is returned, and
--
1.7.1.755.geb6f2
--
To unsubscribe from this list: send the line "unsubscribe linux-man" in
the body of a message to majordomo-u79uwXL29TY76Z2rM5mHXA@public.gmane.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
reply other threads:[~2010-07-17 4:11 UTC|newest]
Thread overview: [no followups] expand[flat|nested] mbox.gz Atom feed
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=1279339864-7203-1-git-send-email-albertito@blitiri.com.ar \
--to=albertito-votlzunh1/1m3ymqoipptg@public.gmane.org \
--cc=linux-man-u79uwXL29TY76Z2rM5mHXA@public.gmane.org \
--cc=mtk.manpages-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.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;
as well as URLs for NNTP newsgroup(s).