diff options
author | Yan Zhao <yan.y.zhao@intel.com> | 2020-12-23 06:45:17 +0300 |
---|---|---|
committer | Zhenyu Wang <zhenyuw@linux.intel.com> | 2020-12-25 06:15:59 +0300 |
commit | 73a37a43d1b0ad4fb2154bc000d44c89e458619d (patch) | |
tree | 5b6120c478b9331e83c19b79614eb39e4cc1c457 /drivers/gpu/drm/i915/gvt/cmd_parser.c | |
parent | f18d417a57438498e0de481d3a0bc900c2b0e057 (diff) | |
download | linux-73a37a43d1b0ad4fb2154bc000d44c89e458619d.tar.xz |
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: Yan Zhao <yan.y.zhao@intel.com>
Signed-off-by: Zhenyu Wang <zhenyuw@linux.intel.com>
Link: http://patchwork.freedesktop.org/patch/msgid/20201223034517.17080-1-yan.y.zhao@intel.com
Reviewed-by: Zhenyu Wang <zhenyuw@linux.intel.com>
Diffstat (limited to 'drivers/gpu/drm/i915/gvt/cmd_parser.c')
-rw-r--r-- | drivers/gpu/drm/i915/gvt/cmd_parser.c | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/drivers/gpu/drm/i915/gvt/cmd_parser.c b/drivers/gpu/drm/i915/gvt/cmd_parser.c index 7ee101644e75..be0a7d4e8750 100644 --- a/drivers/gpu/drm/i915/gvt/cmd_parser.c +++ b/drivers/gpu/drm/i915/gvt/cmd_parser.c @@ -993,6 +993,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; |