Re: [PATCH rdma-rc] RDMA/rxe: Zero struct rxe_mmap_info on allocation

From: Leon Romanovsky

Date: Thu Nov 26 2026 - 07:19:10 EST



On Mon, 23 Nov 2026 09:06:20 -0500, Andrew Stellman wrote:
> rxe_create_mmap_info() allocates the structure with kmalloc_obj() and
> does not set info.pad. do_mmap_info() copies ip->info to userspace with
> copy_to_user(), so the 4 pad bytes of struct mminfo come from
> uninitialized kernel heap memory.
>
> On x86_64 v7.4-rc3 under QEMU with init_on_alloc=0, an unprivileged
> user (CapEff 0) issued 300 CQ_CREATE ioctls on rxe0 and read the driver
> response. After the guest had run ls -lR on /proc and /sys and read
> /proc/*/status and /proc/*/stat, 101 of the 300 pads were nonzero. In a
> separate boot with slub_debug=P, all 300 pads were 0x6b6b6b6b. With
> this patch, all 300 pads were zero in both configurations.
>
> [...]

Applied, thanks!

[1/1] RDMA/rxe: Zero struct rxe_mmap_info on allocation
https://git.kernel.org/rdma/rdma/c/5d298f34048ba4

Best regards,
--
Leon Romanovsky <leon@xxxxxxxxxx>