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: <7fb081e9-e607-401b-937f-f4e3a78a2874@kernel.org>
Date: Mon, 22 Sep 2025 18:08:11 +0200
From: Danilo Krummrich <dakr@...nel.org>
To: Alistair Popple <apopple@...dia.com>
Cc: rust-for-linux@...r.kernel.org, dri-devel@...ts.freedesktop.org,
 acourbot@...dia.com, 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 <lossin@...nel.org>,
 Andreas Hindborg <a.hindborg@...nel.org>, Alice Ryhl <aliceryhl@...gle.com>,
 Trevor Gross <tmgross@...ch.edu>, David Airlie <airlied@...il.com>,
 Simona Vetter <simona@...ll.ch>,
 Maarten Lankhorst <maarten.lankhorst@...ux.intel.com>,
 Maxime Ripard <mripard@...nel.org>, Thomas Zimmermann <tzimmermann@...e.de>,
 John Hubbard <jhubbard@...dia.com>, Joel Fernandes <joelagnelf@...dia.com>,
 Timur Tabi <ttabi@...dia.com>, linux-kernel@...r.kernel.org,
 nouveau@...ts.freedesktop.org
Subject: Re: [PATCH v2 01/10] gpu: nova-core: Set correct DMA mask

On 9/22/25 1:30 PM, Alistair Popple wrote:
> +        // SAFETY: No DMA allocations have been made yet

It's not really about DMA allocations that have been made previously, there is
no unsafe behavior in that.

It's about the method must not be called concurrently with any DMA allocation or
mapping primitives.

Can you please adjust the comment correspondingly?

> +        unsafe { pdev.dma_set_mask_and_coherent(DmaMask::new::<47>())? };

As Boqun mentioned, we shouldn't have a magic number for this. I don't know if
it will change for future chips, but maybe we should move this to gpu::Spec to
be safe.

At least, create a constant for it (also in gpu::Spec?); in Nouveau I named this
NOUVEAU_VA_SPACE_BITS back then. Not a great name, if you have a better idea,
please go for it. :)

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