P J P 于2021年5月6日周四 下午1:53写道:
>
> +-- On Wed, 5 May 2021, Li Qiang wrote --+
> | P J P 于2021年5月5日周三 下午3:24写道:
> | > - vg_ctrl_response(g, cmd, , sizeof(resp));
> | > + vg_ctrl_response(g, cmd, , sizeof(resp.hdr));
> | >
> | > * While memset(3) is okay, should it also send header(hdr) size as
+-- On Wed, 5 May 2021, Li Qiang wrote --+
| P J P 于2021年5月5日周三 下午3:24写道:
| > - vg_ctrl_response(g, cmd, , sizeof(resp));
| > + vg_ctrl_response(g, cmd, , sizeof(resp.hdr));
| >
| > * While memset(3) is okay, should it also send header(hdr) size as
'resp_len'?
|
| I don't think so. This
P J P 于2021年5月5日周三 下午3:24写道:
>
> +-- On Tue, 4 May 2021, Li Qiang wrote --+
> | Otherwise some of the 'resp' will be leaked to guest.
> |
> | diff --git a/contrib/vhost-user-gpu/virgl.c b/contrib/vhost-user-gpu/virgl.c
> | index 9e6660c7ab..6a332d601f 100644
> |
> | +memset(, 0,
+-- On Tue, 4 May 2021, Li Qiang wrote --+
| Otherwise some of the 'resp' will be leaked to guest.
|
| diff --git a/contrib/vhost-user-gpu/virgl.c b/contrib/vhost-user-gpu/virgl.c
| index 9e6660c7ab..6a332d601f 100644
|
| +memset(, 0, sizeof(resp));
| if (info.capset_index == 0) {
|
Otherwise some of the 'resp' will be leaked to guest.
Signed-off-by: Li Qiang
---
contrib/vhost-user-gpu/virgl.c | 1 +
1 file changed, 1 insertion(+)
diff --git a/contrib/vhost-user-gpu/virgl.c b/contrib/vhost-user-gpu/virgl.c
index 9e6660c7ab..6a332d601f 100644
---