On 6/12/2020 8:16 AM, Jens Axboe wrote:
On 6/11/20 8:23 PM, Bijan Mottahedeh wrote:
Buffer registration is expensive in terms of cpu/mem overhead and there
seems no good reason to allow overlapping ranges.
There's also no good reason to disallow it imho, so not sure we should
be doing that.
My concern was about a malicious user without CAP_IPC_LOCK abusing its
memlock limit and repeatedly register the same buffer as that would tie
up cpu/mem resources to pin up to 1TB of memory, but maybe the argument
is that the user should have not been granted that large of memlock
limit? Also, without any restrictions, there are a huge number of ways
overlapping ranges could be specified, creating a very large validation
matrix. What the use cases for that flexibility are though, I don't know.
--bijan