lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <27b8921c-5f1e-4cd0-95b3-2f19244b7f3b@redhat.com>
Date: Thu, 6 Feb 2025 19:04:14 +0100
From: David Hildenbrand <david@...hat.com>
To: Matthew Wilcox <willy@...radead.org>, Jason Gunthorpe <jgg@...pe.ca>
Cc: Asahi Lina <lina@...hilina.net>, Miguel Ojeda <ojeda@...nel.org>,
 Alex Gaynor <alex.gaynor@...il.com>, Boqun Feng <boqun.feng@...il.com>,
 Gary Guo <gary@...yguo.net>, Björn Roy Baron
 <bjorn3_gh@...tonmail.com>, Benno Lossin <benno.lossin@...ton.me>,
 Andreas Hindborg <a.hindborg@...nel.org>, Alice Ryhl <aliceryhl@...gle.com>,
 Trevor Gross <tmgross@...ch.edu>, Jann Horn <jannh@...gle.com>,
 Paolo Bonzini <pbonzini@...hat.com>, Danilo Krummrich <dakr@...nel.org>,
 Wedson Almeida Filho <wedsonaf@...il.com>,
 Valentin Obst <kernel@...entinobst.de>,
 Andrew Morton <akpm@...ux-foundation.org>, linux-mm@...ck.org,
 airlied@...hat.com, Abdiel Janulgue <abdiel.janulgue@...il.com>,
 rust-for-linux@...r.kernel.org, linux-kernel@...r.kernel.org,
 asahi@...ts.linux.dev
Subject: Re: [PATCH 0/6] rust: page: Support borrowing `struct page` and
 physaddr conversion

On 06.02.25 00:17, Matthew Wilcox wrote:
> On Tue, Feb 04, 2025 at 04:49:47PM -0400, Jason Gunthorpe wrote:
>> The phys_to_virt() I mean is on the page table pages themselves, not
>> on a leaf.
>>
>> All page table pages came from alloc_pages_node() and you'd do
>> virt_to_phys() to stick them into a next-table PTE, then
>> phys_to_virt() to bring them back:
>>
>>    phys_to_virt(virt_to_phys(page_address(alloc_pages_node())))
>>
>> Effectively.
> 
> except for s390 & ppc where the page table can be smaller than
> PAGE_SIZE, so you really only have a physical address that can be
> converted to a virtual address.

I recall in the context of IOMMU page tables we don't perform this 
packing. So what you say is certainly true for process page tables, but 
likely not for IOMMU etc in the context of this series.

-- 
Cheers,

David / dhildenb


Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