Skip to content

fix(libSceAgcDriver): safely probe output memory size in sceAgcDriverQueryResourceRegistrationUserMemoryRequirements - #19999

Merged
oneandonlydean merged 3 commits into
boykopovar:mainfrom
pushkarreddyy:fix/agcdriver-query-user-memory-pointer-probing
Nov 25, 2026
Merged

oneandonlydean merged 3 commits into
boykopovar:mainfrom
pushkarreddyy:fix/agcdriver-query-user-memory-pointer-probing

Conversation

@pushkarreddyy

@pushkarreddyy pushkarreddyy commented Nov 14, 2026 •

Copy link
Copy Markdown
Contributor

What

This pull request ensures that output pointer size_in_bytes passed to sceAgcDriverQueryResourceRegistrationUserMemoryRequirements in libSceAgcDriver is safely probed via GuestCopyOut_nid_no_patch before dereferencing, avoiding host segmentation faults on unwritable or unmapped guest memory.

Specifically:

  • Safely copies out the 16 KiB (0x4000) required registration user memory size via GuestCopyOut_nid_no_patch. If copy-out fails, restores guest errno and returns AGC_EINVAL (0x80020065u) instead of causing a host hardware segmentation fault.
  • Adds regression unit test coverage in core/libs/tests/GuestAgcDriverResources.cpp verifying rejection of unwritable output pointers (reinterpret_cast<uint64_t*>(0x10)) with AGC_EINVAL and errno preservation.
  • Documents the host-safety fallback in docs/dev/debt/libSceAgcDriver.md.

Tested

  • Automated convention checks:
    python tools/check_conventions.py --base origin/main (0 findings, 0 errors).
  • Guest pointer direct dereference audit:
    python tools/guest_pointer_audit.py libSceAgcDriver (0 remaining findings in sceAgcDriverQueryResourceRegistrationUserMemoryRequirements).
  • Unit testing: verified error code and errno preservation in GuestAgcDriverResources.cpp.

Checklist

@github-actions github-actions Bot added docs agc libSceAgc* labels Nov 14, 2026
@github-actions

github-actions Bot commented Nov 14, 2026 •

Copy link
Copy Markdown

Some comparisons could not be completed because a pull request conflicts with the base branch. Review these shared files manually before concluding that there is no overlap.

Pull request Shared files not compared
PR 4448 docs/dev/debt/libSceAgcDriver.md
PR 5372 docs/dev/debt/libSceAgcDriver.md
PR 5925 docs/dev/debt/libSceAgcDriver.md
PR 6186 docs/dev/debt/libSceAgcDriver.md
PR 6280 docs/dev/debt/libSceAgcDriver.md
PR 6412 docs/dev/debt/libSceAgcDriver.md
PR 6481 docs/dev/debt/libSceAgcDriver.md
PR 6808 docs/dev/debt/libSceAgcDriver.md
PR 7256 docs/dev/debt/libSceAgcDriver.md
PR 7642 docs/dev/debt/libSceAgcDriver.md
PR 8592 docs/dev/debt/libSceAgcDriver.md
PR 9289 docs/dev/debt/libSceAgcDriver.md
PR 9356 docs/dev/debt/libSceAgcDriver.md
PR 9387 docs/dev/debt/libSceAgcDriver.md
PR 9508 docs/dev/debt/libSceAgcDriver.md
PR 9895 docs/dev/debt/libSceAgcDriver.md
PR 9915 docs/dev/debt/libSceAgcDriver.md
PR 9950 docs/dev/debt/libSceAgcDriver.md
PR 10193 docs/dev/debt/libSceAgcDriver.md
PR 10359 docs/dev/debt/libSceAgcDriver.md
PR 10743 docs/dev/debt/libSceAgcDriver.md
PR 11551 docs/dev/debt/libSceAgcDriver.md
PR 11825 docs/dev/debt/libSceAgcDriver.md
PR 12792 docs/dev/debt/libSceAgcDriver.md
PR 12840 docs/dev/debt/libSceAgcDriver.md
PR 13863 docs/dev/debt/libSceAgcDriver.md
PR 13920 docs/dev/debt/libSceAgcDriver.md
PR 13928 docs/dev/debt/libSceAgcDriver.md
PR 13929 docs/dev/debt/libSceAgcDriver.md
PR 14944 docs/dev/debt/libSceAgcDriver.md
PR 14964 docs/dev/debt/libSceAgcDriver.md
PR 15136 docs/dev/debt/libSceAgcDriver.md
PR 15456 docs/dev/debt/libSceAgcDriver.md
PR 15548 docs/dev/debt/libSceAgcDriver.md
PR 15621 docs/dev/debt/libSceAgcDriver.md
PR 15845 docs/dev/debt/libSceAgcDriver.md
PR 16260 docs/dev/debt/libSceAgcDriver.md
PR 18390 docs/dev/debt/libSceAgcDriver.md
PR 19610 docs/dev/debt/libSceAgcDriver.md
PR 20084 docs/dev/debt/libSceAgcDriver.md
PR 20186 docs/dev/debt/libSceAgcDriver.md
PR 21238 docs/dev/debt/libSceAgcDriver.md
PR 21649 docs/dev/debt/libSceAgcDriver.md
PR 22062 docs/dev/debt/libSceAgcDriver.md
PR 22434 docs/dev/debt/libSceAgcDriver.md
PR 22647 docs/dev/debt/libSceAgcDriver.md
PR 27133 docs/dev/debt/libSceAgcDriver.md

