Re: [PATCH net] s390/ism: Zerorize dmb at allocation
flat view
From: Joe Damato <hidden>
Date: 2026-09-30 00:52:04
Also in:
linux-s390, lkml
On Mon, Sep 28, 2026 at 01:47:41PM +0200, Alexandra Winter wrote:
Sashiko reported [1] that 'Missing __GFP_ZERO in folio_alloc() causes
uninitialized kernel memory to be exposed in the receive message buffer'.
An ism dmb is receive-only, so the data is not leaked to a remote peer. In
general the smc kernel module (dibs client) will only push newly received
data to userspace. We still should not have uninitialized data in a receive
buffer.
Since
commit 750afb08ca71 ("cross-tree: phase out dma_zalloc_coherent()")
dma_alloc_coherent no longer required the __GFP_ZERO flag, but when
commit 83781384a96b ("s390/ism: Properly fix receive message buffer allocation")
switched to folio_alloc(), it should have added back the __GFP_ZERO flag.
Add __GFP_ZERO flag and state in dibs.h that register_dbm() provides
a zerorized buffer (dibs_lo already does).
Link: https://lore.kernel.org/linux-s390/20260903143746.A5CC41F00A3A@smtp.kernel.org/ (local) [1]
Fixes: 83781384a96b ("s390/ism: Properly fix receive message buffer allocation")
Signed-off-by: Alexandra Winter <wintera@linux.ibm.com>
Reviewed-by: Julian Ruess <julianr@linux.ibm.com>
---
drivers/s390/net/ism_drv.c | 3 ++-
include/linux/dibs.h | 6 +++---
2 files changed, 5 insertions(+), 4 deletions(-)Reviewed-by: Joe Damato <redacted>