<feed xmlns='http://www.w3.org/2005/Atom'>
<title>kernel/git/torvalds/linux.git/drivers/accel, branch master</title>
<subtitle>Linux kernel source tree</subtitle>
<id>https://git.rulkc.org/pub/scm/linux/kernel/git/torvalds/linux.git/atom?h=master</id>
<link rel='self' href='https://git.rulkc.org/pub/scm/linux/kernel/git/torvalds/linux.git/atom?h=master'/>
<link rel='alternate' type='text/html' href='https://git.rulkc.org/pub/scm/linux/kernel/git/torvalds/linux.git/'/>
<updated>2026-07-17T03:05:28+00:00</updated>
<entry>
<title>accel/amdxdna: Fix use-after-free of mm_struct in job scheduler</title>
<updated>2026-07-17T03:05:28+00:00</updated>
<author>
<name>Lizhi Hou</name>
<email>lizhi.hou@amd.com</email>
</author>
<published>2026-07-16T15:13:05+00:00</published>
<link rel='alternate' type='text/html' href='https://git.rulkc.org/pub/scm/linux/kernel/git/torvalds/linux.git/commit/?id=faebb7ba1ac65fa5810b640df02ce04e509fdc11'/>
<id>urn:sha1:faebb7ba1ac65fa5810b640df02ce04e509fdc11</id>
<content type='text'>
amdxdna_cmd_submit() stores current-&gt;mm in job-&gt;mm without holding any
reference. aie2_sched_job_run() later access job-&gt;mm from the DRM
scheduler worker thread. With only a raw pointer and no structural
reference, the mm_struct can be freed before the scheduler runs the job.

Fix this by calling mmgrab() to hold a structural mm_count reference for
the lifetime of the job, paired with mmdrop() in every cleanup path.

Fixes: aac243092b70 ("accel/amdxdna: Add command execution")
Reviewed-by: Max Zhen &lt;max.zhen@amd.com&gt;
Signed-off-by: Lizhi Hou &lt;lizhi.hou@amd.com&gt;
Link: https://patch.msgid.link/20260716151305.1595780-1-lizhi.hou@amd.com
</content>
</entry>
<entry>
<title>accel/ivpu: Reject firmware log with size smaller than header</title>
<updated>2026-07-15T14:17:10+00:00</updated>
<author>
<name>Jhonraushan</name>
<email>raushan.jhon@gmail.com</email>
</author>
<published>2026-07-15T07:42:06+00:00</published>
<link rel='alternate' type='text/html' href='https://git.rulkc.org/pub/scm/linux/kernel/git/torvalds/linux.git/commit/?id=ddb44baed257560f192b145ed36cf8c0a412de47'/>
<id>urn:sha1:ddb44baed257560f192b145ed36cf8c0a412de47</id>
<content type='text'>
fw_log_from_bo() validates the tracing buffer header_size and that the
log fits within the BO, but never checks that log-&gt;size is at least
log-&gt;header_size. fw_log_print_buffer() then computes:

  u32 data_size = log-&gt;size - log-&gt;header_size;

