From: "Danilo Krummrich" <dakr@kernel.org>
To: <aliceryhl@google.com>
Cc: <acourbot@nvidia.com>, "Brendan Shephard" <bshephar@bne-home.net>,
<miguel.ojeda.sandonis@gmail.com>, <daniel.almeida@collabora.com>,
<rust-for-linux@vger.kernel.org>
Subject: Re: [PATCH v8] rust: Return Option from page_align and ensure no usize overflow
Date: Tue, 23 Dec 2025 21:14:40 +0100 [thread overview]
Message-ID: <DF5VE17B8HTA.1XSONUJ4XOFCY@kernel.org> (raw)
In-Reply-To: <20251223055647.9761-1-bshephar@bne-home.net>
On Tue Dec 23, 2025 at 6:56 AM CET, Brendan Shephard wrote:
> Change `page_align()` to return `Option<usize>` to allow validation
> of the provided `addr` value. This ensures that any value that is
> within one `PAGE_SIZE` of `usize::MAX` will not panic, and instead
> returns `None` to indicate overflow.
>
> Signed-off-by: Brendan Shephard <bshephar@bne-home.net>
> Reviewed-by: Alice Ryhl <aliceryhl@google.com>
> Reviewed-by: Alexandre Courbot <acourbot@nvidia.com>
> Reviewed-by: Daniel Almeida <daniel.almeida@collabora.com>
Alice, unless you have any concerns I'd take this through the drm-rust tree, so
I can pick up the corresponding nova-drm patch as well.
next prev parent reply other threads:[~2025-12-23 20:14 UTC|newest]
Thread overview: 6+ messages / expand[flat|nested] mbox.gz Atom feed top
2025-12-23 5:56 [PATCH v8] rust: Return Option from page_align and ensure no usize overflow Brendan Shephard
2025-12-23 20:14 ` Danilo Krummrich [this message]
2025-12-29 14:11 ` Alice Ryhl
2025-12-29 14:22 ` Miguel Ojeda
2025-12-29 14:46 ` Danilo Krummrich
2025-12-30 8:14 ` Brendan Shephard
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=DF5VE17B8HTA.1XSONUJ4XOFCY@kernel.org \
--to=dakr@kernel.org \
--cc=acourbot@nvidia.com \
--cc=aliceryhl@google.com \
--cc=bshephar@bne-home.net \
--cc=daniel.almeida@collabora.com \
--cc=miguel.ojeda.sandonis@gmail.com \
--cc=rust-for-linux@vger.kernel.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.