summaryrefslogtreecommitdiffstats
path: root/kernel/gsp_sema_service.c
diff options
context:
space:
mode:
authorArthur Hanson Rasmusson <arthur@vgpu.io>2026-11-16 18:46:47 -0500
committerArthur Hanson Rasmusson <arthur@vgpu.io>2026-11-16 18:46:47 -0500
commitf0e34c4fb345f907727fdd3aa401465c377ae81d (patch)
tree67293d1e8d2f7b47183cdd41d3746ad9cfc5a42a /kernel/gsp_sema_service.c
parenta644d2540d3a25c8ed6959548c6107f76e72ad89 (diff)
downloadopen-iov-f0e34c4fb345f907727fdd3aa401465c377ae81d.tar.gz
open-iov-f0e34c4fb345f907727fdd3aa401465c377ae81d.zip
vgsp: eng89p - match the CALL header, not interior methods, for DRAW_IAB
The c996-c1001 DRAW-SCAN false-positive: a 4353-word op=1 state run whose m0=0x804 has 0x3910 at interior offset 0xC43, so the scan claimed the draw was present, forced a 4353-word 'draw slice', and the real CALL header (op=5 cnt=10 m0=0x3910) never reached the held-call path. A CALL can only be a run header, so match m0 only (booter window scan and the service walker/chunk scan).
Diffstat (limited to 'kernel/gsp_sema_service.c')
-rw-r--r--kernel/gsp_sema_service.c30
1 files changed, 14 insertions, 16 deletions
diff --git a/kernel/gsp_sema_service.c b/kernel/gsp_sema_service.c
index abb865d..e5e1000 100644
--- a/kernel/gsp_sema_service.c
+++ b/kernel/gsp_sema_service.c
@@ -11953,14 +11953,14 @@ static u32 svc_gl_draw_walk(const u32 *win, u32 n, u32 base_word,
if ((op <= 3u || op == 5u) && cnt && r + 1u + cnt <= n)
span = 1u + cnt;
runs++;
- for (k = 0; k < span; k++) {
- u32 m;
-
- if (k && !incr)
- break;
- m = m0 + 4u * k;
- if (m != 0x3910u && m != 0x3914u)
- continue;
+ /*
+ * eng89p: header-only match. The DRAW_IAB call is its own
+ * run header (0xa00a0e44: op=5, cnt=10, m0=0x3910); an
+ * interior word of a wide op=1/3 state run (m0=0x804,
+ * span=4353) also lands on 0x3910 and produced the
+ * c997-c1001 false positive that starved the real call.
+ */
+ if (m0 == 0x3910u || m0 == 0x3914u) {
if (!found) {
*at = r;
*span_out = span;
@@ -11970,9 +11970,10 @@ static u32 svc_gl_draw_walk(const u32 *win, u32 n, u32 base_word,
svc_gl_draw_scan_log++;
pr_info("sema-gl: DRAW-HIT h=0x%x push=0x%llx off=%u m=0x%x op=%u cnt=%u span=%u\n",
ch->h_object, push_va,
- base_word + r, m, op, cnt, span);
+ base_word + r, m0, op, cnt, span);
}
}
+ (void)k;
r += span;
}
*runs_out = runs;
@@ -12266,13 +12267,10 @@ static bool svc_gl_chunk_has_draw_ia(const u32 *win, u32 n)
if ((op <= 3u || op == 5u) && cnt && r + 1u + cnt <= n)
span = 1u + cnt;
- for (k = 0; k < span; k++) {
- if (k && !incr)
- break;
- if (m0 + 4u * k == 0x3910u ||
- m0 + 4u * k == 0x3914u)
- return true;
- }
+ /* eng89p: header-only (see svc_gl_draw_walk). */
+ if (m0 == 0x3910u || m0 == 0x3914u)
+ return true;
+ (void)k;
r += span;
}
return false;