All of lore.kernel.org
 help / color / mirror / Atom feed
From: Andreas Hindborg <a.hindborg@kernel.org>
To: Priya Bala Govindasamy <pgovind2@uci.edu>, Gary Guo <gary@garyguo.net>
Cc: Breno Leitao <leitao@debian.org>,
	boqun@kernel.org, bjorn3_gh@protonmail.com, lossin@kernel.org,
	aliceryhl@google.com, tmgross@umich.edu, dakr@kernel.org,
	daniel.almeida@collabora.com, tamird@kernel.org,
	acourbot@nvidia.com, work@onurozkan.dev,
	rust-for-linux@vger.kernel.org, ardalan@uci.edu,
	zhiyunq@cs.ucr.edu, dzueck@uci.edu, ojeda@kernel.org
Subject: Re: [PATCH 0/1] rust: configfs: Fix reference creation from uninitialized data in `Attribute::show`
Date: Fri, 09 Oct 2026 22:17:18 +0200	[thread overview]
Message-ID: <87pkxid3xt.fsf@kernel.org> (raw)
In-Reply-To: <CAPPBnEZBeB2cZ7_2Syt_Vy0HcXWrRF6j-M1HmZQwKkwG=1nz-Q@mail.gmail.com>

"Priya Bala Govindasamy" <pgovind2@uci.edu> writes:

> Hi Gary,
>
> `Attribute::show` creates an `&mut [u8; PAGE_SIZE]` over a page that may be only partially initialized. Rust's array
> documentation requires all elements of an array to be initialized [1]. So this doesn't meet the documented requirements.
> Moreover, `AttributeOperations::show` is a safe trait method and could be implemented to read any bytes from that array
> without using `unsafe`. Reading an uninitialized byte would be undefined behavior. 
>
> [1] https://doc.rust-lang.org/reference/types/array.html

This was HTML, so the list will drop it.


Best regards,
Andreas Hindborg




  parent reply	other threads:[~2026-10-09 20:33 UTC|newest]

Thread overview: 8+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
     [not found] <cUqSvTsTaMYu_TRrAABCYTNz0HZf5JeFdIq_Vv4e_-GFMgI5NwVfZJDcy8CTgc4fH_1OoiiMg2I2LIzQX1y3Rg==@protonmail.internalid>
2026-10-08 23:42 ` [PATCH 0/1] rust: configfs: Fix reference creation from uninitialized data in `Attribute::show` Priya Bala Govindasamy
2026-10-08 23:42   ` [PATCH] " Priya Bala Govindasamy
     [not found]   ` <87v77bcg0m.fsf@kernel.org>
2026-10-09 12:49     ` [PATCH 0/1] " Andreas Hindborg
2026-10-09 12:54       ` Gary Guo
     [not found]         ` <f-SD-RJDAM9vxqOj3MupDr-geggiu7qcKsYBwlTK02DS6siKkRU643dmvGb-ihkpH5LKF6zW1DH2KHAmzXjvNg==@protonmail.internalid>
     [not found]           ` <CAPPBnEZBeB2cZ7_2Syt_Vy0HcXWrRF6j-M1HmZQwKkwG=1nz-Q@mail.gmail.com>
2026-10-09 20:17             ` Andreas Hindborg [this message]
2026-10-09 20:32         ` Andreas Hindborg
2026-10-09 22:15           ` Gary Guo
2026-10-09 21:19         ` Priya Bala Govindasamy

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=87pkxid3xt.fsf@kernel.org \
    --to=a.hindborg@kernel.org \
    --cc=acourbot@nvidia.com \
    --cc=aliceryhl@google.com \
    --cc=ardalan@uci.edu \
    --cc=bjorn3_gh@protonmail.com \
    --cc=boqun@kernel.org \
    --cc=dakr@kernel.org \
    --cc=daniel.almeida@collabora.com \
    --cc=dzueck@uci.edu \
    --cc=gary@garyguo.net \
    --cc=leitao@debian.org \
    --cc=lossin@kernel.org \
    --cc=ojeda@kernel.org \
    --cc=pgovind2@uci.edu \
    --cc=rust-for-linux@vger.kernel.org \
    --cc=tamird@kernel.org \
    --cc=tmgross@umich.edu \
    --cc=work@onurozkan.dev \
    --cc=zhiyunq@cs.ucr.edu \
    /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.