1. 03 Jul, 2023 7 commits
  2. 26 Jun, 2023 1 commit
  3. 23 Jun, 2023 1 commit
  4. 22 Jun, 2023 1 commit
  5. 21 Jun, 2023 1 commit
  6. 20 Jun, 2023 1 commit
  7. 19 Jun, 2023 2 commits
  8. 15 Jun, 2023 1 commit
  9. 13 Jun, 2023 4 commits
  10. 12 Jun, 2023 1 commit
  11. 10 Jun, 2023 1 commit
    • Nirmoy Das's avatar
      drm/i915: Fix a VMA UAF for multi-gt platform · f56fe3e9
      Nirmoy Das authored
      Ensure correct handling of closed VMAs on multi-gt platforms to prevent
      Use-After-Free. Currently, when GT0 goes idle, closed VMAs that are
      exclusively added to GT0's closed_vma link (gt->closed_vma) and
      subsequently freed by i915_vma_parked(), which assumes the entire GPU is
      idle. However, on platforms with multiple GTs, such as MTL, GT1 may
      remain active while GT0 is idle. This causes GT0 to mistakenly consider
      the closed VMAs in its closed_vma list as unnecessary, potentially
      leading to Use-After-Free issues if a job for GT1 attempts to access a
      freed VMA.
      
      Although we do take a wakeref for GT0 but it happens later, after
      evaluating VMAs. To mitigate this, it is necessary to hold a GT0 wakeref
      early.
      
      v2: Use gt id to detect multi-tile(Andi)
          Fix the incorrect error path.
      v3: Add more comment(Andi)
          Use the new gt var when possible(Andrzej)
      
      Cc: Joonas Lahtinen <joonas.lahtinen@linux.intel.com>
      Cc: Rodrigo Vivi <rodrigo.vivi@intel.com>
      Cc: Tvrtko Ursulin <tvrtko.ursulin@linux.intel.com>
      Cc: Thomas Hellström <thomas.hellstrom@linux.intel.com>
      Cc: Chris Wilson <chris.p.wilson@intel.com>
      Cc: Andi Shyti <andi.shyti@linux.intel.com>
      Cc: Andrzej Hajda <andrzej.hajda@intel.com>
      Cc: Sushma Venkatesh Reddy <sushma.venkatesh.reddy@intel.com>
      Signed-off-by: default avatarNirmoy Das <nirmoy.das@intel.com>
      Tested-by: default avatarAndi Shyti <andi.shyti@linux.intel.com>
      Reviewed-by: default avatarAndi Shyti <andi.shyti@linux.intel.com>
      Reviewed-by: default avatarAndrzej Hajda <andrzej.hajda@intel.com>
      Tested-by: default avatarSushma Venkatesh Reddy <sushma.venkatesh.reddy@intel.com>
      Link: https://patchwork.freedesktop.org/patch/msgid/20230608110103.777594-1-andi.shyti@linux.intel.com
      f56fe3e9
  12. 08 Jun, 2023 1 commit
  13. 07 Jun, 2023 3 commits
  14. 06 Jun, 2023 5 commits
  15. 05 Jun, 2023 9 commits
  16. 02 Jun, 2023 1 commit
    • Nathan Chancellor's avatar
      drm/i915/pxp: Fix size_t format specifier in gsccs_send_message() · 5c315434
      Nathan Chancellor authored
      When building ARCH=i386 allmodconfig, the following warning occurs:
      
        In file included from include/linux/device.h:15,
                         from include/linux/node.h:18,
                         from include/linux/cpu.h:17,
                         from include/linux/static_call.h:135,
                         from arch/x86/include/asm/perf_event.h:5,
                         from include/linux/perf_event.h:25,
                         from drivers/gpu/drm/i915/i915_pmu.h:11,
                         from drivers/gpu/drm/i915/gt/intel_engine_types.h:21,
                         from drivers/gpu/drm/i915/gt/intel_context_types.h:18,
                         from drivers/gpu/drm/i915/gem/i915_gem_context_types.h:20,
                         from drivers/gpu/drm/i915/i915_request.h:34,
                         from drivers/gpu/drm/i915/i915_active.h:13,
                         from drivers/gpu/drm/i915/gt/intel_context.h:13,
                         from drivers/gpu/drm/i915/pxp/intel_pxp_gsccs.c:8:
        drivers/gpu/drm/i915/pxp/intel_pxp_gsccs.c: In function 'gsccs_send_message':
        include/drm/drm_print.h:456:39: error: format '%ld' expects argument of type 'long int', but argument 4 has type 'size_t' {aka 'unsigned int'} [-Werror=format=]
          456 |         dev_##level##type((drm)->dev, "[drm] " fmt, ##__VA_ARGS__)
              |                                       ^~~~~~~~
        include/linux/dev_printk.h:110:30: note: in definition of macro 'dev_printk_index_wrap'
          110 |                 _p_func(dev, fmt, ##__VA_ARGS__);                       \
              |                              ^~~
        include/linux/dev_printk.h:146:61: note: in expansion of macro 'dev_fmt'
          146 |         dev_printk_index_wrap(_dev_warn, KERN_WARNING, dev, dev_fmt(fmt), ##__VA_ARGS__)
              |                                                             ^~~~~~~
        include/drm/drm_print.h:456:9: note: in expansion of macro 'dev_warn'
          456 |         dev_##level##type((drm)->dev, "[drm] " fmt, ##__VA_ARGS__)
              |         ^~~~
        include/drm/drm_print.h:466:9: note: in expansion of macro '__drm_printk'
          466 |         __drm_printk((drm), warn,, fmt, ##__VA_ARGS__)
              |         ^~~~~~~~~~~~
        drivers/gpu/drm/i915/pxp/intel_pxp_gsccs.c:146:17: note: in expansion of macro 'drm_warn'
          146 |                 drm_warn(&i915->drm, "caller with insufficient PXP reply size %u (%ld)\n",
              |                 ^~~~~~~~
        cc1: all warnings being treated as errors
      
      Use the '%zu' format specifier, as the variable is a 'size_t'.
      
      Fixes: dc9ac125 ("drm/i915/pxp: Add GSC-CS backend to send GSC fw messages")
      Signed-off-by: default avatarNathan Chancellor <nathan@kernel.org>
      Reviewed-by: default avatarAndi Shyti <andi.shyti@linux.intel.com>
      Signed-off-by: default avatarJani Nikula <jani.nikula@intel.com>
      Link: https://patchwork.freedesktop.org/patch/msgid/20230530-i915-pxp-size_t-wformat-v1-1-9631081e2e5b@kernel.org
      5c315434