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

- From: John Ousterhout \<hidden\>
- Date: 2025-02-04 21:20:59 
- List: netdev
- Page: https://ratatoskr.run/netdev/2025/02/11317971
- Thread: https://ratatoskr.run/netdev/2025/01/11317616/t.md

```text
On Tue, Feb 4, 2025 at 11:41 AM Andrew Lunn [ref] wrote:
>
> > > 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-
```
