From: Greg KH <greg@kroah.com>
To: Karaoui mohamed lamine <moharaka@gmail.com>
Cc: kernelnewbies@kernelnewbies.org
Subject: Re: ULIMIT: limiting user virtual address space (stack inluded)
Date: Thu, 2 May 2019 16:24:19 +0200 [thread overview]
Message-ID: <20190502142419.GB17577@kroah.com> (raw)
In-Reply-To: <CAEEuMqfGpLBPa4UABRWUJUUASZSOP6jkXP+jmmzRJyuAJoTCkQ@mail.gmail.com>
On Thu, May 02, 2019 at 09:06:09AM -0400, Karaoui mohamed lamine wrote:
> Hi all,
>
> According to the man page of "ulimit", it is possible to limit the virtual
> address space of a user process: https://ss64.com/bash/ulimit.html
> To limit the virtual address space to 2 GB:
> $ ulimit -SH -v 1048576
>
> However, it seems that "stack" allocation ignores this limit (I tried with
> both kernel 4.4 and 4.15).
>
> I found this article (patch) that seems to fix the problem:
> https://lwn.net/Articles/373701/
>
> My questions are:
> - Why is the stack allocation not placed within the "ulimit" limit? (is it
> a bug?)
> - Is there a way, in user space, to force the stack to be allocated at a
> certain address?
> - Will the patch above (or similar) ever be integrated into the Linux
> kernel?
The patch above was integrated into the 2.6.33 kernel, and backported to
2.6.32.9 and fixed in 2.6.32.10. All of those kernels were released in
2010, quite a long time ago.
Are you sure you are hitting the same "problem"?
thanks,
greg k-h
_______________________________________________
Kernelnewbies mailing list
Kernelnewbies@kernelnewbies.org
https://lists.kernelnewbies.org/mailman/listinfo/kernelnewbies
next prev parent reply other threads:[~2019-05-02 14:24 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2019-05-02 13:06 ULIMIT: limiting user virtual address space (stack inluded) Karaoui mohamed lamine
2019-05-02 14:24 ` Greg KH [this message]
2019-05-02 15:50 ` Valdis Klētnieks
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=20190502142419.GB17577@kroah.com \
--to=greg@kroah.com \
--cc=kernelnewbies@kernelnewbies.org \
--cc=moharaka@gmail.com \
/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).