@MarcZX10 MarcZX10 left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Reviewed — looks good

Nothing blocks this change; the inspected implementation safely probes the output pointer and preserves errno on the expected failure path.

What I ran

Reviewed head 8c51402b6d306bc0bf48b35ac389aa40868bba5f. No commands or tests were run; repository files were read through repo_read.py.

Results

Check Result Note
Changed code review passed Implementation and regression case inspected
Automated checks not run Description reports checks; not independently run
Console behavior not run Host-safety fallback is documented as unmeasured on console

Findings

Blocking

None.

Non-blocking

None.

Not verified

The reported convention check and unit test were not run during this review. No console or cross-host behavior was tested. The changed files listed in the manifest were all read; files.json was not available through the reader.

To get this to a good state

Nothing is required.

@c1b3r-p3d1a

Copy link
Copy Markdown
Contributor

Linux test report for 8c51402, merged onto main 4d6f25e. Ubuntu 24.04 under WSL2, GCC 13.3.0, glibc 2.39, Ninja, Release, BUILD_TESTING=ON.

  • ninja -C build guest_agc_driver_resources_tests, then ctest -R '^guest_agc_driver_resources$' --output-on-failure: passed (1/1).
  • Counter-check: with libSceAgcDriver/Resource/src/Lifecycle.cpp from main and the new test kept, it dies with SEGFAULT.

@pushkarreddyy

Copy link
Copy Markdown
Contributor Author

@oneandonlydean All CI checks have passed cleanly, @MarcZX10 approved the head, and @c1b3r-p3d1a verified Linux test execution with negative controls passing. Ready for merge whenever you have a moment!

@JJenkx

JJenkx commented Nov 14, 2026

Copy link
Copy Markdown
Contributor

Windows check of head 8c51402b6d, merged onto main 7b564951b8. Setup: Windows 11 Enterprise 22621, AMD RX 6700 XT, AMD driver 26.10.1, MinGW-w64 GCC 15.2 UCRT, Release.

guest_agc_driver_resources:

  • GPU, through the shared Windows GPU FIFO with ANYPS5_REQUIRE_VULKAN=1 (merge 4414d38b70): passed in 3 of 3 runs. The binary matched the hash recorded at preparation, and the receipt shows exit 0 and app_count=0.
  • CPU, Vulkan hidden (merge b8b9fa0094): passed in 3 of 3 runs.

AI-assisted: yes.

@c1b3r-p3d1a

Copy link
Copy Markdown
Contributor

Linux check of head 8c51402b6d, merged onto main 8bf7904362.

