Re: [PATCH for 5.10] vdpa_sim: fix param validation in vdpasim_get_config()

2021-02-17 Thread Jason Wang
On 2021/2/12 上午12:25, Stefano Garzarella wrote: Commit 65b709586e222fa6ffd4166ac7fdb5d5dad113ee upstream. Before this patch, if 'offset + len' was equal to sizeof(struct virtio_net_config), the entire buffer wasn't filled, returning incorrect values to the caller. Since 'vdpasim->config' type

Re: [PATCH for 5.10] vdpa_sim: fix param validation in vdpasim_get_config()

2021-02-16 Thread Stefano Garzarella
On Mon, Feb 15, 2021 at 04:23:54PM +0100, Greg KH wrote: On Mon, Feb 15, 2021 at 04:03:21PM +0100, Stefano Garzarella wrote: On Mon, Feb 15, 2021 at 03:32:19PM +0100, Greg KH wrote: > On Thu, Feb 11, 2021 at 05:25:19PM +0100, Stefano Garzarella wrote: > > Commit

Re: [PATCH for 5.10] vdpa_sim: fix param validation in vdpasim_get_config()

2021-02-15 Thread Greg KH
On Mon, Feb 15, 2021 at 04:03:21PM +0100, Stefano Garzarella wrote: > On Mon, Feb 15, 2021 at 03:32:19PM +0100, Greg KH wrote: > > On Thu, Feb 11, 2021 at 05:25:19PM +0100, Stefano Garzarella wrote: > > > Commit 65b709586e222fa6ffd4166ac7fdb5d5dad113ee upstream. > > > > No, this really is not

Re: [PATCH for 5.10] vdpa_sim: fix param validation in vdpasim_get_config()

2021-02-15 Thread Stefano Garzarella
On Mon, Feb 15, 2021 at 03:32:19PM +0100, Greg KH wrote: On Thu, Feb 11, 2021 at 05:25:19PM +0100, Stefano Garzarella wrote: Commit 65b709586e222fa6ffd4166ac7fdb5d5dad113ee upstream. No, this really is not that commit, so please do not say it is. Oops, sorry. Before this patch, if

Re: [PATCH for 5.10] vdpa_sim: fix param validation in vdpasim_get_config()

2021-02-15 Thread Greg KH
On Thu, Feb 11, 2021 at 05:25:19PM +0100, Stefano Garzarella wrote: > Commit 65b709586e222fa6ffd4166ac7fdb5d5dad113ee upstream. No, this really is not that commit, so please do not say it is. > Before this patch, if 'offset + len' was equal to > sizeof(struct virtio_net_config), the entire

[PATCH for 5.10] vdpa_sim: fix param validation in vdpasim_get_config()

2021-02-11 Thread Stefano Garzarella
Commit 65b709586e222fa6ffd4166ac7fdb5d5dad113ee upstream. Before this patch, if 'offset + len' was equal to sizeof(struct virtio_net_config), the entire buffer wasn't filled, returning incorrect values to the caller. Since 'vdpasim->config' type is 'struct virtio_net_config', we can safely copy