]> asedeno.scripts.mit.edu Git - linux.git/commitdiff
drm/vmwgfx: Support the NOP_ERROR command
authorThomas Hellstrom <thellstrom@vmware.com>
Thu, 24 Aug 2017 06:06:30 +0000 (08:06 +0200)
committerSinclair Yeh <syeh@vmware.com>
Mon, 28 Aug 2017 15:40:49 +0000 (17:40 +0200)
Can be used by user-space applications to test and verify the kernel
command buffer error recovery functionality.

Malicious user-space apps could potentially use this command to slow down
graphics processing somewhat, but they could also accomplish the same thing
using a random malformed command so this should be considered safe.
At least as safe as it gets.

Signed-off-by: Thomas Hellstrom <thellstrom@vmware.com>
Reviewed-by: Brian Paul <brianp@vmware.com>
Reviewed-by: Sinclair Yeh <syeh@vmware.com>
drivers/gpu/drm/vmwgfx/vmwgfx_execbuf.c

index ba2032e04f06e527fb9e84870d74ac00e97a624c..8c583fd16c790d4b493d20a5c88be31a8ad51abb 100644 (file)
@@ -3303,6 +3303,8 @@ static const struct vmw_cmd_entry vmw_cmd_entries[SVGA_3D_CMD_MAX] = {
                    true, false, true),
        VMW_CMD_DEF(SVGA_3D_CMD_NOP, &vmw_cmd_ok,
                    true, false, true),
+       VMW_CMD_DEF(SVGA_3D_CMD_NOP_ERROR, &vmw_cmd_ok,
+                   true, false, true),
        VMW_CMD_DEF(SVGA_3D_CMD_ENABLE_GART, &vmw_cmd_invalid,
                    false, false, true),
        VMW_CMD_DEF(SVGA_3D_CMD_DISABLE_GART, &vmw_cmd_invalid,