-
Notifications
You must be signed in to change notification settings - Fork 5.3k
[clr-interp] Access checks and callouts #120581
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
[clr-interp] Access checks and callouts #120581
Conversation
There was a problem hiding this 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 adds support for visibility and access checks to the CLR interpreter, along with a debugging feature. The main purpose is to implement security checks during interpretation by utilizing the JIT interface's existing access control mechanisms and injecting helper function calls when access violations are detected.
Key changes:
- Adds two new interpreter opcodes for calling helper functions with 2 and 3 pointer arguments
- Implements access control checks throughout the interpreter compiler for field access, method calls, and class operations
- Adds
DOTNET_InterpBreakdebug configuration option similar toDOTNET_JitBreak
Reviewed Changes
Copilot reviewed 5 out of 5 changed files in this pull request and generated 2 comments.
Show a summary per file
| File | Description |
|---|---|
src/coreclr/vm/interpexec.cpp |
Adds execution logic for new helper call opcodes with 2 and 3 arguments |
src/coreclr/interpreter/interpconfigvalues.h |
Adds InterpBreak configuration option for debugging |
src/coreclr/interpreter/inc/intops.def |
Defines two new opcodes for helper function calls |
src/coreclr/interpreter/compiler.h |
Declares new method for emitting callsite callout instructions |
src/coreclr/interpreter/compiler.cpp |
Implements access checks and callout emission throughout compilation |
|
Tagging subscribers to this area: @BrzVlad, @janvorli, @kg |
Co-authored-by: Copilot <[email protected]>
…wrighton/runtime into access_checks_and_callouts
Add support for visibility and access checks, as well as ambiguous function identification
As a drive-by feature, add support for DOTNET_InterpBreak which works like DOTNET_JitBreak in that it will cause the interpreter compiler to assert when a function is about to go through the interpreter compiler. This is useful to make it easy to debug the interpreter compiler compiling a specific method.