diff options
| author | Arthur Hanson Rasmusson <arthur@vgpu.io> | 2026-11-16 18:46:47 -0500 |
|---|---|---|
| committer | Arthur Hanson Rasmusson <arthur@vgpu.io> | 2026-11-16 18:46:47 -0500 |
| commit | f0e34c4fb345f907727fdd3aa401465c377ae81d (patch) | |
| tree | 67293d1e8d2f7b47183cdd41d3746ad9cfc5a42a /kernel | |
| parent | a644d2540d3a25c8ed6959548c6107f76e72ad89 (diff) | |
| download | open-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')
| -rw-r--r-- | kernel/gsp_phys_booter.c | 20 | ||||
| -rw-r--r-- | kernel/gsp_sema_service.c | 30 |
2 files changed, 26 insertions, 24 deletions
diff --git a/kernel/gsp_phys_booter.c b/kernel/gsp_phys_booter.c index 0e319c1..4918731 100644 --- a/kernel/gsp_phys_booter.c +++ b/kernel/gsp_phys_booter.c @@ -19164,14 +19164,18 @@ static bool gsp_phys_gr_mme_window_has_draw_ia(const u32 *win, u32 n) if ((op == 1u || op == 3u || op == 5u) && cnt && r + 1u + cnt <= n) span = 1u + cnt; - for (k = 0; k < span; k++) { - u32 m = ((h & 0xfffu) << 2) + 4u * k; - - if (k && op != 1u && op != 3u) - break; - if (m == 0x3800u + 34u * 8u) - return true; - } + /* + * eng89p: only the RUN HEADER's own method selects a CALL. + * The client's DRAW_IAB call is a distinct header + * (0xa00a0e44: op=5 ONE_INCR, cnt=10, m0=0x3910). Matching + * interior words of a wide op=1/3 run produced the c997-c1001 + * false positive (a 4353-word state run with m0=0x804 whose + * interior offset happens to be 0x3910), so a real CALL never + * reached the held-call path. + */ + if (((h & 0xfffu) << 2) == 0x3800u + 34u * 8u) + return true; + (void)k; r += span; } return false; 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; |
