Re: [virtio-dev] [PATCH RESEND v2 2/2] virtio-net: use mtu size as buffer length for big packets

2022-08-26 Thread Si-Wei Liu
Sorry for the delay. Didn't notice as this thread was not addressed to my work email. Please copy to my work email if it needs my immediate attention. On 8/25/2022 5:38 AM, Gavin Li wrote: Currently add_recvbuf_big() allocates MAX_SKB_FRAGS segments for big packets even when GUEST_* offloads a

[PATCH] vduse: prevent uninitialized memory accesses

2022-08-26 Thread Maxime Coquelin
If the VDUSE application provides a smaller config space than the driver expects, the driver may use uninitialized memory from the stack. This patch prevents it by initializing the buffer passed by the driver to store the config value. Signed-off-by: Maxime Coquelin --- drivers/vdpa/vdpa_user/v

RE: [virtio-dev] [PATCH RESEND v2 2/2] virtio-net: use mtu size as buffer length for big packets

2022-08-26 Thread Parav Pandit via Virtualization
From: Si-Wei Liu Sent: Friday, August 26, 2022 4:52 AM > Sorry for the delay. Didn't notice as this thread was not addressed to my > work email. Please copy to my work email if it needs my immediate attention. Can you please setup your mail client to post plain text mail as required

Re: [virtio-dev] [PATCH RESEND v2 2/2] virtio-net: use mtu size as buffer length for big packets

2022-08-26 Thread Si-Wei Liu
On 8/26/2022 9:41 AM, Parav Pandit wrote: From: Si-Wei Liu Sent: Friday, August 26, 2022 4:52 AM Sorry for the delay. Didn't notice as this thread was not addressed to my work email. Please copy to my work email if it needs my immediate attention. Can you please setup your mail

RE: [virtio-dev] [PATCH RESEND v2 2/2] virtio-net: use mtu size as buffer length for big packets

2022-08-26 Thread Parav Pandit via Virtualization
> From: Si-Wei Liu > Sent: Friday, August 26, 2022 2:05 PM > > > + /* If we can receive ANY GSO packets, we must allocate large ones. > */ > > + if (mtu > ETH_DATA_LEN || guest_gso) { > > + vi->big_packets = true; > > + /* if the guest offload is offered by the device,

Re: [PATCH] vduse: prevent uninitialized memory accesses

2022-08-26 Thread Dan Carpenter
On Fri, Aug 26, 2022 at 06:16:05PM +0200, Maxime Coquelin wrote: > If the VDUSE application provides a smaller config space > than the driver expects, the driver may use uninitialized > memory from the stack. > > This patch prevents it by initializing the buffer passed by > the driver to store the