diff options
| author | 2025-12-23 15:56:47 +1000 | |
|---|---|---|
| committer | 2025-12-29 15:32:53 +0100 | |
| commit | f91ffed95c06e94c835cd7deaea666d69948cde9 (patch) | |
| tree | 071dbb153cf2f4baaf5e724afb4b1e780bf59c70 /include/linux/hsi/ssh:/git@git.zx2c4.com | |
| parent | drm: tyr: replace `kernel::c_str!` with C-Strings (diff) | |
rust: Return Option from page_align and ensure no usize overflow
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>
Link: https://patch.msgid.link/20251223055647.9761-1-bshephar@bne-home.net
[ Use kernel vertical style for imports; use markdown in comments.
- Danilo ]
Signed-off-by: Danilo Krummrich <dakr@kernel.org>
Diffstat (limited to 'include/linux/hsi/ssh:/git@git.zx2c4.com')
0 files changed, 0 insertions, 0 deletions
