kernelnewbies.kernelnewbies.org archive mirror
 help / color / mirror / Atom feed
* ULIMIT: limiting user virtual address space (stack inluded)
@ 2019-05-02 13:06 Karaoui mohamed lamine
  2019-05-02 14:24 ` Greg KH
  2019-05-02 15:50 ` Valdis Klētnieks
  0 siblings, 2 replies; 3+ messages in thread
From: Karaoui mohamed lamine @ 2019-05-02 13:06 UTC (permalink / raw)
  To: kernelnewbies


[-- Attachment #1.1: Type: text/plain, Size: 704 bytes --]

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?

Regards,
Mohamed

[-- Attachment #1.2: Type: text/html, Size: 1093 bytes --]

[-- Attachment #2: Type: text/plain, Size: 170 bytes --]

_______________________________________________
Kernelnewbies mailing list
Kernelnewbies@kernelnewbies.org
https://lists.kernelnewbies.org/mailman/listinfo/kernelnewbies

^ permalink raw reply	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2019-05-02 15:51 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2019-05-02 13:06 ULIMIT: limiting user virtual address space (stack inluded) Karaoui mohamed lamine
2019-05-02 14:24 ` Greg KH
2019-05-02 15:50 ` Valdis Klētnieks

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).