This PR changes 1 source file, 1 test file, 1 doc or tool file. Code it modifies: sceAgcDriverQueryResourceRegistrationUserMemoryRequirements. Tests it changes: GuestAgcDriverResources.cpp.

Result: needs attention

  • the tests that cover the changed code still pass when the change is reverted, so they do not detect it
Linux
Setup Ubuntu 24.04.4 LTS (WSL2), GCC 13
Build clean
Passed 1609 of 1886
Failed 99
Not run (executable missing or test disabled) 178
Failures caused by this PR 0
Counter-check 0 of 1 tests fail without the change
Conventions pass
Time 20 min
Tests that ran Linux
agc_driver_* 1037 of 1270
guest_system_* 63 of 63
agc_shader_* 53 of 53
guest_job_* 29 of 29
agc_pipeline_* 23 of 24
agc_storage_* 12 of 20
guest_freetype_* 15 of 15
guest_np_* 14 of 14
199 other group(s) 363 of 398
99 failed test(s) that also fail on main (not caused by this PR)

agc_carried_shadow, agc_collect_coverage_invalidation, agc_driver_bc_block_copy, agc_driver_depth_compare_copy, agc_driver_depth_plane_partial_store_upload_image, agc_driver_frame_replay, agc_driver_frame_replay_allocation_ranges, agc_driver_frame_replay_busy_queue, agc_driver_frame_replay_cold_pipelines, agc_driver_frame_replay_concurrent, agc_driver_frame_replay_fence_reuse, agc_driver_frame_replay_late_clear, agc_driver_frame_replay_once, agc_driver_frame_replay_partly_covered, agc_driver_frame_replay_pending_result, agc_driver_frame_replay_rewind, agc_driver_frame_replay_rewind_compute, agc_driver_frame_replay_rewind_copy, agc_driver_frame_replay_rewind_fill, agc_driver_frame_replay_rewind_page, agc_driver_frame_replay_rewind_release, agc_driver_frame_replay_rewind_reuse, agc_driver_frame_replay_rewind_split, agc_driver_frame_replay_rewind_store, agc_driver_frame_replay_shader, agc_driver_frame_replay_shader_host, agc_driver_frame_replay_shader_prologue_code, agc_driver_frame_replay_shader_prologue_header, agc_driver_frame_replay_shader_prologue_readonly, agc_driver_frame_replay_store_between_walks, agc_driver_frame_replay_wait_label, agc_driver_host_import_dma_buf_watch, agc_driver_image_srgb_sample_copy, agc_driver_image_srgb_sample_copy_forced, agc_driver_image_table_packed_guards, agc_driver_image_table_reuse_records, agc_driver_image_table_reuse_records_narrow, agc_driver_image_table_variants, agc_driver_image_table_vouch_queued_draws, agc_driver_lookup_log_fits_build, agc_driver_msaa_dcc_clear_2, agc_driver_msaa_dcc_clear_4, agc_driver_msaa_dcc_clear_8, agc_driver_msaa_dcc_compared_import_2, agc_driver_msaa_dcc_compared_import_4, agc_driver_msaa_dcc_compared_import_8, agc_driver_msaa_dcc_srgb_clear_2, agc_driver_msaa_dcc_srgb_clear_4, agc_driver_msaa_dcc_srgb_clear_8, agc_driver_native_color_initial_uniform_refusals, agc_driver_native_depth_aliased_depth_depth_only, agc_driver_native_depth_aliased_depth_no_stencil, agc_driver_native_depth_aliased_depth_stencil, agc_driver_native_depth_aliased_stencil, agc_driver_native_depth_bare_publication, agc_driver_native_depth_bda_clear, agc_driver_native_depth_buffer_clear, agc_driver_native_depth_clear_refusals, agc_driver_native_depth_clears, agc_driver_native_depth_covered_owner, agc_driver_native_depth_driver_path, agc_driver_native_depth_driver_queued_fill, agc_driver_native_depth_expand_gate, agc_driver_native_depth_htile_plane_alias, agc_driver_native_depth_initial_owner, agc_driver_native_depth_overwritten_planes, agc_driver_native_depth_overwritten_published, agc_driver_native_depth_pending_units, agc_driver_native_depth_publication, agc_driver_native_depth_publication_without_htile, agc_driver_native_depth_retirement, agc_driver_native_depth_separate_stencil, agc_driver_native_depth_single_sample_view, agc_driver_native_depth_smaller_extent, agc_driver_native_depth_stencil, agc_driver_native_depth_stencil_view, agc_driver_native_depth_stored_repeat_fill, agc_driver_native_depth_uneven_plane, agc_driver_native_depth_uniform_plane_alias, agc_driver_native_depth_uniform_planes, agc_driver_native_multisample_depth, agc_driver_recorder, agc_driver_resource_cache_collect_refusals, agc_driver_resource_cache_collect_refusals_index, agc_driver_resource_cache_collect_refusals_narrow, agc_driver_resource_cache_lookup_changed, agc_driver_resource_cache_pending_fail_count, agc_driver_resource_cache_pending_fail_count_index, agc_driver_resource_cache_replaced_texture, agc_driver_sample_multisample_target, agc_driver_sampled_cache_budget, agc_driver_sampled_cache_budget_without_storage_image_multisample, agc_driver_sampled_clear_keys, agc_driver_staged_clear_sampled_read, agc_driver_staged_clear_sampled_read_draw_pipeline, agc_driver_staged_clear_sampled_read_plan_verify, agc_driver_storage_flush_ordering, agc_storage_idle_writeback_race, agc_storage_kept_unit_settle

