dri-devel Archive on lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH v5 0/3] accel/rocket: Fix job submit error handling
@ 2026-08-28  6:41 Haoming Gao
  2026-08-28  6:41 ` [PATCH v5 1/3] accel/rocket: Validate BO handle counts on job submission Haoming Gao
                   ` (2 more replies)
  0 siblings, 3 replies; 7+ messages in thread
From: Haoming Gao @ 2026-08-28  6:41 UTC (permalink / raw)
  To: Tomeu Vizoso
  Cc: Oded Gabbay, Jeff Hugo, Sidong Yang, Greg KH, dri-devel,
	linux-kernel

Several independent error paths in the Rocket job submission ioctl can be
triggered by unprivileged userspace. This series validates userspace BO
counts before passing them to helpers with signed count parameters, collects
implicit dependencies before the scheduler job is armed, and propagates the
first per-job submission error to userspace.

The series was tested on RK3588 with zero task counts, invalid task pointers,
invalid BO handles, and oversized BO counts. The requests returned the
expected error codes without warnings or errors in the kernel log.

Changes in v5:
- Replaced the nickname in the author identity and Signed-off-by tags with my
  real name, as requested by Greg Kroah-Hartman.

Changes in v4:
- Added Sidong Yang's Reviewed-by tags, using the corrected email address.
- Dropped Cc: stable from patch 3 because propagating submission errors
  changes userspace-visible ioctl behavior.
- Rebased onto the current drm-misc-next branch.

Changes in v3:
- Kept the individual count checks before GEM lookup, but changed bo_count to
  int so check_add_overflow() rejects combined counts above INT_MAX, as
  suggested by Sidong Yang.

Changes in v2:
- Split the three independent fixes into separate patches as suggested by
  Sidong Yang.
- Rebased onto the then-current drm-misc-next branch.
- Dropped incidental blank-line-only changes from the original patch.
- Added Sidong Yang's Tested-by tag.

v4: https://lore.kernel.org/r/20260828061916.20405-1-Naixumogu@whut.edu.cn
v3: https://lore.kernel.org/r/20260828050805.38548-1-Naixumogu@whut.edu.cn
v2: https://lore.kernel.org/r/20260827170608.39511-1-Naixumogu@whut.edu.cn
v1: https://lore.kernel.org/r/20260813142059.151644-1-Naixumogu@whut.edu.cn

Haoming Gao (3):
  accel/rocket: Validate BO handle counts on job submission
  accel/rocket: Collect job dependencies before arming
  accel/rocket: Propagate job submission errors

 drivers/accel/rocket/rocket_job.c | 32 ++++++++++++++++++++-----------
 1 file changed, 21 insertions(+), 11 deletions(-)


base-commit: f9c2f70ee41544717b3c209083073db1e21f919b
-- 
2.43.0

^ permalink raw reply	[flat|nested] 7+ messages in thread

end of thread, other threads:[~2026-08-28  7:45 UTC | newest]

Thread overview: 7+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2026-08-28  6:41 [PATCH v5 0/3] accel/rocket: Fix job submit error handling Haoming Gao
2026-08-28  6:41 ` [PATCH v5 1/3] accel/rocket: Validate BO handle counts on job submission Haoming Gao
2026-08-28  6:58   ` sashiko-bot
2026-08-28  6:41 ` [PATCH v5 2/3] accel/rocket: Collect job dependencies before arming Haoming Gao
2026-08-28  6:55   ` sashiko-bot
2026-08-28  6:41 ` [PATCH v5 3/3] accel/rocket: Propagate job submission errors Haoming Gao
2026-08-28  6:59   ` sashiko-bot

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox