Re: [PATCH net-next v6 08/12] net: homa: create homa_incoming.c

From
John Ousterhout <hidden>
Date
2025-02-04 21:20:59
Reply to
Andrew Lunn, 2025-02-04
On Tue, Feb 4, 2025 at 11:41 AM Andrew Lunn [off-list ref] wrote:
quoted
quoted
If unprivileged applications could use unlimited amount of kernel
memory, they could hurt the whole system stability, possibly causing
functional issue of core kernel due to ENOMEM.

The we always try to bound/put limits on amount of kernel memory
user-space application can use.
Homa's receive buffer space is *not kernel memory*; it's just a large
mmapped region created by the application., no different from an
application allocating a large region of memory for its internal
computation.
ulimit -v should be able to limit this, if user space is doing the
mmap(). It should be easy to test. Set a low enough limit the mmap()
should fail, and i guess you get MAP_FAILED and errno = ENOMEM?
I just tried this, and yes, if ulimt -v is set low enough, user apps
can't mmap buffer space to pass to Homa.

-John-
Thread (7 messages) 7 messages, 3 authors, last reply 2025-02-04
Keyboard shortcuts
hback out one level
jnext message in thread / next series-diff position
kprevious message in thread / previous series-diff position
ldrill in
Escclose help / fold thread tree
?toggle this help