From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id 428B5C433F5 for ; Thu, 7 Oct 2021 03:01:58 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by mail.kernel.org (Postfix) with ESMTP id 2996B6109F for ; Thu, 7 Oct 2021 03:01:58 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S240070AbhJGDDt (ORCPT ); Wed, 6 Oct 2021 23:03:49 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:41208 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S239796AbhJGDDq (ORCPT ); Wed, 6 Oct 2021 23:03:46 -0400 Received: from mail-yb1-xb29.google.com (mail-yb1-xb29.google.com [IPv6:2607:f8b0:4864:20::b29]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id DAEBFC061755 for ; Wed, 6 Oct 2021 20:01:53 -0700 (PDT) Received: by mail-yb1-xb29.google.com with SMTP id g6so10069593ybb.3 for ; Wed, 06 Oct 2021 20:01:53 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=20210112; h=mime-version:references:in-reply-to:from:date:message-id:subject:to :cc; bh=vS4/WOvYDhNQ7ZsXwhiF8T3HN4eYLx7yihXGA4gOi8Q=; b=dmiCtiNfg3F1ojrOt2kKAa87WL7RZ81/psMuqyaUaCcmRrX9ExgCOOsDqPjUDZbWAV /I0Pk/3VHqkpewCiUKWA8d4JlwoPsGXZXIYmju9wEHL9TVHS0Orqa5NdEbLbq22fzW14 l7InE8yrsBMGM1vmNkTSeZ90ZFkonfWNdUMalDKhWwH3IXItN3KIYTo1saLaJ9xuL3pe SGQ/Elmv7+OeWgdPgfullF+YxQH3WSAyBtK5+Vy0KSu2qLhJy9lo8jExk8QA+ksiAIW3 Kqa6CUduCBvAWoCmVmQubEbYqi+ILUgDkmRr9mBZRfTri9fEuWoe6uk7SlCeuqfdY8uE D8ag== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=x-gm-message-state:mime-version:references:in-reply-to:from:date :message-id:subject:to:cc; bh=vS4/WOvYDhNQ7ZsXwhiF8T3HN4eYLx7yihXGA4gOi8Q=; b=RS26Muf6F+KCTaD63NQEaOwzljZlV8+N5TOEFS3OpKrdas2naoebG8dNtpyr/Ockvx J8uke3hlaRjFBomHZI+CKS03mnyxLX6JbikfJKSj2bgOPzarkYTlwJDNxAUjrJyJLXEu rdLatw+65UNB9/F96mQIQ1TWeTwRdl5DUc4ORP+TXWTIPrPYPmJj4pOEahSKpphXkcBR w02BtaHIIU6LcrZJlRhS5y17G9jKSaGbHmp2ytG2KktCODspuyQCvTJHmNKKA5LlyM58 17YcTn2IUB7Y9/iPX5lXDtIA7e8JCaZRO1AH/yWf0ebWgq+FVhx2QhpDtJUOA9KLeftZ EaDQ== X-Gm-Message-State: AOAM533LkQuBRYVvhnji4RDRuSKZzy3SfmtHbQUk9uzXROZGQsjt76e8 +4z1XhUSIxdOfLVEcXnn4Xe4pDaiNCcjFWeBG1g0Lw== X-Google-Smtp-Source: ABdhPJzxEEoo/pcYDZMOV4N414fYfqOlmoxKNZxbDuRFKK1KmSs2TGXymC53i/KVPXTVnDpF8ixE9gXUqIldDfHRo/I= X-Received: by 2002:a25:5b04:: with SMTP id p4mr1908085ybb.34.1633575712677; Wed, 06 Oct 2021 20:01:52 -0700 (PDT) MIME-Version: 1.0 References: <20211001205657.815551-1-surenb@google.com> <20211001205657.815551-3-surenb@google.com> <20211005184211.GA19804@duo.ucw.cz> <20211005200411.GB19804@duo.ucw.cz> <6b15c682-72eb-724d-bc43-36ae6b79b91a@redhat.com> <192438ab-a095-d441-6843-432fbbb8e38a@redhat.com> <20211006192927.f7a735f1afe4182bf4693838@linux-foundation.org> <20211006195342.0503b3a3cbcd2c3c3417df46@linux-foundation.org> In-Reply-To: <20211006195342.0503b3a3cbcd2c3c3417df46@linux-foundation.org> From: Suren Baghdasaryan Date: Wed, 6 Oct 2021 20:01:41 -0700 Message-ID: Subject: Re: [PATCH v10 3/3] mm: add anonymous vma name refcounting To: Andrew Morton Cc: David Hildenbrand , Michal Hocko , John Hubbard , Pavel Machek , Colin Cross , Sumit Semwal , Dave Hansen , Kees Cook , Matthew Wilcox , "Kirill A . Shutemov" , Vlastimil Babka , Johannes Weiner , Jonathan Corbet , Al Viro , Randy Dunlap , Kalesh Singh , Peter Xu , rppt@kernel.org, Peter Zijlstra , Catalin Marinas , vincenzo.frascino@arm.com, Chinwen Chang , Axel Rasmussen , Andrea Arcangeli , Jann Horn , apopple@nvidia.com, Yu Zhao , Will Deacon , fenghua.yu@intel.com, thunder.leizhen@huawei.com, Hugh Dickins , feng.tang@intel.com, Jason Gunthorpe , Roman Gushchin , Thomas Gleixner , krisman@collabora.com, Chris Hyser , Peter Collingbourne , "Eric W. Biederman" , Jens Axboe , legion@kernel.org, Rolf Eike Beer , Cyrill Gorcunov , Muchun Song , Viresh Kumar , Thomas Cedeno , sashal@kernel.org, cxfcosmos@gmail.com, Rasmus Villemoes , LKML , linux-fsdevel@vger.kernel.org, linux-doc@vger.kernel.org, linux-mm , kernel-team , Tim Murray Content-Type: text/plain; charset="UTF-8" Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Wed, Oct 6, 2021 at 7:53 PM Andrew Morton wrote: > > On Wed, 6 Oct 2021 19:46:57 -0700 Suren Baghdasaryan 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@rasmusvillemoes.dk), > > 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? > > > -- > To unsubscribe from this group and stop receiving emails from it, send an email to kernel-team+unsubscribe@android.com. >