Re: [PATCH] vdpa/mlx5: fix param validation in mlx5_vdpa_get_config()

2021-02-17 Thread Jason Wang
On 2021/2/10 下午6:08, Stefano Garzarella wrote: On Tue, Feb 09, 2021 at 04:31:23AM -0500, Michael S. Tsirkin wrote: On Tue, Feb 09, 2021 at 11:24:03AM +0800, Jason Wang wrote: On 2021/2/9 上午2:38, Michael S. Tsirkin wrote: > On Mon, Feb 08, 2021 at 05:17:41PM +0100, Stefano Garzarella wrote:

Re: [PATCH] vdpa/mlx5: fix param validation in mlx5_vdpa_get_config()

2021-02-11 Thread Stefano Garzarella
On Wed, Feb 10, 2021 at 07:12:31AM -0500, Michael S. Tsirkin wrote: On Wed, Feb 10, 2021 at 12:17:19PM +0800, Jason Wang wrote: On 2021/2/9 下午5:00, Stefano Garzarella wrote: > On Tue, Feb 09, 2021 at 07:43:02AM +0200, Eli Cohen wrote: > > On Mon, Feb 08, 2021 at 05:17:41PM +0100, Stefano

Re: [PATCH] vdpa/mlx5: fix param validation in mlx5_vdpa_get_config()

2021-02-10 Thread Michael S. Tsirkin
On Wed, Feb 10, 2021 at 12:17:19PM +0800, Jason Wang wrote: > > On 2021/2/9 下午5:00, Stefano Garzarella wrote: > > On Tue, Feb 09, 2021 at 07:43:02AM +0200, Eli Cohen wrote: > > > On Mon, Feb 08, 2021 at 05:17:41PM +0100, Stefano Garzarella wrote: > > > > It's legal to have 'offset + len' equal to

Re: [PATCH] vdpa/mlx5: fix param validation in mlx5_vdpa_get_config()

2021-02-10 Thread Stefano Garzarella
On Tue, Feb 09, 2021 at 04:31:23AM -0500, Michael S. Tsirkin wrote: On Tue, Feb 09, 2021 at 11:24:03AM +0800, Jason Wang wrote: On 2021/2/9 上午2:38, Michael S. Tsirkin wrote: > On Mon, Feb 08, 2021 at 05:17:41PM +0100, Stefano Garzarella wrote: > > It's legal to have 'offset + len' equal to > >

Re: [PATCH] vdpa/mlx5: fix param validation in mlx5_vdpa_get_config()

2021-02-09 Thread Jason Wang
On 2021/2/9 下午5:00, Stefano Garzarella wrote: On Tue, Feb 09, 2021 at 07:43:02AM +0200, Eli Cohen wrote: On Mon, Feb 08, 2021 at 05:17:41PM +0100, Stefano Garzarella wrote: It's legal to have 'offset + len' equal to sizeof(struct virtio_net_config), since 'ndev->config' is a 'struct

Re: [PATCH] vdpa/mlx5: fix param validation in mlx5_vdpa_get_config()

2021-02-09 Thread Michael S. Tsirkin
On Tue, Feb 09, 2021 at 11:24:03AM +0800, Jason Wang wrote: > > On 2021/2/9 上午2:38, Michael S. Tsirkin wrote: > > On Mon, Feb 08, 2021 at 05:17:41PM +0100, Stefano Garzarella wrote: > > > It's legal to have 'offset + len' equal to > > > sizeof(struct virtio_net_config), since 'ndev->config' is a

Re: [PATCH] vdpa/mlx5: fix param validation in mlx5_vdpa_get_config()

2021-02-09 Thread Stefano Garzarella
On Tue, Feb 09, 2021 at 07:43:02AM +0200, Eli Cohen wrote: On Mon, Feb 08, 2021 at 05:17:41PM +0100, Stefano Garzarella wrote: It's legal to have 'offset + len' equal to sizeof(struct virtio_net_config), since 'ndev->config' is a 'struct virtio_net_config', so we can safely copy its content

Re: [PATCH] vdpa/mlx5: fix param validation in mlx5_vdpa_get_config()

2021-02-09 Thread Stefano Garzarella
On Tue, Feb 09, 2021 at 11:24:03AM +0800, Jason Wang wrote: On 2021/2/9 上午2:38, Michael S. Tsirkin wrote: On Mon, Feb 08, 2021 at 05:17:41PM +0100, Stefano Garzarella wrote: It's legal to have 'offset + len' equal to sizeof(struct virtio_net_config), since 'ndev->config' is a 'struct

Re: [PATCH] vdpa/mlx5: fix param validation in mlx5_vdpa_get_config()

2021-02-08 Thread Eli Cohen
On Mon, Feb 08, 2021 at 05:17:41PM +0100, Stefano Garzarella wrote: > It's legal to have 'offset + len' equal to > sizeof(struct virtio_net_config), since 'ndev->config' is a > 'struct virtio_net_config', so we can safely copy its content under > this condition. > > Fixes: 1a86b377aa21

Re: [PATCH] vdpa/mlx5: fix param validation in mlx5_vdpa_get_config()

2021-02-08 Thread Jason Wang
On 2021/2/9 上午2:38, Michael S. Tsirkin wrote: On Mon, Feb 08, 2021 at 05:17:41PM +0100, Stefano Garzarella wrote: It's legal to have 'offset + len' equal to sizeof(struct virtio_net_config), since 'ndev->config' is a 'struct virtio_net_config', so we can safely copy its content under this

Re: [PATCH] vdpa/mlx5: fix param validation in mlx5_vdpa_get_config()

2021-02-08 Thread Jason Wang
On 2021/2/9 上午12:17, Stefano Garzarella wrote: It's legal to have 'offset + len' equal to sizeof(struct virtio_net_config), since 'ndev->config' is a 'struct virtio_net_config', so we can safely copy its content under this condition. Fixes: 1a86b377aa21 ("vdpa/mlx5: Add VDPA driver for

Re: [PATCH] vdpa/mlx5: fix param validation in mlx5_vdpa_get_config()

2021-02-08 Thread Michael S. Tsirkin
On Mon, Feb 08, 2021 at 05:17:41PM +0100, Stefano Garzarella wrote: > It's legal to have 'offset + len' equal to > sizeof(struct virtio_net_config), since 'ndev->config' is a > 'struct virtio_net_config', so we can safely copy its content under > this condition. > > Fixes: 1a86b377aa21

[PATCH] vdpa/mlx5: fix param validation in mlx5_vdpa_get_config()

2021-02-08 Thread Stefano Garzarella
It's legal to have 'offset + len' equal to sizeof(struct virtio_net_config), since 'ndev->config' is a 'struct virtio_net_config', so we can safely copy its content under this condition. Fixes: 1a86b377aa21 ("vdpa/mlx5: Add VDPA driver for supported mlx5 devices") Cc: sta...@vger.kernel.org