which underflows to a near-U32_MAX value when firmware reports a log whose
size is smaller than its header. That huge data_size defeats the
log_start/log_end bounds clamps added by commit dd1311bcf0e6 ("accel/ivpu:
Add bounds checks for firmware log indices"), so fw_log_print_lines() reads
far past the small real data region of the BO. A size of 0 also makes
fw_log_from_bo() advance the offset by 0, causing the callers to loop
forever on the same header.

Reject logs whose size is smaller than the header (which also rejects
size == 0).

Fixes: d4e4257afa6e ("accel/ivpu: Add firmware tracing support")
Cc: stable@vger.kernel.org
Signed-off-by: Jhonraushan &lt;raushan.jhon@gmail.com&gt;
Reviewed-by: Karol Wachowski &lt;karol.wachowski@linux.intel.com&gt;
Signed-off-by: Karol Wachowski &lt;karol.wachowski@linux.intel.com&gt;
Link: https://patch.msgid.link/20260715074206.867712-1-raushan.jhon@gmail.com
</content>
</entry>
<entry>
<title>accel/amdxdna: reject command submission on devices without a submit op</title>
<updated>2026-07-15T01:09:08+00:00</updated>
<author>
<name>Doruk Tan Ozturk</name>
<email>doruk@0sec.ai</email>
</author>
<published>2026-07-13T17:30:29+00:00</published>
<link rel='alternate' type='text/html' href='https://git.rulkc.org/pub/scm/linux/kernel/git/torvalds/linux.git/commit/?id=38953513d7313992676d4136cd425cdb70c6278e'/>
<id>urn:sha1:38953513d7313992676d4136cd425cdb70c6278e</id>
<content type='text'>
amdxdna_cmd_submit() calls xdna-&gt;dev_info-&gt;ops-&gt;cmd_submit()
unconditionally, but only aie2_dev_ops defines that callback.
aie4_vf_ops (the AIE4 SR-IOV virtual function) does not, so a user
AMDXDNA_EXEC_CMD ioctl on an AIE4 device reaches a NULL function-pointer
call and oopses the kernel. AIE4 submits work through a mapped user queue
and doorbell, not this ioctl path.

Reject the submission early with -EOPNOTSUPP when the device provides no
cmd_submit op, so the shared EXEC ioctl is a clean no-op on such devices.

Fixes: aac243092b70 ("accel/amdxdna: Add command execution")
Cc: stable@vger.kernel.org
Found by 0sec automated security-research tooling (https://0sec.ai).
Assisted-by: 0sec:claude-opus-4-8
Signed-off-by: Doruk Tan Ozturk &lt;doruk@0sec.ai&gt;
Reviewed-by: Lizhi Hou &lt;lizhi.hou@amd.com&gt;
Signed-off-by: Lizhi Hou &lt;lizhi.hou@amd.com&gt;
Link: https://patch.msgid.link/20260713173030.87541-3-doruk@0sec.ai
</content>
</entry>
<entry>
<title>accel/amdxdna: reject user command submission without a command BO</title>
<updated>2026-07-15T01:08:40+00:00</updated>
<author>
<name>Doruk Tan Ozturk</name>
<email>doruk@0sec.ai</email>
</author>
<published>2026-07-13T17:30:28+00:00</published>
<link rel='alternate' type='text/html' href='https://git.rulkc.org/pub/scm/linux/kernel/git/torvalds/linux.git/commit/?id=261c1fe3327ad24508f54552c6366e3e4db82c15'/>
<id>urn:sha1:261c1fe3327ad24508f54552c6366e3e4db82c15</id>
<content type='text'>
amdxdna_drm_submit_execbuf() passes the user-supplied command BO handle
straight into amdxdna_cmd_submit() with drv_cmd == NULL. When the handle
is AMDXDNA_INVALID_BO_HANDLE (0), the block that fetches job-&gt;cmd_bo is
skipped, leaving it NULL, and no check rejects it on the user path (the
!job-&gt;cmd_bo guard lives inside the != INVALID branch).

The job is then armed and pushed to the DRM scheduler.
aie2_sched_job_run() takes the drv_cmd == NULL path and calls
amdxdna_cmd_set_state(job-&gt;cmd_bo) -&gt; amdxdna_gem_vmap(NULL) -&gt;
to_gobj(NULL)-&gt;dev, a NULL pointer dereference in the drm_sched worker.
A process with access to the accel node on a system with a probed AMD NPU
can trigger a kernel oops with a single AMDXDNA_EXEC_CMD ioctl
(cmd_handles = 0).

Only internal driver commands (SYNC_DEBUG_BO / ATTACH_DEBUG_BO)
legitimately pass AMDXDNA_INVALID_BO_HANDLE, and they always set drv_cmd.
Reject the invalid handle for user submissions (drv_cmd == NULL) at the
submit choke point so every user path is covered.

Fixes: aac243092b70 ("accel/amdxdna: Add command execution")
Cc: stable@vger.kernel.org
Found by 0sec automated security-research tooling (https://0sec.ai).
Assisted-by: 0sec:claude-opus-4-8
Signed-off-by: Doruk Tan Ozturk &lt;doruk@0sec.ai&gt;
Reviewed-by: Lizhi Hou &lt;lizhi.hou@amd.com&gt;
Signed-off-by: Lizhi Hou &lt;lizhi.hou@amd.com&gt;
Link: https://patch.msgid.link/20260713173030.87541-2-doruk@0sec.ai
</content>
</entry>
<entry>
<title>Merge v7.2-rc3 into drm-misc-fixes</title>
<updated>2026-07-13T09:32:29+00:00</updated>
<author>
<name>Maarten Lankhorst</name>
<email>dev@lankhorst.se</email>
</author>
<published>2026-07-13T09:32:29+00:00</published>
<link rel='alternate' type='text/html' href='https://git.rulkc.org/pub/scm/linux/kernel/git/torvalds/linux.git/commit/?id=ac3ee180a8cf9e00ffd4fc8cc670a8b2d6f9b2f2'/>
<id>urn:sha1:ac3ee180a8cf9e00ffd4fc8cc670a8b2d6f9b2f2</id>
<content type='text'>
Forward from rc1 to rc3 to track upstream closer again.

Signed-off-by: Maarten Lankhorst &lt;dev@lankhorst.se&gt;
</content>
</entry>
<entry>
<title>accel/ivpu: Fix wrong register read in LNL failure diagnostics</title>
<updated>2026-07-13T08:29:08+00:00</updated>
<author>
<name>Karol Wachowski</name>
<email>karol.wachowski@linux.intel.com</email>
</author>
<published>2026-07-10T10:13:31+00:00</published>
<link rel='alternate' type='text/html' href='https://git.rulkc.org/pub/scm/linux/kernel/git/torvalds/linux.git/commit/?id=e4159045c2704dfe146f0ccb0445d9d074cd6882'/>
<id>urn:sha1:e4159045c2704dfe146f0ccb0445d9d074cd6882</id>
<content type='text'>
diagnose_failure_lnl() read VPU_HW_BTRS_MTL_INTERRUPT_STAT instead of
VPU_HW_BTRS_LNL_INTERRUPT_STAT, which on LNL and newer parts is a
different register with a different bit layout, so failure diagnostics
decoded the wrong register and reported a bogus error cause.
Read the LNL interrupt status register instead.

Fixes: 8a27ad81f7d3 ("accel/ivpu: Split IP and buttress code")
Reviewed-by: Andrzej Kacprowski &lt;andrzej.kacprowski@linux.intel.com&gt;
Signed-off-by: Karol Wachowski &lt;karol.wachowski@linux.intel.com&gt;
Link: https://patch.msgid.link/20260710101331.1899505-1-karol.wachowski@linux.intel.com
</content>
</entry>
<entry>
<title>Merge tag 'drm-misc-fixes-2026-07-09' of https://gitlab.freedesktop.org/drm/misc/kernel into drm-fixes</title>
<updated>2026-07-10T03:03:15+00:00</updated>
<author>
<name>Dave Airlie</name>
<email>airlied@redhat.com</email>
</author>
<published>2026-07-10T03:03:14+00:00</published>
<link rel='alternate' type='text/html' href='https://git.rulkc.org/pub/scm/linux/kernel/git/torvalds/linux.git/commit/?id=7978a34fd6e4eae91db0741b553e7682288d022c'/>
<id>urn:sha1:7978a34fd6e4eae91db0741b553e7682288d022c</id>
<content type='text'>
drm-misc-fixes for v7.2-rc3:
- Fix uaf in amdxdna mmap failure path.
- A lot of deadlocks, access races and return value fixes in amdxdna.
- Fix analogix_dp bitshifts during link training.
- Use direct label in drm_exec.
- Fix absent indirect bo handling in v3d.
- Sync on first active crtc in fb_dirty, rather than first crtc.
- Rework try_harder in the buddy allocator.
- Make imagination function static to solve compiler warning.
- Fix imagination error checking.

Signed-off-by: Dave Airlie &lt;airlied@redhat.com&gt;
From: Maarten Lankhorst &lt;maarten.lankhorst@linux.intel.com&gt;
Link: https://patch.msgid.link/71e5b48b-307f-47f5-8fd5-b60ea43e4196@linux.intel.com
</content>
</entry>
<entry>
<title>accel/amdxdna: Fix potential NULL pointer dereference of abo-&gt;client</title>
<updated>2026-07-08T03:49:28+00:00</updated>
<author>
<name>Lizhi Hou</name>
<email>lizhi.hou@amd.com</email>
</author>
<published>2026-07-07T20:15:56+00:00</published>
<link rel='alternate' type='text/html' href='https://git.rulkc.org/pub/scm/linux/kernel/git/torvalds/linux.git/commit/?id=c69dbbf0212734e22219dfc31c0922bd7c9ffbb0'/>
<id>urn:sha1:c69dbbf0212734e22219dfc31c0922bd7c9ffbb0</id>
<content type='text'>
Closing a BO handle clears abo-&gt;client, while the underlying GEM object
may remain alive due to internal kernel references. As a result, code
executed after the BO handle is closed may dereference a NULL abo-&gt;client
pointer.

Remove accesses to abo-&gt;client from code paths that may execute after the
BO handle has been closed.

Fixes: d76856beb4a4 ("accel/amdxdna: Refactor GEM BO handling and add helper APIs for address retrieval")
Reviewed-by: Max Zhen &lt;max.zhen@amd.com&gt;
Signed-off-by: Lizhi Hou &lt;lizhi.hou@amd.com&gt;
Link: https://patch.msgid.link/20260707201556.562191-1-lizhi.hou@amd.com
</content>
</entry>
<entry>
<title>accel/amdxdna: Check init_srcu_struct() return value</title>
<updated>2026-07-08T03:49:19+00:00</updated>
<author>
<name>Lizhi Hou</name>
<email>lizhi.hou@amd.com</email>
</author>
<published>2026-07-07T17:23:23+00:00</published>
<link rel='alternate' type='text/html' href='https://git.rulkc.org/pub/scm/linux/kernel/git/torvalds/linux.git/commit/?id=44d8fddf1c87d6bb6b65983041a0ce6c2af66bb9'/>
<id>urn:sha1:44d8fddf1c87d6bb6b65983041a0ce6c2af66bb9</id>
<content type='text'>
The return value of init_srcu_struct() is currently ignored. If
initialization fails, subsequent use of hwctx_srcu may result in invalid
memory accesses.

Check the return value of init_srcu_struct() and propagate the error to
the caller.

Fixes: aac243092b70 ("accel/amdxdna: Add command execution")
Reviewed-by: Mario Limonciello (AMD) &lt;superm1@kernel.org&gt;
Signed-off-by: Lizhi Hou &lt;lizhi.hou@amd.com&gt;
Link: https://patch.msgid.link/20260707172323.539721-1-lizhi.hou@amd.com
</content>
</entry>
<entry>
<title>accel/amdxdna: Check drmm_mutex_init() return value</title>
<updated>2026-07-08T03:49:10+00:00</updated>
<author>
<name>Lizhi Hou</name>
<email>lizhi.hou@amd.com</email>
</author>
<published>2026-07-07T17:23:07+00:00</published>
<link rel='alternate' type='text/html' href='https://git.rulkc.org/pub/scm/linux/kernel/git/torvalds/linux.git/commit/?id=0f092793a7b527dfb2cde323d4e5630d43447b84'/>
<id>urn:sha1:0f092793a7b527dfb2cde323d4e5630d43447b84</id>
<content type='text'>
drmm_mutex_init() may fail and return an error. Check the return value
and abort initialization if mutex creation fails.

Fixes: 8c9ff1b181ba ("accel/amdxdna: Add a new driver for AMD AI Engine")
Reviewed-by: Max Zhen &lt;max.zhen@amd.com&gt;
Signed-off-by: Lizhi Hou &lt;lizhi.hou@amd.com&gt;
Link: https://patch.msgid.link/20260707172307.539676-1-lizhi.hou@amd.com
</content>
</entry>
</feed>
