[PATCH v4 04/11] drm/i915/gvt: filter cmds "lrr-src" and "lrr-dst" in cmd_handler
Yan Zhao
yan.y.zhao at intel.com
Wed Dec 23 02:06:34 UTC 2020
do not allow "lrr-src" and "lrr-dst"
Cc: Colin Xu <colin.xu at intel.com>
Cc: Kevin Tian <kevin.tian at intel.com>
Signed-off-by: Yan Zhao <yan.y.zhao at intel.com>
---
drivers/gpu/drm/i915/gvt/cmd_parser.c | 6 ++++++
1 file changed, 6 insertions(+)
diff --git a/drivers/gpu/drm/i915/gvt/cmd_parser.c b/drivers/gpu/drm/i915/gvt/cmd_parser.c
index d008da48f998..89d4d5ddb07e 100644
--- a/drivers/gpu/drm/i915/gvt/cmd_parser.c
+++ b/drivers/gpu/drm/i915/gvt/cmd_parser.c
@@ -991,6 +991,12 @@ static int cmd_reg_handler(struct parser_exec_state *s,
return 0;
}
+ if (!strncmp(cmd, "lrr-src", 7) ||
+ !strncmp(cmd, "lrr-dst", 7)) {
+ gvt_vgpu_err("not allowed cmd %s\n", cmd);
+ return -EPERM;
+ }
+
if (is_cmd_update_pdps(offset, s) &&
cmd_pdp_mmio_update_handler(s, offset, index))
return -EINVAL;
--
2.17.1
More information about the intel-gvt-dev
mailing list