1. 06 3月, 2020 1 次提交
  2. 04 3月, 2020 5 次提交
  3. 27 2月, 2020 1 次提交
  4. 26 2月, 2020 1 次提交
  5. 25 2月, 2020 1 次提交
  6. 10 2月, 2020 1 次提交
  7. 27 1月, 2020 3 次提交
  8. 14 1月, 2020 1 次提交
  9. 06 1月, 2020 1 次提交
  10. 20 12月, 2019 1 次提交
  11. 18 12月, 2019 1 次提交
  12. 17 12月, 2019 1 次提交
  13. 12 12月, 2019 4 次提交
  14. 11 12月, 2019 1 次提交
  15. 05 12月, 2019 1 次提交
  16. 29 11月, 2019 1 次提交
  17. 16 11月, 2019 1 次提交
  18. 06 11月, 2019 6 次提交
    • J
      drm/i915/cmdparser: Add support for backward jumps · f8c08d8f
      Jon Bloomfield 提交于
      To keep things manageable, the pre-gen9 cmdparser does not
      attempt to track any form of nested BB_START's. This did not
      prevent usermode from using nested starts, or even chained
      batches because the cmdparser is not strictly enforced pre gen9.
      
      Instead, the existence of a nested BB_START would cause the batch
      to be emitted in insecure mode, and any privileged capabilities
      would not be available.
      
      For Gen9, the cmdparser becomes mandatory (for BCS at least), and
      so not providing any form of nested BB_START support becomes
      overly restrictive. Any such batch will simply not run.
      
      We make heavy use of backward jumps in igt, and it is much easier
      to add support for this restricted subset of nested jumps, than to
      rewrite the whole of our test suite to avoid them.
      
      Add the required logic to support limited backward jumps, to
      instructions that have already been validated by the parser.
      
      Note that it's not sufficient to simply approve any BB_START
      that jumps backwards in the buffer because this would allow an
      attacker to embed a rogue instruction sequence within the
      operand words of a harmless instruction (say LRI) and jump to
      that.
      
      We introduce a bit array to track every instr offset successfully
      validated, and test the target of BB_START against this. If the
      target offset hits, it is re-written to the same offset in the
      shadow buffer and the BB_START cmd is allowed.
      
      Note: This patch deliberately ignores checkpatch issues in the
      cmdtables, in order to match the style of the surrounding code.
      We'll correct the entire file in one go in a later patch.
      
      v2: set dispatch secure late (Mika)
      v3: rebase (Mika)
      v4: Clear whitelist on each parse
          Minor review updates (Chris)
      v5: Correct backward jump batching
      v6: fix compilation error due to struct eb shuffle (Mika)
      
      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: NJon Bloomfield <jon.bloomfield@intel.com>
      Signed-off-by: NMika Kuoppala <mika.kuoppala@linux.intel.com>
      Reviewed-by: NChris Wilson <chris.p.wilson@intel.com>
      f8c08d8f
    • J
      drm/i915: Allow parsing of unsized batches · 435e8fc0
      Jon Bloomfield 提交于
      In "drm/i915: Add support for mandatory cmdparsing" we introduced the
      concept of mandatory parsing. This allows the cmdparser to be invoked
      even when user passes batch_len=0 to the execbuf ioctl's.
      
      However, the cmdparser needs to know the extents of the buffer being
      scanned. Refactor the code to ensure the cmdparser uses the actual
      object size, instead of the incoming length, if user passes 0.
      Signed-off-by: NJon 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>
      Reviewed-by: NChris Wilson <chris.p.wilson@intel.com>
      435e8fc0
    • J
      drm/i915: Support ro ppgtt mapped cmdparser shadow buffers · 4f7af194
      Jon Bloomfield 提交于
      For Gen7, the original cmdparser motive was to permit limited
      use of register read/write instructions in unprivileged BB's.
      This worked by copying the user supplied bb to a kmd owned
      bb, and running it in secure mode, from the ggtt, only if
      the scanner finds no unsafe commands or registers.
      
      For Gen8+ we can't use this same technique because running bb's
      from the ggtt also disables access to ppgtt space. But we also
      do not actually require 'secure' execution since we are only
      trying to reduce the available command/register set. Instead we
      will copy the user buffer to a kmd owned read-only bb in ppgtt,
      and run in the usual non-secure mode.
      
      Note that ro pages are only supported by ppgtt (not ggtt), but
      luckily that's exactly what we need.
      
      Add the required paths to map the shadow buffer to ppgtt ro for Gen8+
      
      v2: IS_GEN7/IS_GEN (Mika)
      v3: rebase
      v4: rebase
      v5: rebase
      Signed-off-by: NJon 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: NMika Kuoppala <mika.kuoppala@linux.intel.com>
      Reviewed-by: NChris Wilson <chris.p.wilson@intel.com>
      4f7af194
    • J
      drm/i915: Add support for mandatory cmdparsing · 311a50e7
      Jon Bloomfield 提交于
      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: NJon 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: NMika Kuoppala <mika.kuoppala@linux.intel.com>
      Reviewed-by: NChris Wilson <chris.p.wilson@intel.com>
      311a50e7
    • J
      drm/i915: Remove Master tables from cmdparser · 66d8aba1
      Jon Bloomfield 提交于
      The previous patch has killed support for secure batches
      on gen6+, and hence the cmdparsers master tables are
      now dead code. Remove them.
      Signed-off-by: NJon 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>
      Reviewed-by: NChris Wilson <chris.p.wilson@intel.com>
      66d8aba1
    • J
      drm/i915: Disable Secure Batches for gen6+ · 44157641
      Jon Bloomfield 提交于
      Retroactively stop reporting support for secure batches
      through the api for gen6+ so that older binaries trigger
      the fallback path instead.
      
      Older binaries use secure batches pre gen6 to access resources
      that are not available to normal usermode processes. However,
      all known userspace explicitly checks for HAS_SECURE_BATCHES
      before relying on the secure batch feature.
      
      Since there are no known binaries relying on this for newer gens
      we can kill secure batches from gen6, via I915_PARAM_HAS_SECURE_BATCHES.
      
      v2: rebase (Mika)
      v3: rebase (Mika)
      Signed-off-by: NJon 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: NMika Kuoppala <mika.kuoppala@linux.intel.com>
      Reviewed-by: NChris Wilson <chris.p.wilson@intel.com>
      44157641
  19. 24 10月, 2019 1 次提交
  20. 15 10月, 2019 1 次提交
    • L
      drm/i915/perf: allow holding preemption on filtered ctx · 9cd20ef7
      Lionel Landwerlin 提交于
      We would like to make use of perf in Vulkan. The Vulkan API is much
      lower level than OpenGL, with applications directly exposed to the
      concept of command buffers (pretty much equivalent to our batch
      buffers). In Vulkan, queries are always limited in scope to a command
      buffer. In OpenGL, the lack of command buffer concept meant that
      queries' duration could span multiple command buffers.
      
      With that restriction gone in Vulkan, we would like to simplify
      measuring performance just by measuring the deltas between the counter
      snapshots written by 2 MI_RECORD_PERF_COUNT commands, rather than the
      more complex scheme we currently have in the GL driver, using 2
      MI_RECORD_PERF_COUNT commands and doing some post processing on the
      stream of OA reports, coming from the global OA buffer, to remove any
      unrelated deltas in between the 2 MI_RECORD_PERF_COUNT.
      
      Disabling preemption only apply to a single context with which want to
      query performance counters for and is considered a privileged
      operation, by default protected by CAP_SYS_ADMIN. It is possible to
      enable it for a normal user by disabling the paranoid stream setting.
      
      v2: Store preemption setting in intel_context (Chris)
      
      v3: Use priorities to avoid preemption rather than the HW mechanism
      
      v4: Just modify the port priority reporting function
      
      v5: Add nopreempt flag on gem context and always flag requests
          appropriately, regarless of OA reconfiguration.
      
      Link: https://gitlab.freedesktop.org/mesa/mesa/merge_requests/932Signed-off-by: NLionel Landwerlin <lionel.g.landwerlin@intel.com>
      Reviewed-by: NChris Wilson <chris@chris-wilson.co.uk>
      Signed-off-by: NChris Wilson <chris@chris-wilson.co.uk>
      Link: https://patchwork.freedesktop.org/patch/msgid/20191014201404.22468-4-chris@chris-wilson.co.uk
      9cd20ef7
  21. 04 10月, 2019 5 次提交
  22. 28 8月, 2019 1 次提交