]> git.proxmox.com Git - mirror_ubuntu-hirsute-kernel.git/commit
drm/i915: Add support for mandatory cmdparsing
authorJon Bloomfield <jon.bloomfield@intel.com>
Wed, 1 Aug 2018 16:33:59 +0000 (09:33 -0700)
committerJon Bloomfield <jon.bloomfield@intel.com>
Tue, 5 Nov 2019 19:37:54 +0000 (11:37 -0800)
commit311a50e76a33d1e029563c24b2ff6db0c02b5afe
tree869f555ab69ae02132c888f03826dc4cc824d46b
parent66d8aba1cd6db34af10de465c0d52af679288cb6
drm/i915: Add support for mandatory cmdparsing

The existing cmdparser for gen7 can be bypassed by specifying
batch_len=0 in the execbuf call. This is safe because bypassing
simply reduces the cmd-set available.

In a later patch we will introduce cmdparsing for gen9, as a
security measure, which must be strictly enforced since without
it we are vulnerable to DoS attacks.

Introduce the concept of 'required' cmd parsing that cannot be
bypassed by submitting zero-length bb's.

v2: rebase (Mika)
v2: rebase (Mika)
v3: fix conflict on engine flags (Mika)

Signed-off-by: Jon Bloomfield <jon.bloomfield@intel.com>
Cc: Tony Luck <tony.luck@intel.com>
Cc: Dave Airlie <airlied@redhat.com>
Cc: Takashi Iwai <tiwai@suse.de>
Cc: Tyler Hicks <tyhicks@canonical.com>
Signed-off-by: Mika Kuoppala <mika.kuoppala@linux.intel.com>
Reviewed-by: Chris Wilson <chris.p.wilson@intel.com>
drivers/gpu/drm/i915/gem/i915_gem_execbuffer.c
drivers/gpu/drm/i915/gt/intel_engine_types.h
drivers/gpu/drm/i915/i915_cmd_parser.c