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 3C4F2C19F32 for ; Fri, 7 Mar 2025 17:43:44 +0000 (UTC) Received: by kanga.kvack.org (Postfix) id C5F02280004; Fri, 7 Mar 2025 12:43:42 -0500 (EST) Received: by kanga.kvack.org (Postfix, from userid 40) id C0E74280001; Fri, 7 Mar 2025 12:43:42 -0500 (EST) X-Delivered-To: int-list-linux-mm@kvack.org Received: by kanga.kvack.org (Postfix, from userid 63042) id AAF58280004; Fri, 7 Mar 2025 12:43:42 -0500 (EST) X-Delivered-To: linux-mm@kvack.org Received: from relay.hostedemail.com (smtprelay0013.hostedemail.com [216.40.44.13]) by kanga.kvack.org (Postfix) with ESMTP id 8C0BB280001 for ; Fri, 7 Mar 2025 12:43:42 -0500 (EST) Received: from smtpin05.hostedemail.com (a10.router.float.18 [10.200.18.1]) by unirelay04.hostedemail.com (Postfix) with ESMTP id 202B11A0E79 for ; Fri, 7 Mar 2025 17:43:43 +0000 (UTC) X-FDA: 83195477526.05.24B7862 Received: from us-smtp-delivery-124.mimecast.com (us-smtp-delivery-124.mimecast.com [170.10.129.124]) by imf09.hostedemail.com (Postfix) with ESMTP id 93E0614000B for ; Fri, 7 Mar 2025 17:43:40 +0000 (UTC) Authentication-Results: imf09.hostedemail.com; dkim=pass header.d=redhat.com header.s=mimecast20190719 header.b=PuuuFKmj; spf=pass (imf09.hostedemail.com: domain of david@redhat.com designates 170.10.129.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=1741369420; 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=ssD53hVxTYei45HA/qWDyDYoSrpwLT2aETtzN0PpbiY=; b=gHLYm1k3g6LKrriBr+4H+cKJD85+lDzzLZQo/hztdazmzbhX5dhwAdL/cq/BaETkbwxKbl V6g+N0kaEBd44AVceOySje3CvbDG2kGi48FBn58nMOYLRPhgTo+Vuq4H0NQxZYO5k5Rkp0 SFglH2KV/yDrQsl2lbU8jvdprJY2qqU= ARC-Authentication-Results: i=1; imf09.hostedemail.com; dkim=pass header.d=redhat.com header.s=mimecast20190719 header.b=PuuuFKmj; spf=pass (imf09.hostedemail.com: domain of david@redhat.com designates 170.10.129.124 as permitted sender) smtp.mailfrom=david@redhat.com; dmarc=pass (policy=none) header.from=redhat.com ARC-Seal: i=1; s=arc-20220608; d=hostedemail.com; t=1741369420; a=rsa-sha256; cv=none; b=NLKAKX3KpJVE9NGjCnRD6ZEnE6che5J6N2FK08Uu2l1QaloPtq1VmuNqHdg1arF9U9EJbS F5SDo+TLko1RVlMweqUNSlSeHDX8zBb8ayfcwIW8eXnAATnGGy5MwCeTMYdpHwCGNc57Gj NR9E1Y4ZWpnlFeRMardybPwfuENXkt4= DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1741369419; 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=ssD53hVxTYei45HA/qWDyDYoSrpwLT2aETtzN0PpbiY=; b=PuuuFKmjy1ciPZXuwrxun6O5XH4jmveLvEkAce8WeN2KSFU969ebWfpyNIwk+uV2mSu/Gn 3QETUSK//HwSLWLWmT4mMLZ7zbV0ch0ervqAw2v4hVmSEQjRqY965/Nvobh1UT+ahdfkmB j8BRKI4vuVM7JQVB9FUhsV+I6VGpWcY= Received: from mail-wr1-f71.google.com (mail-wr1-f71.google.com [209.85.221.71]) by relay.mimecast.com with ESMTP with STARTTLS (version=TLSv1.3, cipher=TLS_AES_256_GCM_SHA384) id us-mta-509-pxleMatqPbSnz9ZLtkG9NA-1; Fri, 07 Mar 2025 12:43:38 -0500 X-MC-Unique: pxleMatqPbSnz9ZLtkG9NA-1 X-Mimecast-MFC-AGG-ID: pxleMatqPbSnz9ZLtkG9NA_1741369418 Received: by mail-wr1-f71.google.com with SMTP id ffacd0b85a97d-39131f2bbe5so580627f8f.3 for ; Fri, 07 Mar 2025 09:43:38 -0800 (PST) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1741369417; x=1741974217; 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=ssD53hVxTYei45HA/qWDyDYoSrpwLT2aETtzN0PpbiY=; b=doDOfouSKlS4PudcRgijxeJ0lVVk4q/mon3dpx0V5Vpd3yS8NCnYI5nPLDpCEsalXh MU+Qpyaxae3Z+zwic89jA0tIStq23tlC2YyZykDD5XNLgDLIdukFlZsFhH9AMQLUYXEt 8MBaHyesNL8ebvJi8mPc5aZKnqYZddZL3UNN9aFu4OZc4BxdV3JNcdgQOIiBwPWi/7Sl QHElk2Kq9rkxOsUTgwJh/YCTFtn8Ewz9W+UdwmYxXPWmVNDKIBkMiYPwSaySLjuFUZfc tUR/ZAAX/Ihw8cQ5acoMTPM812l0N3ECBuuz4oJc9gKqZNf4e0YsnzlhGBh9G5l6INWt s+Og== X-Forwarded-Encrypted: i=1; AJvYcCV97PQfEFXWNrMAyg211Qw6ESYhLi7nSwH5PjUtG3m78iVEbj+bYrxogMqj6HOOaFD5VDLR/puVfg==@kvack.org X-Gm-Message-State: AOJu0YxduHCKRDEDsNjftNF9bKFgGKmHPQjydX7iKpgBpKr4Cr06eJhq K9Dx6uwER0DmGkVJ98M24sTYAXBchQSl+NMhstsJmG4T/WL4nHBF7ld7OjbG+xeBVkEF9dFpfgb vnNaieFdDUt7Vf05Rt+zGQhGNp3UnXtgr/FhN7cHK1ZacbeHE X-Gm-Gg: ASbGncsycfWhSoehjNwNpOEI/efGKpgplW5oFyV3YgzTxv/ScT8gYs/jR2vn1yalgSV 8+bz/3grLZJDHNpfk58oNzRr9KsYegDXy7mVsMGQCr7HgIBvLSdrJTMhg0YCz7ZF4Kwp4G+RcVv HrFqXz/Gs28S+oULco/P2ygP7c9bz0IMh7raru5qKS2TjnUSzdwAwLyGekWBJVlnUmooMf5LMn7 FhXQbI58RpLO7JzlQIGGvN4hX9jFEzT925HqsQaXbj249pncLaoLa3pSlud/PWunsO+fqplpwtv OMUptkJQtf4HEbWMooevEgu6n7b/IGa46rpPBq3ydBKjb6rItfzKvBnMWDlRxrLrCSBhv0VMYbo PYeU21p/moZwzgf0Wuh41ZEpFbOgRc5JZeZuE+g== X-Received: by 2002:a05:6000:18a3:b0:391:2e19:9ab with SMTP id ffacd0b85a97d-39132da8e5dmr2428198f8f.47.1741369417616; Fri, 07 Mar 2025 09:43:37 -0800 (PST) X-Google-Smtp-Source: AGHT+IGltnvAubGl1bA54vpc9cRsNvD8yx49qAt0cTcAw9YyB1BLXfs2F8swCZL5LZ0PFPmKZTZsHg== X-Received: by 2002:a05:6000:18a3:b0:391:2e19:9ab with SMTP id ffacd0b85a97d-39132da8e5dmr2428184f8f.47.1741369417165; Fri, 07 Mar 2025 09:43:37 -0800 (PST) Received: from ?IPV6:2003:cb:c721:7400:ab0b:9ceb:d2:6a17? (p200300cbc7217400ab0b9ceb00d26a17.dip0.t-ipconnect.de. [2003:cb:c721:7400:ab0b:9ceb:d2:6a17]) by smtp.gmail.com with ESMTPSA id ffacd0b85a97d-3912bfdfddcsm6079481f8f.35.2025.03.07.09.43.35 (version=TLS1_3 cipher=TLS_AES_128_GCM_SHA256 bits=128/128); Fri, 07 Mar 2025 09:43:35 -0800 (PST) Message-ID: Date: Fri, 7 Mar 2025 18:43:35 +0100 MIME-Version: 1.0 User-Agent: Mozilla Thunderbird Subject: Re: [PATCH v1] mm/madvise: Always set ptes via arch helpers To: Lorenzo Stoakes , Ryan Roberts Cc: Andrew Morton , linux-mm@kvack.org, linux-kernel@vger.kernel.org, stable@vger.kernel.org, Oscar Salvador References: <20250307123307.262298-1-ryan.roberts@arm.com> <03997253-0717-4ecb-8ac8-4a7ba49481a3@arm.com> <3653c47f-f21a-493e-bcc4-956b99b6c501@lucifer.local> <2308a4d0-273e-4cf8-9c9f-3008c42b6d18@arm.com> 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+UWZ1Idd/DdmogJh0gNC0+N42Za9yBRURfIdKSb B3JfpUqcWwE7vUaYrHG1nw54pLUoPG6sAA7Mehl3nd4pZUALHwARAQABzSREYXZpZCBIaWxk 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VEzmTyBphDg/Gx7dZU1Xf8HFuE+UZ5UDHDTnwgv7E th6RC9+WrhDNspZ9fJjKWRbveQgUFCpe1sa77LAw+XFrKmBHXp9ZVIe90RMe2tRL06BGiRZr jPrnvUsUUsjRoRNJjKKA/REq+sAnhkNPPZ/NNMjaZ5b8Tovi8C0tmxiCHaQYqj7G2rgnT0kt WNyWQQ== Organization: Red Hat In-Reply-To: X-Mimecast-Spam-Score: 0 X-Mimecast-MFC-PROC-ID: 9sLNxhy4g7JFLNoVNBr1FZqrZMHcSB9cHyj9Uaa2M2k_1741369418 X-Mimecast-Originator: redhat.com Content-Language: en-US Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 7bit X-Stat-Signature: pk968ymowgbkjna5sc9p9z5yy6xzrri8 X-Rspamd-Queue-Id: 93E0614000B X-Rspamd-Server: rspam06 X-Rspam-User: X-HE-Tag: 1741369420-244986 X-HE-Meta: U2FsdGVkX1+qndEnfhQMtAX3nKSKEYf/YsJxT19l0hjUJvR5Phe3nfhhn45zri+btOByfCTsPQn0atWgiQK3AmesM78kNJrHDp+682l4TeVCRl1GoGODW4NXLmcGizUui0HDaeLWoUjvTpOTaHnxsADj3JNzqKxHr0zRj2GHX5ZWY4jIgsahqrLChGyYLgIG+jXsOxBN1M+0FgDb/78qPhkTq47T+7egQvXFra0nM2RmpchRLTLxt2+WkTRyZNGNyKrV3zXH/4aJkbSNmXfK0EJ1JyZjAjcar0NAqfsN6GSbpSLZ6LenVCAxMQOQzoyB5o9DHsEfeEK8rHuwRFLyM9sNwLAnjh+UGCHag+4CcrQklDbKcUtP8eeriyUYJ120wyahOx3wYKh37dFUwj9aiupPExMQn+KXbxFK6ChYoLMxp9J9P8GguJUIJuR4ZAXWiEm3Bxez3vLz72KHFLyBsDT8Y5+Db7JzrsvOCcZfwQbMSAUWavlHZClcEnjzZJgizR5PvEXxdjuQoRCACk75rKT2TQcPOeRLiv6Kl94pbIEjfxLI8oqyoBerR46PP/E8BtxmpsiPEnwbU4xC4mb2lIXjXQsRGDiXip5f6Be7mPCMAlS/THsCqHcgGOUR6HRSspy5gGZKb7qMOLwITzDZYtkXMSwy57VUw2uVIeRigZ/ljOslkeHrMr04Z47ZCDSLpujvj4HmMXVNOvbT0jz3Hc9+MlPf6Wu2cX4PbA2TG7thciNbdTkz52gO0ZppSp93/4w6iyCvfqyy3dTuWG8SJwjnNzO5cvjuzplfcp0DalSjNIlMW3XLvHOwPRF2NhYXystVWYSdd6Z27osXSViWNEd4TU2AhG9ZYPN3qQSpJrXZenDcvodfiQMXqtmNO1qJr83vY1cId19yvaVcByJmjt3hYAmBCfVTP9blR3g4eK7xzLf0ENYgFBcZwWINatALEEGytz0wm7W4rSwur8M HZGlC3i+ AYsyeeLq8kJFILOhOu5LKrLjFlkMZTO2dQKh2pSHso7/TccSyoDYoB5amtUoMsxGcMcEY7ORJk16NMqto0Ezmksu4TssCQCWWNe9e+DClZeeSUwxx19ebOt0coTG1o+yrdAujsNEHLX/uBxDvZVrl0Dy319HC1aGMWmexc+hwNtcDrB5lvzKVkhHSISw/mxkEjNEqRTrhlzia/B3JzFYD93pSIrtv7fZEwC3Rc3L5eLZ76sCB8I3GhYAQCM/fzBLw9f82c3+dZVpjwpHHZ24YCzBIq9y12G19zutoXtmFW+VrUa3JZby7J0xoJVWypf9fQ6ypip5V4F1zV1Y3TTT3gTdnKLHQw9GuD2Fta6mho833dOqoMnEDKLr0/uotl1kWXXFajdEKFsKtMtE= X-Bogosity: Ham, tests=bogofilter, spamicity=0.000871, version=1.2.4 Sender: owner-linux-mm@kvack.org Precedence: bulk X-Loop: owner-majordomo@kvack.org List-ID: List-Subscribe: List-Unsubscribe: >> It's certainly not read-only in general. Just having a quick look to verify, the >> very first callback I landed on was clear_refs_pte_range(), which implements >> .pmd_entry to clear the softdirty and access flags from a leaf pmd or from all >> the child ptes. > > Yup sorry I misspoke, working some long hours atm so forgive me :) what I meant > to say is that we either read or modify existing. > > And yes users do do potentially crazy things and yada yada. > > David and I have spoken quite a few times about implementing generic page > table code that could help abstract a lot of things, and it feels like this > logic could all be rejigged in some fashion as to prevent the kind of > 'everybody does their own handler' logic.q Oscar is currently prototyping a new pt walker that will batch entries (e.g., folio ranges, pte none ares), and not use indirect calls. The primary focus will will read-traversal, but nothing speaks against modifications (likely helpers for installing pte_none()->marker could be handy, and just creating page tables if we hit pmd_none() etc.). Not sure yet how many use cases we can cover with the initial approach. But the idea is to start with something that works for many cases, to then gradually improve it. > > I guess I felt it was more _dangerous_ as you are establishing _new_ > mappings here, with the page tables being constructed for you up to the PTE > level. > > And wanted to 'lock things down' somewhat. > > But indeed, all this cries out for a need for a more generalised, robust > interface that handles some of what the downstream users of this are doing. > >> >>> >>> When setting things are a little different, I'd rather not open up things to a >>> user being able to do *whatever*, but rather limit to the smallest scope >>> possible for installing the PTE. >> >> Understandable, but personally I think it will lead to potential misunderstandings: >> >> - it will get copy/pasted as an example of how to set a pte (which is wrong; >> you have to use set_pte_at()/set_ptes()). There is currently only a single other >> case of direct dereferencing a pte to set it (in write_protect_page()). > > Yeah, at least renaming the param could help, as 'ptep' implies you really > do have a pointer to the page table entry. > > If we didn't return an error we could just return the PTE value or > something... hm. > >> >> - new users of .install_pte may assume (like I did) that the passed in ptep is >> pointing to the pgtable and they will manipulate it with arch helpers. arm64 >> arch helpers all assume they are only ever passed pointers into pgtable memory. >> It will end horribly if that is not the case. > > It will end very horribly indeed :P or perhaps with more of a fizzle than > anticipated... Yes, I'm hoping we can avoid new users with the old api ... :) > >> >>> >>> And also of course, it allows us to _mandate_ that set_pte_at() is used so we do >>> the right thing re: arches :) >>> >>> I could have named the parameter better though, in guard_install_pte_entry() >>> would be better to have called it 'new_pte' or something. >> >> I'd suggest at least describing this in the documentation in pagewalk.h. Or >> better yet, you could make the pte the return value for the function. Then it is >> clear because you have no pointer. You'd lose the error code but the only user >> of this currently can't fail anyway. > > Haha and here you make the same point I did above... great minds :) > > I mean yeah returning a pte would make it clearer what you're doing, but > then it makes it different from every other callback... but this already is > different :) > > I do very much want the ability to return an error value to stop the walk > (if you return >0 you can indicate to caller that a non-error stop occurred > for instance, something I use on the reading side). > > But we do need to improve this one way or another, at the very least the > documentation/comments. > > David - any thoughts? Maybe document "don't use this until we have something better" :D > > I'm not necessarily against just making this consitent, but I like this > property of us controlling what happens instead of just giving a pointer > into the page table - the principle of exposing the least possible. > > ANWYAY, I will add to my ever expanding whiteboard TODO list [literally the > only todo that work for me] to look at this, will definitely improve docs > at very least. Maybe we can talk at LSF/MM about this. I assume Oscar might be partially covering that in his hugetlb talk. -- Cheers, David / dhildenb