Re: [PATCH v10 3/3] mm: add anonymous vma name refcounting
From: David Hildenbrand <hidden>
Date: 2021-10-07 07:28:09
Also in:
linux-doc, linux-fsdevel, lkml
On 07.10.21 05:01, Suren Baghdasaryan wrote:
On Wed, Oct 6, 2021 at 7:53 PM Andrew Morton [off-list ref] wrote:quoted
On Wed, 6 Oct 2021 19:46:57 -0700 Suren Baghdasaryan [off-list ref] wrote:quoted
quoted
quoted
quoted
quoted
I wish it was that simple and for some names like [anon:.bss] or [anon:dalvik-zygote space] reserving a unique id would work, however some names like [anon:dalvik-/system/framework/boot-core-icu4j.art] are generated dynamically at runtime and include package name.Valuable informationYeah, I should have described it clearer the first time around.If it gets this fancy then the 80 char limit is likely to become a significant limitation and the choice should be explained & justified. Why not 97? 1034? Why not just strndup_user() and be done with it?The original patch from 8 years ago used 256 as the limit but Rasmus argued that the string content should be human-readable, so 80 chars seems to be a reasonable limit (see: https://lore.kernel.org/all/d8619a98-2380-ca96-001e-60fe9c6204a6@rasmusvillemoes.dk (local)), which makes sense to me. We should be able to handle the 80 char limit by trimming it before calling prctl().What's the downside to making it unlimited?If we ignore the human-readability argument, I guess the possibility of abuse and increased memory consumption? I'm guessing parsing such a string is also easier if there is a known limit?
64k * 80 bytes already makes me nervous enough :) -- Thanks, David / dhildenb