Skip to content

Conversation

@blktests-ci
Copy link

@blktests-ci blktests-ci bot commented Jan 9, 2026

Pull request for series with
subject: block: initialize auto integrity buffer opaque
version: 1
url: https://patchwork.kernel.org/project/linux-block/list/?series=1039789

The auto-generated integrity buffer for writes needs to be fully
initialized before being passed to the underlying block device,
otherwise the uninitialized memory can be read back by userspace or
anyone with physical access to the storage device. If protection
information is generated, that portion of the integrity buffer will be
initialized. The integrity buffer is also zeroed if PI generation is
disabled via sysfs or the PI tuple size is 0. However, this misses the
case where the PI is generated and the PI tuple size is nonzero, but the
metadata size is larger than the PI tuple. In this case, the remainder
("opaque") of the metadata is left uninitialized.
Generalize the BLK_INTEGRITY_CSUM_NONE check to cover any case when the
metadata is larger than just the PI tuple.
Switch the gfp_t variable to bool zero_buffer since it's only used to
compute the zero_buffer argument to bio_integrity_alloc_buf().

Signed-off-by: Caleb Sander Mateos <csander@purestorage.com>
Fixes: c546d6f ("block: only zero non-PI metadata tuples in bio_integrity_prep")
Reviewed-by: Anuj Gupta <anuj20.g@samsung.com>
@blktests-ci
Copy link
Author

blktests-ci bot commented Jan 9, 2026

Upstream branch: 623fb99
series: https://patchwork.kernel.org/project/linux-block/list/?series=1039789
version: 1

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants