)]}'
{
  "commit": "8e461304009135270e9ccf2d7e2dfe29daec9b60",
  "tree": "340490057061fedd821818d39b80dfa24e1a7bb2",
  "parents": [
    "eed5b815fa49c17d513202f54e980eb91955d3ed"
  ],
  "author": {
    "name": "Shuicheng Lin",
    "email": "shuicheng.lin@intel.com",
    "time": "Fri Dec 05 23:47:17 2025 +0000"
  },
  "committer": {
    "name": "Thomas Hellström",
    "email": "thomas.hellstrom@linux.intel.com",
    "time": "Thu Dec 18 18:10:34 2025 +0100"
  },
  "message": "drm/xe: Limit num_syncs to prevent oversized allocations\n\nThe exec and vm_bind ioctl allow userspace to specify an arbitrary\nnum_syncs value. Without bounds checking, a very large num_syncs\ncan force an excessively large allocation, leading to kernel warnings\nfrom the page allocator as below.\n\nIntroduce DRM_XE_MAX_SYNCS (set to 1024) and reject any request\nexceeding this limit.\n\n\"\n------------[ cut here ]------------\nWARNING: CPU: 0 PID: 1217 at mm/page_alloc.c:5124 __alloc_frozen_pages_noprof+0x2f8/0x2180 mm/page_alloc.c:5124\n...\nCall Trace:\n \u003cTASK\u003e\n alloc_pages_mpol+0xe4/0x330 mm/mempolicy.c:2416\n ___kmalloc_large_node+0xd8/0x110 mm/slub.c:4317\n __kmalloc_large_node_noprof+0x18/0xe0 mm/slub.c:4348\n __do_kmalloc_node mm/slub.c:4364 [inline]\n __kmalloc_noprof+0x3d4/0x4b0 mm/slub.c:4388\n kmalloc_noprof include/linux/slab.h:909 [inline]\n kmalloc_array_noprof include/linux/slab.h:948 [inline]\n xe_exec_ioctl+0xa47/0x1e70 drivers/gpu/drm/xe/xe_exec.c:158\n drm_ioctl_kernel+0x1f1/0x3e0 drivers/gpu/drm/drm_ioctl.c:797\n drm_ioctl+0x5e7/0xc50 drivers/gpu/drm/drm_ioctl.c:894\n xe_drm_ioctl+0x10b/0x170 drivers/gpu/drm/xe/xe_device.c:224\n vfs_ioctl fs/ioctl.c:51 [inline]\n __do_sys_ioctl fs/ioctl.c:598 [inline]\n __se_sys_ioctl fs/ioctl.c:584 [inline]\n __x64_sys_ioctl+0x18b/0x210 fs/ioctl.c:584\n do_syscall_x64 arch/x86/entry/syscall_64.c:63 [inline]\n do_syscall_64+0xbb/0x380 arch/x86/entry/syscall_64.c:94\n entry_SYSCALL_64_after_hwframe+0x77/0x7f\n...\n\"\n\nv2: Add \"Reported-by\" and Cc stable kernels.\nv3: Change XE_MAX_SYNCS from 64 to 1024. (Matt \u0026 Ashutosh)\nv4: s/XE_MAX_SYNCS/DRM_XE_MAX_SYNCS/ (Matt)\nv5: Do the check at the top of the exec func. (Matt)\n\nFixes: dd08ebf6c352 (\"drm/xe: Introduce a new DRM driver for Intel GPUs\")\nReported-by: Koen Koning \u003ckoen.koning@intel.com\u003e\nReported-by: Peter Senna Tschudin \u003cpeter.senna@linux.intel.com\u003e\nCloses: https://gitlab.freedesktop.org/drm/xe/kernel/-/issues/6450\nCc: \u003cstable@vger.kernel.org\u003e # v6.12+\nCc: Matthew Brost \u003cmatthew.brost@intel.com\u003e\nCc: Michal Mrozek \u003cmichal.mrozek@intel.com\u003e\nCc: Carl Zhang \u003ccarl.zhang@intel.com\u003e\nCc: José Roberto de Souza \u003cjose.souza@intel.com\u003e\nCc: Lionel Landwerlin \u003clionel.g.landwerlin@intel.com\u003e\nCc: Ivan Briano \u003civan.briano@intel.com\u003e\nCc: Thomas Hellström \u003cthomas.hellstrom@linux.intel.com\u003e\nCc: Ashutosh Dixit \u003cashutosh.dixit@intel.com\u003e\nSigned-off-by: Shuicheng Lin \u003cshuicheng.lin@intel.com\u003e\nReviewed-by: Matthew Brost \u003cmatthew.brost@intel.com\u003e\nSigned-off-by: Matthew Brost \u003cmatthew.brost@intel.com\u003e\nLink: https://patch.msgid.link/20251205234715.2476561-5-shuicheng.lin@intel.com\n(cherry picked from commit b07bac9bd708ec468cd1b8a5fe70ae2ac9b0a11c)\nSigned-off-by: Thomas Hellström \u003cthomas.hellstrom@linux.intel.com\u003e\n",
  "tree_diff": [
    {
      "type": "modify",
      "old_id": "4d81210e41f5246f0fb4593c34e5e16a07d52c37",
      "old_mode": 33188,
      "old_path": "drivers/gpu/drm/xe/xe_exec.c",
      "new_id": "fd9480031750694b80b605ef4b2668548cc9c2dd",
      "new_mode": 33188,
      "new_path": "drivers/gpu/drm/xe/xe_exec.c"
    },
    {
      "type": "modify",
      "old_id": "7cac646bdf1c03689bca9511f5e1f40270811622",
      "old_mode": 33188,
      "old_path": "drivers/gpu/drm/xe/xe_vm.c",
      "new_id": "c93155c6c6272dac1b7ec8edd8a1305dc1b65c1a",
      "new_mode": 33188,
      "new_path": "drivers/gpu/drm/xe/xe_vm.c"
    },
    {
      "type": "modify",
      "old_id": "47853659a705e372e157f51ffe22c1d2fab4a6ff",
      "old_mode": 33188,
      "old_path": "include/uapi/drm/xe_drm.h",
      "new_id": "f64dc0eff0e67b9bac2abbb53dcb56104302d7b2",
      "new_mode": 33188,
      "new_path": "include/uapi/drm/xe_drm.h"
    }
  ]
}
