On Thu, Oct 15, 2026 at 8:35 PM Deborah Brouwer <[email protected]> wrote: > > Add a method to zero the remaining bytes in a UserSliceWriter. > > If userspace provides a buffer that is larger than necessary, provide > a method to zero out the remaining UserSliceWriter buffer. This avoids > userspace consuming potentially uninitialized memory and/or mistaking it > for data intentionally provided by the kernel. > > Use the #[inline] annotation to make this clear() method available for > inlining outside of the kernel crate. > > Since clear_user() is architecturally defined and may be a macro or inline > function, add a rust helper to make clear_user() callable from rust. > > Signed-off-by: Deborah Brouwer <[email protected]>
Reviewed-by: Alice Ryhl <[email protected]>
