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 2502EC021A0 for ; Sat, 15 Feb 2025 19:47:32 +0000 (UTC) Received: by kanga.kvack.org (Postfix) id 70F5E28000E; Sat, 15 Feb 2025 14:47:32 -0500 (EST) Received: by kanga.kvack.org (Postfix, from userid 40) id 6BD68280007; Sat, 15 Feb 2025 14:47:32 -0500 (EST) X-Delivered-To: int-list-linux-mm@kvack.org Received: by kanga.kvack.org (Postfix, from userid 63042) id 5D37B28000E; Sat, 15 Feb 2025 14:47:32 -0500 (EST) X-Delivered-To: linux-mm@kvack.org Received: from relay.hostedemail.com (smtprelay0015.hostedemail.com [216.40.44.15]) by kanga.kvack.org (Postfix) with ESMTP id 3E4AD280007 for ; Sat, 15 Feb 2025 14:47:32 -0500 (EST) Received: from smtpin13.hostedemail.com (a10.router.float.18 [10.200.18.1]) by unirelay04.hostedemail.com (Postfix) with ESMTP id DE2B91A2300 for ; Sat, 15 Feb 2025 19:47:31 +0000 (UTC) X-FDA: 83123213502.13.751B476 Received: from mail.marcansoft.com (marcansoft.com [212.63.210.85]) by imf21.hostedemail.com (Postfix) with ESMTP id B28BF1C0011 for ; Sat, 15 Feb 2025 19:47:29 +0000 (UTC) Authentication-Results: imf21.hostedemail.com; dkim=pass header.d=asahilina.net header.s=default header.b=VzjQqb3l; dmarc=pass (policy=quarantine) header.from=asahilina.net; spf=pass (imf21.hostedemail.com: domain of lina@asahilina.net designates 212.63.210.85 as permitted sender) smtp.mailfrom=lina@asahilina.net ARC-Seal: i=1; s=arc-20220608; d=hostedemail.com; t=1739648850; a=rsa-sha256; cv=none; b=fxOB93URX6Ao39PtFYQwM8md6mD4upZExtr7rKLrlO6XAZiDv8eq8dRUnBpU0tTbfJTnYN ds5jcswL/4dsdYNlRGJT9aQCIj7vHD5BnMk7HVYew3SStpZM5MPzTCUt3/ceBkXOukhpSy rWR4GPDIwGVpCPI+3qBj9PYEfdVCy8s= ARC-Authentication-Results: i=1; imf21.hostedemail.com; dkim=pass header.d=asahilina.net header.s=default header.b=VzjQqb3l; dmarc=pass (policy=quarantine) header.from=asahilina.net; spf=pass (imf21.hostedemail.com: domain of lina@asahilina.net designates 212.63.210.85 as permitted sender) smtp.mailfrom=lina@asahilina.net ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=hostedemail.com; s=arc-20220608; t=1739648850; 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=be4koI+nNJcZ3gwjjwJVqDhpw4hDPhxqrKXOzXavyXk=; b=z7Q6YvNsbM6kAe9hbVmuHnya1piJVO6WplAPUy+9jBKwsVQFlTMV+Qo1oLqvJs6bn9z9Ic ImypgL3VCFUz54n7oEWB88CkHQSsGUEmz7V38pDfHYZu3Gt5YAMceEQh0ekKS0nq1eR9RO +j0YETmMoLHz83Kc4JhshKhV4B/UQL4= Received: from [127.0.0.1] (localhost [127.0.0.1]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (No client certificate requested) (Authenticated sender: lina@asahilina.net) by mail.marcansoft.com (Postfix) with ESMTPSA id 2413F43462; Sat, 15 Feb 2025 19:47:24 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=asahilina.net; s=default; t=1739648846; bh=DYfp2i2SZiuctQ0MVI7rHStW6AJQXkGlw/Iul/pfxqo=; h=Date:Subject:From:To:Cc:References:In-Reply-To; b=VzjQqb3lWyOI32y3Ub3ByjcWQ7tonopRGCAfxXkvg/tHufVK14a9wT45GXJjmnt4s 7WHg+mZsdhIbnXGi8C68mDxNR2ln5yIiUNK4TKZS/XYu1+vLi17da7m/7f4MaXpS+K iodVJ1WIdfb/9l6IAi4C2tpRDADwEOpwu53Zoqk9rp3etvLGuoCl9PsFDPaTCvWnlM BI4YtlK9iutNXU1D5RYZ376iKoa6XdogtrnfXpfiJXzgnWViDl6o91jK1c1dksKc/G 8jUxzPuIJEmWIo57Q6bEJpMChpKkZKUSRGzrt9BTturSagEDKfubrPqmbVuVMhcgUX as8bLSk56o3fA== Message-ID: Date: Sun, 16 Feb 2025 04:47:22 +0900 MIME-Version: 1.0 User-Agent: Mozilla Thunderbird Subject: Re: [PATCH 0/6] rust: page: Support borrowing `struct page` and physaddr conversion From: Asahi Lina To: Abdiel Janulgue Cc: Miguel Ojeda , Alex Gaynor , Boqun Feng , Gary Guo , =?UTF-8?Q?Bj=C3=B6rn_Roy_Baron?= , Benno Lossin , Andreas Hindborg , Alice Ryhl , Trevor Gross , Jann Horn , Matthew Wilcox , Paolo Bonzini , Wedson Almeida Filho , Valentin Obst , Andrew Morton , linux-mm@kvack.org, airlied@redhat.com, rust-for-linux@vger.kernel.org, linux-kernel@vger.kernel.org, asahi@lists.linux.dev, Danilo Krummrich References: <20250202-rust-page-v1-0-e3170d7fe55e@asahilina.net> Content-Language: en-US In-Reply-To: Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 7bit X-Rspam-User: X-Rspamd-Queue-Id: B28BF1C0011 X-Rspamd-Server: rspam12 X-Stat-Signature: cj5to8ebgip7a89g9fqqg3wx3ki45obm X-HE-Tag: 1739648849-644784 X-HE-Meta: U2FsdGVkX195jLsFJdzGMLm/sSv1s8tQ8xde0vSibWitGs52/j6Zc533GEhsI623EDKdvmVlyREjGRqogSdSxaMMlmna0uNfjw2ANqbuxT8I6icwcdva5F7Ny2JvqoEwGL+acXt+HKZuJLNrmODcxaogXc9Cn79+ZNXX6Z31x5GTCdenYTI6xXMLKkblWdCceKbFKI+Rf2OrIgAD3D62TDIPhfom1gl/ctEJ6TL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fXWsyIxLBEEobpvd/mlHaiyFK5FdOo07SnBDPFfzMKO7/PkL5QM1tOvliannCHjFMFJQy7xsFvVc7jX+F8aK3MgCNVKbJQ== X-Bogosity: Unsure, tests=bogofilter, spamicity=0.500000, 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 2/3/25 11:41 PM, Asahi Lina wrote: > > > On 2/3/25 7:22 PM, Danilo Krummrich wrote: >> Hi Lina, >> >> On Sun, Feb 02, 2025 at 10:05:42PM +0900, Asahi Lina wrote: >>> This series refactors the existing Page wrapper to support borrowing >>> `struct page` objects without ownership on the Rust side, and converting >>> page references to/from physical memory addresses. >> >> Thanks for picking this up! >> >> As you know, this has been previously worked on by Abdiel. Kindly drop a note >> if you intend to pick up something up next time, such that we don't end up doing >> duplicated work. > > Sorry! I wasn't sure if this was going to end up submitted over the > holidays so I wasn't in a rush, but I ended up switching gears in the > past couple of weeks and I really needed this feature now (for crashdump > support to debug a really annoying firmware crash). > > I actually only just noticed that the previous v2 already had > Owned/Ownable... I only saw the v3 which didn't, so I didn't realize > there was already a version of that approach in the past. > > ~~ Lina Given the discussion in the other subthreads, it looks like this is not the best approach for page table management and using it for crash dumps of arbitrary physical memory pages raises some eyebrows, so I'm going to abandon this series. Abdiel, if the first two patches are helpful to your work, please feel free to incorporate them into a v4. Otherwise, just go ahead with whatever works for you! ~~ Lina