Commit 73a37a43 authored by Yan Zhao's avatar Yan Zhao Committed by Zhenyu Wang

drm/i915/gvt: filter cmds "lrr-src" and "lrr-dst" in cmd_handler

do not allow "lrr-src" and "lrr-dst"

Cc: Colin Xu <colin.xu@intel.com>
Cc: Kevin Tian <kevin.tian@intel.com>
Signed-off-by: default avatarYan Zhao <yan.y.zhao@intel.com>
Signed-off-by: default avatarZhenyu Wang <zhenyuw@linux.intel.com>
Link: http://patchwork.freedesktop.org/patch/msgid/20201223034517.17080-1-yan.y.zhao@intel.comReviewed-by: default avatarZhenyu Wang <zhenyuw@linux.intel.com>
parent f18d417a
...@@ -993,6 +993,12 @@ static int cmd_reg_handler(struct parser_exec_state *s, ...@@ -993,6 +993,12 @@ static int cmd_reg_handler(struct parser_exec_state *s,
return 0; 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) && if (is_cmd_update_pdps(offset, s) &&
cmd_pdp_mmio_update_handler(s, offset, index)) cmd_pdp_mmio_update_handler(s, offset, index))
return -EINVAL; return -EINVAL;
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment