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 kanga.kvack.org (kanga.kvack.org [205.233.56.17]) by smtp.lore.kernel.org (Postfix) with ESMTP id 38BEBC021B1 for ; Thu, 20 Feb 2025 08:57:50 +0000 (UTC) Received: by kanga.kvack.org (Postfix) id B12072802B2; Thu, 20 Feb 2025 03:57:49 -0500 (EST) Received: by kanga.kvack.org (Postfix, from userid 40) id A9A632802B1; Thu, 20 Feb 2025 03:57:49 -0500 (EST) X-Delivered-To: int-list-linux-mm@kvack.org Received: by kanga.kvack.org (Postfix, from userid 63042) id 877BA2802B2; Thu, 20 Feb 2025 03:57:49 -0500 (EST) X-Delivered-To: linux-mm@kvack.org Received: from relay.hostedemail.com (smtprelay0010.hostedemail.com [216.40.44.10]) by kanga.kvack.org (Postfix) with ESMTP id 656982802B1 for ; Thu, 20 Feb 2025 03:57:49 -0500 (EST) Received: from smtpin26.hostedemail.com (a10.router.float.18 [10.200.18.1]) by unirelay10.hostedemail.com (Postfix) with ESMTP id E13D1C0C23 for ; Thu, 20 Feb 2025 08:57:48 +0000 (UTC) X-FDA: 83139720216.26.781D0A1 Received: from us-smtp-delivery-124.mimecast.com (us-smtp-delivery-124.mimecast.com [170.10.133.124]) by imf08.hostedemail.com (Postfix) with ESMTP id 5A02B160006 for ; Thu, 20 Feb 2025 08:57:46 +0000 (UTC) Authentication-Results: imf08.hostedemail.com; dkim=pass header.d=redhat.com header.s=mimecast20190719 header.b=I54etgjt; spf=pass (imf08.hostedemail.com: domain of david@redhat.com designates 170.10.133.124 as permitted sender) smtp.mailfrom=david@redhat.com; dmarc=pass (policy=none) header.from=redhat.com ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=hostedemail.com; s=arc-20220608; t=1740041866; h=from:from:sender:reply-to:subject:subject:date:date: message-id:message-id:to:to:cc:cc:mime-version:mime-version: content-type:content-type: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references:dkim-signature; bh=UeFkIT0ugeivRGt1yANJd8utrpqqSMtB02Et1S07bPk=; b=YS5PElQAMFdEQZQBTjxjjCQWni8eRwshQMBu74Ir53EMWo0aUVoyxu/yHDDaDqSWv40ZGP DNxy+t2KIpYHcVc9NLKIn2l53e1Zgukmg73uUwB1qLgjEkOll0gcLWPNSJlV+UQP/vXYXP Jt/a9YcR9RBCjMZ0PAJgay8mIRmE7/I= ARC-Seal: i=1; s=arc-20220608; d=hostedemail.com; t=1740041866; a=rsa-sha256; cv=none; b=6y/YSwPhT/fHUd5MXNtzmGcyZZe7E5UFLcmN/BRKWfTsITCAN0arqNnbYMxxD20wenMJmF 91hTnurtvYIB1praHRvH/4Y+9WBNd5t5kOXdIxWVeatyPOWyKMLZ3SMXZ6EBZVCdMvnejj acvIE/BNSi1wK5Q64apbWP3IMDV291A= ARC-Authentication-Results: i=1; imf08.hostedemail.com; dkim=pass header.d=redhat.com header.s=mimecast20190719 header.b=I54etgjt; spf=pass (imf08.hostedemail.com: domain of david@redhat.com designates 170.10.133.124 as permitted sender) smtp.mailfrom=david@redhat.com; dmarc=pass (policy=none) header.from=redhat.com DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1740041865; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references:autocrypt:autocrypt; bh=UeFkIT0ugeivRGt1yANJd8utrpqqSMtB02Et1S07bPk=; b=I54etgjtFLU06U0ecdXRxHAnAU8ReYpXz/Q1K342MBR8FgCK+1kqOm9hOhvIydD3Ojc2wN zUj0eoZw1CIbk0ds/cuqputiPInSwlD5sh7fopnSja+U4inVRfyA+W8Q0AyOC3zAKKXxvW AVXhQDdpDEn+qRipV+HmZSq2k41mwZg= Received: from mail-wm1-f71.google.com (mail-wm1-f71.google.com [209.85.128.71]) by relay.mimecast.com with ESMTP with STARTTLS (version=TLSv1.3, cipher=TLS_AES_256_GCM_SHA384) id us-mta-638-jhMPhZVmOvOIPct5U6LjKQ-1; Thu, 20 Feb 2025 03:57:42 -0500 X-MC-Unique: jhMPhZVmOvOIPct5U6LjKQ-1 X-Mimecast-MFC-AGG-ID: jhMPhZVmOvOIPct5U6LjKQ_1740041861 Received: by mail-wm1-f71.google.com with SMTP id 5b1f17b1804b1-4399d2a1331so3372035e9.1 for ; Thu, 20 Feb 2025 00:57:42 -0800 (PST) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1740041861; x=1740646661; h=content-transfer-encoding:in-reply-to:organization:autocrypt :content-language:from:references:cc:to:subject:user-agent :mime-version:date:message-id:x-gm-message-state:from:to:cc:subject :date:message-id:reply-to; bh=UeFkIT0ugeivRGt1yANJd8utrpqqSMtB02Et1S07bPk=; b=jLFcbQ+0UxiN06ydpfOV78DWz4zX15Zc+JcIdlqZAO9J7Misj/3Kk7hK1vQy1WqmBr L6N2N63V9fGtRj/dKWKDQF9Ow+o18xKXRg+6SUcQ8CTzLXsmsQH/Au185EJRX3xl3ZH2 ADAmmxTMnm45W9QqalHrhnCRP8UTZ8cQzostQyFA2XWzlprBgEryszmhxXnjRfOqmVFA 3qt4LAAFTB50+aCU2vXht2YHtKPhWDUG911cEnZ2TzgrDOsHFC7+K0KqqWdkpOsmvzjv 3/aJCI0SYdOyTxwbTfbsRvh0roarrfUniQCyU3rYs0da9aw+ygYigZFcfXaKATtPywKm vSaQ== X-Forwarded-Encrypted: i=1; AJvYcCVU9z3SpsLugH9UeABW+nldII6y3q8EhCpuLGIkfYQDMCbwjSP7jaGee+oYNiMvxP0215OlP7NuIg==@kvack.org X-Gm-Message-State: AOJu0Yx8NB8g97SlxzFYsSZiSodFQp1RUruPNqy5puFuz4WDqw4bPKUD P9uXwPDCIEbZ6ZtVbWQZ9y1fwj+ymrtxP3hqe7kdcWlIJqizcVZ1ncymdVfvcqSXrTM0Rm91BZz eWbJQoueXD4iGYaKDA7IeXGgNiRGGxhz5RxlMJze3NfPZ4Nwo X-Gm-Gg: ASbGncvL6H7DX0j7hvmljol8aiq8D5w+kEhWK1fz5rFIOZK17/6vJ8x61nIBzLan2pe iP3btNRfg972gCXyDmqWdJ34V6VP3fGiCkYoiyMSQnaM8zLig9i22xRxOnMIQ0tYnn6chfLKXie om1xCCOj2/DJavAkxuN5CkTMOhKS4Qz1zLe+gR3noHItV56qWg1AP+mErqisew4sv2D1K10bPrR Yst298mMKWTakPWo6mG47WMdCvjhbwRDIVEYUem0JkJI3d8JQ0wlXJr0Dbx2I/TikWwlNxT/QDp Uyfg5W9Z48wZ0AW6+u8Ktlsu33kxm26VN3WRWfKnaVRioYeN32FgWYEAPkZPhrjB4V23db3Y96g 3JBKSiTQzMXfvEq8AlbPItZXEq74y3g== X-Received: by 2002:a05:600c:54ea:b0:439:871d:d4c0 with SMTP id 5b1f17b1804b1-439a2eb09f6mr19814285e9.3.1740041860987; Thu, 20 Feb 2025 00:57:40 -0800 (PST) X-Google-Smtp-Source: AGHT+IGRGm4RWVPkCp5Jxz8CVe7/k4BWSnF2CtMcw4wGGvQ2czSaK/WB8yggsUUR4m5qv+MlkFvLDA== X-Received: by 2002:a05:600c:54ea:b0:439:871d:d4c0 with SMTP id 5b1f17b1804b1-439a2eb09f6mr19813995e9.3.1740041860532; Thu, 20 Feb 2025 00:57:40 -0800 (PST) Received: from ?IPV6:2003:cb:c706:2000:e44c:bc46:d8d3:be5? (p200300cbc7062000e44cbc46d8d30be5.dip0.t-ipconnect.de. [2003:cb:c706:2000:e44c:bc46:d8d3:be5]) by smtp.gmail.com with ESMTPSA id 5b1f17b1804b1-4395a04f8a2sm234398405e9.2.2025.02.20.00.57.37 (version=TLS1_3 cipher=TLS_AES_128_GCM_SHA256 bits=128/128); Thu, 20 Feb 2025 00:57:39 -0800 (PST) Message-ID: <4aa97b5c-3ddc-442b-8ec9-cc43ebe9e599@redhat.com> Date: Thu, 20 Feb 2025 09:57:37 +0100 MIME-Version: 1.0 User-Agent: Mozilla Thunderbird Subject: Re: [PATCH 0/4] mm: permit guard regions for file-backed/shmem mappings To: Lorenzo Stoakes , Kalesh Singh Cc: Andrew Morton , Suren Baghdasaryan , "Liam R . Howlett" , Matthew Wilcox , Vlastimil Babka , "Paul E . McKenney" , Jann Horn , linux-mm@kvack.org, linux-kernel@vger.kernel.org, Shuah Khan , linux-kselftest@vger.kernel.org, linux-api@vger.kernel.org, John Hubbard , Juan Yescas References: <45297010-a0a4-4a42-84e8-6f4764eab3b3@lucifer.local> <41af4ffb-0383-4d00-9639-0bf16e1f5f37@redhat.com> <6e356431-5ac9-4363-b876-78a69ae7622a@lucifer.local> From: David Hildenbrand Autocrypt: addr=david@redhat.com; keydata= xsFNBFXLn5EBEAC+zYvAFJxCBY9Tr1xZgcESmxVNI/0ffzE/ZQOiHJl6mGkmA1R7/uUpiCjJ dBrn+lhhOYjjNefFQou6478faXE6o2AhmebqT4KiQoUQFV4R7y1KMEKoSyy8hQaK1umALTdL QZLQMzNE74ap+GDK0wnacPQFpcG1AE9RMq3aeErY5tujekBS32jfC/7AnH7I0v1v1TbbK3Gp XNeiN4QroO+5qaSr0ID2sz5jtBLRb15RMre27E1ImpaIv2Jw8NJgW0k/D1RyKCwaTsgRdwuK Kx/Y91XuSBdz0uOyU/S8kM1+ag0wvsGlpBVxRR/xw/E8M7TEwuCZQArqqTCmkG6HGcXFT0V9 PXFNNgV5jXMQRwU0O/ztJIQqsE5LsUomE//bLwzj9IVsaQpKDqW6TAPjcdBDPLHvriq7kGjt WhVhdl0qEYB8lkBEU7V2Yb+SYhmhpDrti9Fq1EsmhiHSkxJcGREoMK/63r9WLZYI3+4W2rAc UucZa4OT27U5ZISjNg3Ev0rxU5UH2/pT4wJCfxwocmqaRr6UYmrtZmND89X0KigoFD/XSeVv jwBRNjPAubK9/k5NoRrYqztM9W6sJqrH8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ptu6 3oxc2RCyGzTlxyMwuc2U5Q7KtUNTdDe8T0uE+9b8BLMVQDDfJjqY0VVqSUwImzTDLX9S4g/8 kC4HRcclk8hpyhY2jKGluZO0awwTIMgVEzmTyBphDg/Gx7dZU1Xf8HFuE+UZ5UDHDTnwgv7E th6RC9+WrhDNspZ9fJjKWRbveQgUFCpe1sa77LAw+XFrKmBHXp9ZVIe90RMe2tRL06BGiRZr jPrnvUsUUsjRoRNJjKKA/REq+sAnhkNPPZ/NNMjaZ5b8Tovi8C0tmxiCHaQYqj7G2rgnT0kt WNyWQQ== Organization: Red Hat In-Reply-To: <6e356431-5ac9-4363-b876-78a69ae7622a@lucifer.local> X-Mimecast-Spam-Score: 0 X-Mimecast-MFC-PROC-ID: K2k7a9vwdN9A6dd703VhOg2TjqlfkWD7fbfaiD7SKmw_1740041861 X-Mimecast-Originator: redhat.com Content-Language: en-US Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 7bit X-Rspam-User: X-Rspamd-Queue-Id: 5A02B160006 X-Rspamd-Server: rspam07 X-Stat-Signature: rmdwp4mhu83sus6e1rew48ard1ec769m X-HE-Tag: 1740041866-715189 X-HE-Meta: U2FsdGVkX1/q4CYp58/EMKMuQL9ai5NVM/bXVCiZq1zhM9BQ0JeZs8sU+dClUt5EITzGrJqcmDFjYMPXlX/wlqK9Hf8gtHK+HneUcqMWM26ONzA/OkqQwEWk7w51m+yIGJ3tx48IFPxXPXEgZB3DRHn23e4CWsFyCeCKaB/MH2E8WPTKXiXwDuEaVvxeoEXBR2lvBpz5RdraHj2qKb1Ff0KqeqR7kQZ0WFz1nyMqDAwxYiVslSlrMWID+t3OTnu5mLmCuUYfQ36j5WDhf8pLkhRaXZ/07FBM7XkGCQ9dS3lQqs2X9pABDoOK9wIGiUS3AxLYOOB3ocO1/HrwGwat+BFzc9+uIb333TV+TsVVhbPU53zC3h1M5VO1zxAmKzASjGGkuAW2n+zYlT5JUrFvdJYKWBjxoJJayUxABJ9J3AYMaRGvIF6w2R4SDT1YoLsJwUai8/tbt3vp+ThC6wrByr6KJyH9AO3sPvCyohMQ8XF/dGy3FEgvHB9MiUfYsNc7aQ72EgkTrBTJtz1sPPJRCwb9KGdc6bmtFrSIsRD5wUyKpLS8VxyH5GMe49XqffmByl21KHiAnPSGz3C8I/3+ImEk9NQfzaf/hhMJpazZgJ9ZVGK3IetZV5p8AXq3erzoxQ84A0KcSrRmIINPXJRgIgaUo+OGp6CUdi3opKhpigL3pf+JTl5uJgh4+SFSuqOpvn3HUYRTvBw7FIvRQjy1BoVhCAph58i9OIUUrajh5n+dmPm9F9C2BuvbjNpl+jO25yKZRqT5lMTA+vDNwCkd+xFXE/YY/xWniJPgpP4lw2j3E3fGW9S4yrkUYhQo4uh3PPgMuerLIHzNPknRHYOXoT5y8yVx0iOnO2FExHbFdHI9vKBL9+NEXmZ8/gqgYef/PMNXhajHSFSoMy9gIPgeXzvDuZz/TiIK3GpteCEJEbr2CvtpI4whWQIyVF/si3pJYYqFnplgRYFPsEcFDdc N5iwgVuk RFTrlGNAboQD7J8teHxdo4kSTOFkYo4VO3NGfNXKuFL1GurTxAT0jhVeiD4ly3rKXeOEtPJfoW3bGRJRHFx68pXMRfcvjz5dQXFI4vDPrOEispmb3oaWzOIylcCc6ASOGnkL7teGFYEswDA73E5s4jXm+/At4PSseITgJ5i5w8eKTG1ZmFM7sRVDlOvidb5BtpTPYOxCHNpKXjV40Ud9lvQH3Y2fPCJ6PJTwB+mmKhAAT2ek81vpjAobaVf2DJ0cdrnMDLjVZMpAffAjCjFITBWL6RmY0FYx65PVZzaUukpREUmWmItk/Q3JNLCrI/bBxkvWObsfnxuBNh2iyoOTPKt4fkqR2Zytm29NtCyd9PI5iJ0oU28PgSnyxhut7mzirG2zWv1tkCdFcUFM= X-Bogosity: Ham, tests=bogofilter, spamicity=0.000000, version=1.2.4 Sender: owner-linux-mm@kvack.org Precedence: bulk X-Loop: owner-majordomo@kvack.org List-ID: List-Subscribe: List-Unsubscribe: On 20.02.25 09:51, Lorenzo Stoakes wrote: > On Wed, Feb 19, 2025 at 12:56:31PM -0800, Kalesh Singh wrote: >>> We also can't change smaps in the way you want, it _has_ to still give >>> output per VMA information. >> >> Sorry I wasn't suggesting to change the entries in smaps, rather >> agreeing to your marker suggestion. Maybe a set of ranges for each >> smaps entry that has guards? It doesn't solve the use case, but does >> make these regions visible to userspace. > > No, you are not providing a usecase for this. /proc/$pid/pagemaps does not > contaminate the smaps output, mess with efforts to make it RCU readable, > require updating the ioctl interface, etc. so it is clearly the better > choice. > >> >>> >>> The proposed change that would be there would be a flag or something >>> indicating that the VMA has guard regions _SOMEWHERE_ in it. >>> >>> Since this doesn't solve your problem, adds complexity, and nobody else >>> seems to need it, I would suggest this is not worthwhile and I'd rather not >>> do this. >>> >>> Therefore for your needs there are literally only two choices here: >>> >>> 1. Add a bit to /proc/$pid/pagemap OR >>> 2. a new interface. >>> >>> I am not in favour of a new interface here, if we can just extend pagemap. >>> >>> What you'd have to do is: >>> >>> 1. Find virtual ranges via /proc/$pid/maps >>> 2. iterate through /proc/$pid/pagemaps to retrieve state for all ranges. >>> >> >> Could we also consider an smaps field like: >> >> VmGuards: [AAA, BBB), [CCC, DDD), ... >> >> or something of that sort? > > No, absolutely, categorically not. You realise these could be thousands of > characters long right? > > /proc/$pid/pagemaps resolves this without contaminating this output. > >>> Well I'm glad that you guys find it useful for _something_ ;) >>> >>> Again this wasn't written only for you (it is broadly a good feature for >>> upstream), but I did have your use case in mind, so I'm a little >>> disappointed that it doesn't help, as I like to solve problems. >>> >>> But I'm glad it solves at least some for you... >> >> I recall Liam had a proposal to store the guard ranges in the maple tree? >> >> I wonder if that can be used in combination with this approach to have >> a better representation of this? > > This was an alternative proposal made prior to the feature being > implemented (and you and others at Google were welcome to comment and many > were cc'd, etc.). > > There is no 'in combination with'. This feature would take weeks/months to > implement, fundamentally impact the maple tree VMA implementation > and... not actually achieve anything + immediately be redundant. > > Plus it'd likely be slower, have locking implications, would have kernel > memory allocation implications, a lot more complexity and probably other > problems besides (we discussed this at length at the time and a number of > issues came up, I can't recall all of them). > > To be crystal clear - we are empathically NOT changing /proc/$pid/maps to > lie about VMAs regardless of underlying implementation, nor adding > thousands of characters to /proc/$pid/smaps entries. Yes. Calling it a "guard region" might be part of the problem (/"misunderstanding"), because it reminds people of "virtual memory regions". "Guard markers" or similar might have been clearer that these operate on individual PTEs, require page table scanning etc ... which makes them a lot more scalable and fine-grained and provides all these benfits, with the downside being that we don't end up with that many "virtual memory regions" that maps/smaps operate on. [...] > > As I said to you earlier, the _best_ we could do in smaps would be to add a > flag like 'Grd' or something to indicate some part of the VMA is > guarded. But I won't do that unless somebody has an -actual use case- for > it. Right, and that would limit where you have to manually scan. Something similar is being done with uffd-wp markers IIRC. -- Cheers, David / dhildenb