Skip to content

more hardening#20

Merged
ngc92 merged 4 commits intomasterfrom
defence-against-the-dark-arts-4
Mar 4, 2026
Merged

more hardening#20
ngc92 merged 4 commits intomasterfrom
defence-against-the-dark-arts-4

Conversation

@ngc92
Copy link
Collaborator

@ngc92 ngc92 commented Mar 4, 2026

make test seed invisible on the python stack

Copy link
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

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

Pull request overview

This PR hardens the isolated benchmark runner by moving benchmark configuration (signature/seed/repeats) out of Python function arguments and into a runner-controlled pipe read by the C++ layer before untrusted code is imported/executed.

Changes:

  • Replace Python→C++ argument passing of seed/repeats with a pipe-fed config parsed in C++ (read_benchmark_parameters).
  • Update the nanobind do_bench binding and Python subprocess target accordingly.
  • Add BenchmarkResult.success and update the grayscale test script to use it.

Reviewed changes

Copilot reviewed 5 out of 5 changed files in this pull request and generated 5 comments.

Show a summary per file
File Description
test/grayscale.py Switches success indicator logic to use BenchmarkResult.success.
python/pygpubench/__init__.py Moves config into a pipe, renames bench impl to private, and adds BenchmarkResult.success.
csrc/manager.h Introduces BenchmarkParameters and updates BenchmarkManager constructor signature.
csrc/manager.cpp Implements pipe config parsing and triggers gc.collect() before importing untrusted kernel code.
csrc/binding.cpp Updates the nanobind binding signature to accept an input fd and read config in C++.

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

Copy link
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

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

Pull request overview

Copilot reviewed 5 out of 5 changed files in this pull request and generated 4 comments.


💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

@ngc92 ngc92 force-pushed the defence-against-the-dark-arts-4 branch from 3de0205 to 8e657c0 Compare March 4, 2026 17:15
@ngc92 ngc92 requested a review from Copilot March 4, 2026 17:59
Copy link
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

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

Pull request overview

Copilot reviewed 5 out of 5 changed files in this pull request and generated 3 comments.


💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

@ngc92 ngc92 merged commit a553dd2 into master Mar 4, 2026
7 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants