diff options
| author | Arthur Hanson Rasmusson <arthur@vgpu.io> | 2026-10-23 17:19:17 -0400 |
|---|---|---|
| committer | Arthur Hanson Rasmusson <arthur@vgpu.io> | 2026-10-23 17:19:17 -0400 |
| commit | f7c626f1bcb1a031372c855db3e9e9cb545085a4 (patch) | |
| tree | 5a2c11811defcbba8bc2ff184ebb554f4365bf78 /kernel | |
| parent | 50adacc676f12e495acfb3ab5fbf7cce3baa7430 (diff) | |
| download | open-iov-f7c626f1bcb1a031372c855db3e9e9cb545085a4.tar.gz open-iov-f7c626f1bcb1a031372c855db3e9e9cb545085a4.zip | |
vgsp-sema r565: session-scope the GR exactly-once caches (cross-client VA reuse)
The UVM pool reuses the same launch push VAs for every client of a boot.
svc_gr_cap_hist[8] matches on the push VA ALONE (no content hash) and was
boot-scoped, so a previous client's capture could classify a later
client's fresh launch as already captured and skip it (LAUNCH-SKIP
(replay; already captured=1) from a dead session's record). svc_gr_seen
(hash-keyed) and svc_inline_once (content-keyed) share the same lifetime
and the same class of risk.
Reset all three in svc_session_flush; they refill within the session from
the live client's own pushes, so same-session dedup is unchanged.
Diffstat (limited to 'kernel')
| -rw-r--r-- | kernel/gsp_sema_service.c | 16 |
1 files changed, 16 insertions, 0 deletions
diff --git a/kernel/gsp_sema_service.c b/kernel/gsp_sema_service.c index d47ec08..e96a7b6 100644 --- a/kernel/gsp_sema_service.c +++ b/kernel/gsp_sema_service.c @@ -12249,6 +12249,22 @@ static void svc_session_flush(void) memset(svc_opdef_done, 0, sizeof(svc_opdef_done)); svc_opdef_done_next = 0; /* + * r565: the GR exactly-once memories are boot-scoped caches keyed + * (partly) by push VA, and the UVM pool reuses the same launch push + * VAs for every client of the boot. svc_gr_cap_hist matches on the VA + * ALONE (8 entries, no hash), so a previous client's capture could + * classify a later client's fresh launch as "already captured" and + * skip it (`LAUNCH-SKIP (replay; already captured=1)`); the hash-keyed + * svc_gr_seen and the content-keyed svc_inline_once are lower risk but + * share the same lifetime. Reset all three per session - they refill + * within the session from the live client's own pushes. + */ + memset(svc_gr_cap_hist, 0, sizeof(svc_gr_cap_hist)); + svc_gr_cap_hist_pos = 0; + memset(svc_gr_seen, 0, sizeof(svc_gr_seen)); + memset(svc_inline_once, 0, sizeof(svc_inline_once)); + svc_inline_once_next = 0; + /* * Re-arm the diagnostic log budgets per session. The first client of * a boot would otherwise spend every budget and the next session's * release path is invisible in exactly the runs that need diagnosis |