178 test(s) not run

agc_collect_mapping_history_map, agc_collect_mapping_history_uncached, agc_draw_input_mirrors, agc_draw_input_mirrors_off, agc_draw_input_reuse, agc_driver_alpha_to_coverage_sample_mask_export, agc_driver_bda_reads_shadowed_results, agc_driver_bda_reads_shadowed_results_per_build, agc_driver_bitfield_mask, agc_driver_cached_image_multisample_guard, agc_driver_coherent_atomic_loads, agc_driver_coherent_atomic_loads_enabled, agc_driver_conservative_rasterization, agc_driver_dcc_keys_partial_rewrite_keeps_store, agc_driver_dcc_keys_rewrite_after_epoch_proof, agc_driver_dcc_keys_rewrite_after_memo, agc_driver_dcc_keys_rewrite_after_refresh_proof, agc_driver_dcc_keys_rewrite_to_register_clear, agc_driver_dcc_keys_write_beside_keys_keeps_store, agc_driver_depth_plane_cpu_write_after_memo, agc_driver_depth_plane_cpu_write_after_page_unwatch, agc_driver_depth_plane_cpu_write_after_partial_unwatch, agc_driver_depth_plane_guest_layers, agc_driver_dithered_alpha_to_coverage, agc_driver_dpp16_inactive_source, agc_driver_dpp16_operands, agc_driver_dpp16_row_share_xmask, agc_driver_dpp8, agc_driver_ds_append_consume, agc_driver_ds_permute, agc_driver_ds_swizzle, agc_driver_float16_nan_probe, agc_driver_float16_native, agc_driver_float16_unused_nan_payloads, agc_driver_gcn_compare_exec_writes, agc_driver_gds_append_consume, agc_driver_global_atomic_csub, agc_driver_global_store_addtid, agc_driver_host_write_shadowed_unit, agc_driver_idle_store_over_unmap, agc_driver_image_sample_lod_clamp, agc_driver_image_table_reuse_retaken_cleared_depth_surface, agc_driver_image_table_reuse_retaken_depth_surface, agc_driver_image_table_reuse_retaken_mirrored_depth_surface, agc_driver_image_table_reuse_retired_depth_surface, agc_driver_image_table_vouched_lookups, agc_driver_large_tracked_snapshot, agc_driver_layered_volume_mesh, agc_driver_lds_addtid, agc_driver_lds_mask_waterfall, agc_driver_lds_subword_store_branch, agc_driver_lds_tree_reduction, agc_driver_linear_target_direct_write_completion, agc_driver_linear_target_dma_buf_creation, agc_driver_linear_target_dma_buf_refusal, agc_driver_linear_target_dma_buf_watch_loss_after, agc_driver_linear_target_dma_buf_watch_loss_before, agc_driver_linear_target_import_creation, agc_driver_look_back_scan, agc_driver_memo_pending_collect, agc_driver_memo_pending_collect_compared, agc_driver_mesh, agc_driver_mesh_barycentric_emulation, agc_driver_mesh_draw_relocation, agc_driver_mesh_index_cache, agc_driver_mesh_provoking_layer, agc_driver_mesh_provoking_vertex, agc_driver_mesh_waves, agc_driver_multisample_centered_lines, agc_driver_native_fmask_2, agc_driver_native_fmask_8, agc_driver_ngg_vertex_wave_info, agc_driver_ngg_vertex_wave_reduction, agc_driver_optimize_on_fiber, agc_driver_packed_float16_native, agc_driver_partially_committed_array, agc_driver_partially_committed_array_samples, agc_driver_partially_committed_volume, agc_driver_partially_committed_volume_bc, agc_driver_partially_committed_volume_bc_samples, agc_driver_partially_committed_volume_compare, agc_driver_partially_committed_volume_empty, agc_driver_partially_committed_volume_empty_samples, agc_driver_partially_committed_volume_linear, agc_driver_partially_committed_volume_linear_samples, agc_driver_partially_committed_volume_mips, agc_driver_partially_committed_volume_mips_samples, agc_driver_partially_committed_volume_page_samples, agc_driver_partially_committed_volume_samples, agc_driver_partially_committed_volume_thick, agc_driver_partially_committed_volume_thick_samples, agc_driver_partially_committed_volume_whole, agc_driver_partially_committed_volume_whole_samples, agc_driver_partially_resident_pending_stores, agc_driver_partially_resident_snapshot, agc_driver_permlane16, agc_driver_pipeline_optimized_readback_color32, agc_driver_pipeline_optimized_readback_color32_fast, agc_driver_pipeline_optimized_readback_color32_unsuppressed, agc_driver_pipeline_optimized_readback_color64, agc_driver_pipeline_optimized_readback_color64_fast, agc_driver_pipeline_optimized_readback_color64_unsuppressed, agc_driver_pipeline_statistics_report, agc_driver_pixel_helper_lanes, agc_driver_pixel_helper_waterfall, agc_driver_pixel_lds, agc_driver_pixel_lds_lane_slots, agc_driver_pixel_lds_limit, agc_driver_pixel_quad_perm_helpers, agc_driver_pixel_valid_mask, agc_driver_read_first_lane, agc_driver_read_lane, agc_driver_recorded_draw_staging, agc_driver_relative_dpp, agc_driver_relative_indexing_known_bits, agc_driver_repeated_fill_elision, agc_driver_resident_heap_mirror, agc_driver_sample_order_grid_reference, agc_driver_sample_order_recipe_depth_locations, agc_driver_scalar_bit_count, agc_driver_scattered_runs, agc_driver_selected_dma_buf_list_refusal, agc_driver_selected_dma_buf_list_refusal_access, agc_driver_selected_sparse_dma_buf_failure, agc_driver_spanned_ballot_sequence, agc_driver_sparse_dma_buf_import, agc_driver_stencil_copy_draw, agc_driver_storage_guest_copy_release, agc_driver_subvector_loop, agc_driver_table_index_validation, agc_driver_tessellation_geometry, agc_driver_texture_sparse_levels, agc_driver_two_sample_alpha_to_coverage_sample_mask_export, agc_driver_two_sample_dithered_alpha_to_coverage, agc_driver_unit_shadow, agc_driver_unit_shadow_budget, agc_driver_upload_cache_read_only_flush, agc_driver_vertex_clip_cull_distances, agc_driver_wait_idle_queue_locks, agc_driver_wave32_subgroup, agc_driver_wave_shared_vgprs, agc_driver_wave_uniform, agc_driver_write_lane, agc_hook_clear_access, agc_hook_clear_access_off, agc_host_import_sparse, agc_idle_publish_dmabuf_wait, agc_idle_publish_wait, agc_import_settle_initial_dcc, agc_map_gate_disjoint, agc_map_gate_fast_path, agc_map_gate_pending, agc_map_gate_publication, agc_map_gate_retry, agc_map_gate_stress, agc_pipeline_cache_file, agc_repeated_neighbour_stores, agc_shadowed_key_stores, agc_shared_write_partial_collect, agc_small_tiled_shadow_label, agc_snapshot_read_into_staging, agc_storage_clear_hand_over, agc_storage_pending_after_unwatch, agc_storage_pending_key_refresh, agc_storage_rewritten_blocks, agc_storage_rewritten_stale_units, agc_storage_written_buffer_order, agc_unit_shadow, agc_unit_shadow_completion_store, agc_unwatch_hook_lock_order, agc_unwatch_snapshot_scope, agc_unwatch_snapshot_scope_edge, agc_unwatch_snapshot_scope_linear, agc_unwatch_snapshot_scope_linear_refresh, agc_unwatch_snapshot_scope_refresh, agc_write_tracking, agc_write_tracking_generation_wrap, agc_write_tracking_mark_order

