bug-hurd
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [RFC] Implementing RLIMIT_AS


From: Luca
Subject: Re: [RFC] Implementing RLIMIT_AS
Date: Fri, 20 Dec 2024 10:29:33 +0100

Il 20/12/24 02:54, Diego Nieto Cid ha scritto:
On Thu, Dec 19, 2024 at 10:36:49PM +0100, Luca wrote:

I see that some limits (e.g. RLIMIT_DATA) are managed in glibc instead of
gnumach, maybe this could be a simpler way to add some minimal support? I
guess that one might overcome these limits by using directly the mach rpc or
hijacking glibc, but it could be enough for some use cases.


I failed to make it do anything. The only place where RLIMIT_DATA is read is
in the Mach/Hurd specific `__hurd_set_brk` function.

     glibc-2.40/sysdeps/mach/hurd/brk.c:  rlimit = 
_hurd_rlimits[RLIMIT_DATA].rlim_cur;
     [line 92]

Which is called from __sbrk, and at that point I'm lost.

Also, I cannot make it to fail with the attached test program.

This program also succeeds on Linux, according to setrlimit you could try to use mmap() or sbrk() instead of malloc() to make it fail.


Luca



reply via email to

[Prev in Thread] Current Thread [Next in Thread]