All of lore.kernel.org
 help / color / mirror / Atom feed
From: Alice Ryhl <aliceryhl@google.com>
To: Brendan Shephard <bshephar@bne-home.net>
Cc: miguel.ojeda.sandonis@gmail.com, dakr@kernel.org,
	acourbot@nvidia.com,  daniel.almeida@collabora.com,
	rust-for-linux@vger.kernel.org
Subject: Re: [PATCH v6] rust: Return Option from page_align and ensure no usize overflow
Date: Tue, 2 Dec 2025 09:40:13 +0000	[thread overview]
Message-ID: <aS6z_f7rQ3vRzWmU@google.com> (raw)
In-Reply-To: <aS6y5blasMX0KcD7@fedora>

On Tue, Dec 02, 2025 at 07:35:33PM +1000, 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>

  reply	other threads:[~2025-12-02  9:40 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2025-12-02  9:35 [PATCH v6] rust: Return Option from page_align and ensure no usize overflow Brendan Shephard
2025-12-02  9:40 ` Alice Ryhl [this message]
2025-12-03 10:39 ` Alexandre Courbot
2025-12-04 11:43   ` 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=aS6z_f7rQ3vRzWmU@google.com \
    --to=aliceryhl@google.com \
    --cc=acourbot@nvidia.com \
    --cc=bshephar@bne-home.net \
    --cc=dakr@kernel.org \
    --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.