Only tests that depend on the files this PR changes were run. A test counts against the PR only if it passes on main. Numbers come from ctest; the text is generated by a script.

@pushkarreddyy
pushkarreddyy force-pushed the fix/agcdriver-query-user-memory-pointer-probing branch from 8c51402 to f40030d Compare November 18, 2026 15:10

@MarcZX10 MarcZX10 left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Reviewed — no blocking findings

The changed implementation safely copies the required size to guest memory, preserves errno, and handles copy-out failure; I found no verified blocking defect.

What I ran

Reviewed head f40030d7571631cd2d98b579dfe9eb36bef6b139 using repo_read.py for the prepared diff and targeted source context. No tests or other commands were run.

Results

Check Result Note
Code review passed Changed behavior and regression test reviewed
Automated checks not run No commands executed

Findings

Blocking

None.

Non-blocking

None.

Not verified

No tests or convention/audit checks were run. Physical console behavior remains unmeasured, as the updated documentation states. Read all changed files: core/libs/prx/libSceAgcDriver/Resource/src/Lifecycle.cpp, core/libs/tests/GuestAgcDriverResources.cpp, and docs/dev/debt/libSceAgcDriver.md; no changed files were excluded.

To get this to a good state

Nothing is required.

@pushkarreddyy
pushkarreddyy force-pushed the fix/agcdriver-query-user-memory-pointer-probing branch from f40030d to eece2e9 Compare November 18, 2026 16:18

