Received: by 2002:a05:6a10:d5a5:0:0:0:0 with SMTP id gn37csp951270pxb; Wed, 6 Oct 2021 19:57:04 -0700 (PDT) X-Google-Smtp-Source: ABdhPJxthE1gTg5fQGvfo6KNX3lgbulZw0wMJ0lGkhnWvGCqurti9vKS99xLIevJg15KZFN189Nw X-Received: by 2002:a17:906:3486:: with SMTP id g6mr2510479ejb.71.1633575424070; Wed, 06 Oct 2021 19:57:04 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1633575424; cv=none; d=google.com; s=arc-20160816; b=iXQoZVYhlO8go3PHRQPPEpD/elDZf6SMO/GAn5f/9aTmdM/HtzNqDH1NCewkjxw9IL gRG+dctTHS48lD/msdmH+EInN5valxqMdMbQJcizEC7xEOTzyWmgSaKdo5Ld/XhRb7w/ E0BBCixc1S8/P4gT9cv7FZoNqKPyHvQVh/UkxkOV2ReU9XCH7IBO9h+IIz8ZelEIJ70L 2W9WgAlO7BwWF/EhkC4td2H7cw230CNs43DbzQ34hQge3rcCXC/5LvrS/Sy2CEBnAOHI wTRYW4Ca1ZrAihcSUsnvBi1Mds+4eX0rVx1MYkfObAW4gzU8YVvP44rWBEL4V9ttMkI9 r4FA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:mime-version :references:in-reply-to:message-id:subject:cc:to:from:date :dkim-signature; bh=n4A9vIh9ONPO56AA6uWLwHYKtoPZqfVHqQntSp71fDk=; b=OIv9rq7E62qyEMGjsl+o+eaNgA+/R9YSd2RMItR787KFgWNtWb0GDA90dQESRbdzi3 1aRIXsbcUVehHkb0hSqk0ZMiX+tqnVR7bVMY0SmSSTJNU6QzgJdqWEpeUZm+xFC2DRYw I4FGs5div0NocVWtCGaJLFmG1m7EUWoWXskhDcGfEzcduKe+NTwTyI3R5qC3tMZGAHla VD2g0+rmsANDkP5utQsulkP4cPCd1LDeCiWk9EEmNbqP1xj7Gwe7/tCUSZqNpboN2yar kH/vZsiefAwnglbNceF7ZO2idsARwvMV1ckInY2slT0OHUq2KnaG52ri0szy65qpFTpd Xskg== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linux-foundation.org header.s=korg header.b=YFNKHhel; 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 Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id q15si28043975edc.177.2021.10.06.19.56.39; Wed, 06 Oct 2021 19:57:04 -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=@linux-foundation.org header.s=korg header.b=YFNKHhel; 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 Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S232191AbhJGCzm (ORCPT + 99 others); Wed, 6 Oct 2021 22:55:42 -0400 Received: from mail.kernel.org ([198.145.29.99]:45800 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S239889AbhJGCzh (ORCPT ); Wed, 6 Oct 2021 22:55:37 -0400 Received: by mail.kernel.org (Postfix) with ESMTPSA id 07A2161177; Thu, 7 Oct 2021 02:53:42 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=linux-foundation.org; s=korg; t=1633575224; bh=S1b6BfNXTnYn99oV3r2hF6nTfU3qu7id07vNeo0dX5w=; h=Date:From:To:Cc:Subject:In-Reply-To:References:From; b=YFNKHhelEKjbA4XqN33VsZKu56RyL7QHiTH4RmFZxW9Hdv8ZK3wXQZmVqFnkZgAjG p7PRlhvDnembO12u3F6qCHm5nHTHUiU2yhYd0euxccRhMA5M7eJb7LAE7uamjWu8nj njE18CPPkCyKlhDMFUalDCkL1suG3syPAcsJyGrc= Date: Wed, 6 Oct 2021 19:53:42 -0700 From: Andrew Morton To: Suren Baghdasaryan 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 Subject: Re: [PATCH v10 3/3] mm: add anonymous vma name refcounting Message-Id: <20211006195342.0503b3a3cbcd2c3c3417df46@linux-foundation.org> In-Reply-To: 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> X-Mailer: Sylpheed 3.5.1 (GTK+ 2.24.31; x86_64-pc-linux-gnu) Mime-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: 7bit Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org 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?