Re: [PATCH v10 3/3] mm: add anonymous vma name refcounting

From: Andrew Morton
Date: Wed Oct 06 2021 - 22:53:52 EST


On Wed, 6 Oct 2021 19:46:57 -0700 Suren Baghdasaryan <surenb@xxxxxxxxxx> wrote:

> > > > > 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 information
> > >
> > > Yeah, 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@xxxxxxxxxxxxxxxxxx),
> 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?