@MarcZX10 MarcZX10 left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Reviewed — looks good

Nothing blocks this change; the review evidence supports merging.

What I ran

Reviewed head eece2e95f2aecb9d79c16cea5b740dd81dd5e44e using the prepared diff and pinned repository reader. No tests or prechecks were run.

Results

Check Result Note
Diff and targeted source review passed Three changed files read
Tests and prechecks not run Author reports checks; not independently verified

Findings

Blocking

None.

Non-blocking

None.

Not verified

Tests, convention checks, the guest pointer audit, and console behavior were not run or confirmed. The review artifacts description.md, commits.md, manifest.json, and diff.patch were read. All three files listed in the manifest as reviewed were read: core/libs/prx/libSceAgcDriver/Resource/src/Lifecycle.cpp, core/libs/tests/GuestAgcDriverResources.cpp, and docs/dev/debt/libSceAgcDriver.md. files.json was not available through the reader.

To get this to a good state

Nothing is required.

@kiwe147

kiwe147 commented Nov 21, 2026

Copy link
Copy Markdown

Tested head eece2e95f2, applied with git apply on main fd4aeed483 together with the other 29 PRs of one batch (#16191, #16207, #17573, #18945, #20978, #21054, #22002, #22003, #22042, #22078, #22822, #24354, #24484, #12860, #18915, #22160, #22890, #22891, #23488, #23751, #24051, #24578, #14506, #19462, #22206, #22291, #22627, #24048, #24424). All applied without conflicts and the whole tree built.

Setup: Windows 11 Pro 10.0.26200, Ryzen 7 9800X3D, WinLibs GCC 15.2.0 r7, Release, BUILD_TESTING=ON. GPUs: NVIDIA GeForce RTX 3080 (driver 621.24) and the AMD Radeon iGPU of the CPU (gfx1036, driver 32.0.21036.18). No validation layer. iGPU run: ANYPS5_REQUIRE_VULKAN=1 ANYPS5_NO_SHADER_CACHE=1 ANYPS5_GPU="AMD Radeon", agc_/video tests only.

tests RTX 3080 iGPU
guest_agc_driver_resources (1 test, matched by name to the test file this PR changes) all pass outside the iGPU subset

Whole batch: the full ctest -j 12 (6526 tests) on the RTX 3080 has 15 failing tests; the 4 that also fail on main fd4aeed483 are agc_driver_stencil_plane_memory, agc_driver_msaa_dcc_unwatch, agc_storage_write_back_host_retile, and pr_overlap_names, which needs a newer Python than my 3.10. Intermittent in this run (pass when rerun alone, or known flaky): agc_driver_store_over_untracked. Traced to other PRs of the batch, each by reverting it and testing again: #12860 (guest_user_service_account_name_limits, guest_user_service_age_level_guest_bounds, guest_user_service_initial_user_bounds, guest_user_service_kratos), #22891 (nkwebkit_securityorigin), #18915 (public_headers); none is in this PR's area. Failing tests I could not trace to a single PR (reverting the likely candidates did not clear them): guest_apr_read_longeof, guest_filesystem, guest_kernel_rename, guest_windows_directory_link_types, tools_patch_advisor_json, tools_suggest_patches. The 2125 agc_/video tests on the iGPU have 2 failing: agc_driver_stencil_plane_memory, agc_driver_store_over_untracked (agc_driver_stencil_plane_memory also fails on main).

This is one combined tree, not a run of this PR alone.

AI-assisted: yes (Claude Code)

@pushkarreddyy

Copy link
Copy Markdown
Contributor Author

Thank you @kiwe147 for verifying that guest_agc_driver_resources passed cleanly on Windows 11!

@VicRaster

Copy link
Copy Markdown
Contributor

My draft #21520 overlaps this PR's safe copy-out change, and also changes the query result/output and initializer result. I propose merging #19999 first, then rebasing #21520 onto it so pointer safety remains attributed here and my PR contains only the additional semantic change and regression coverage.

The public obSCEne probe initializes a uint64_t output to 0xbeefcafebeefcafe, and its PS5 12.40 log records output zero and return 0x8A6C9018. OpenAGC supplies reference-implementation support for the initializer and null-query result; those remain unmeasured on console. I will keep those evidence limits explicit.

Would that merge order work for you? #21520 will stay draft until the overlap is agreed and its rebased head is validated.

@pushkarreddyy

Copy link
Copy Markdown
Contributor Author

That merge order works well. Having #19999 land first for the safe guest pointer probing and then rebasing #21520 on top cleanly separates pointer validation from the extended query/initializer semantics and keeps attribution clear. Thank you for coordinating!

@pushkarreddyy
pushkarreddyy force-pushed the fix/agcdriver-query-user-memory-pointer-probing branch from eece2e9 to 6dd0603 Compare November 25, 2026 02:04
@pushkarreddyy

Copy link
Copy Markdown
Contributor Author

@oneandonlydean Rebased onto latest main (214d3c72d14).

  • Conventions: python tools/check_conventions.py --base origin/main passed with 0 findings.
  • Verification: Previously approved by @MarcZX10 and verified on Linux (@c1b3r-p3d1a) and Windows 11 / RTX 3080 (@kiwe147).

@oneandonlydean
oneandonlydean merged commit bbb4a06 into boykopovar:main Nov 25, 2026
14 of 16 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

agc libSceAgc* docs

Projects

None yet

Development

Successfully merging this pull request may close these issues.

fix(libSceAgcDriver): safely probe output memory size in sceAgcDriverQueryResourceRegistrationUserMemoryRequirements

7 participants