On 6/5/2024 10:27 PM, Christoph Hellwig wrote: > Metadata added by bio_integrity_prep is using plain kmalloc, which leads > to random kernel memory being written media. For PI metadata this is > limited to the app tag that isn't used by kernel generated metadata, > but for non-PI metadata the entire buffer leaks kernel memory. > > Fix this by adding the __GFP_ZERO flag to allocations for writes. > > Fixes: 7ba1ba12eeef ("block: Block layer data integrity support") > Signed-off-by: Christoph Hellwig<hch@xxxxxx> Looks good. Reviewed-by: Chaitanya Kulkarni <kch@xxxxxxxxxx> -ck