Received: by 2002:a05:6a10:d5a5:0:0:0:0 with SMTP id gn37csp955016pxb; Wed, 6 Oct 2021 20:03:19 -0700 (PDT) X-Google-Smtp-Source: ABdhPJxc/WAXRaJa2PjtYPlGDjtdWghX6otR5eZY9WA7cdPkT8MBzZo6nMnTHk1tZVjdA949IIog X-Received: by 2002:a05:6a00:26f7:b0:44c:7695:bfba with SMTP id p55-20020a056a0026f700b0044c7695bfbamr1645658pfw.12.1633575799490; Wed, 06 Oct 2021 20:03:19 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1633575799; cv=none; d=google.com; s=arc-20160816; b=VzRxN4224N7HP/L78hGAksDQPLb1AqEHel06SoVIHZRHmrSxj3AIIZ6emabprm6KyZ L8hVfm0d714mlZbqFEnzxfLvMcerW4j0CH+e1NJKP4ZsIx+uf9/4oBdyZaNoUvD5KyaP wlZDzt6e71K/BJ0ktM1D+2+OwOwbihUZYA7nK+eqkv2iovThvp+rexmqXAoBkpHZl0EE FbWkas7OTrlQZT4/SUYPxJRqJdE0/7KQx0am7mYJXwd4WB7BbZPuP3xg+U65oYD3gIuh kJx6BXMxyw8GON/tUPPGasouDSdu73w53QRfWmIgSVPdExJmJNMbVptxlKvv7N+XglSL WDtw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:cc:to:subject:message-id:date:from:in-reply-to :references:mime-version:dkim-signature; bh=vS4/WOvYDhNQ7ZsXwhiF8T3HN4eYLx7yihXGA4gOi8Q=; b=Xza+w7lLEpPTzCnNYEGyfXBk4bOIk9n98M7O333f8lnRmILA0t3N+G8V451PwWzNpC YDULdGxqKdAD72zonQFMJiu5/KPSlETHmI5wDVOgcPQP+TNnVbQyRbomVb+jVBQIW6hI GUbZSUAYk0257M/SK8ELIwIQDHeJhDFX9i2B4Of7SJ8+5Q51Jw9g/YVnvQdD3ncBeMEl 5tKFNFYZ2DfppAwGV3Q+cjZeb5ur8j35J/zzw6a8gHzHQgt2HBHPPhO4M6XF5RnpSEpm byDZhaQFYx5Se1NDpvwRFXExDx8Is3YTk7u6vx+T8VlBtIqT9P/mNQQDTQg30RG/FCrj 7Jxg== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@google.com header.s=20210112 header.b=dmiCtiNf; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=REJECT sp=REJECT dis=NONE) header.from=google.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id k12si8472515pjg.57.2021.10.06.20.03.04; Wed, 06 Oct 2021 20:03:19 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) client-ip=23.128.96.18; Authentication-Results: mx.google.com; dkim=pass header.i=@google.com header.s=20210112 header.b=dmiCtiNf; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=REJECT sp=REJECT dis=NONE) header.from=google.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S239972AbhJGDDt (ORCPT + 99 others); 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-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. >