Skip to content
This repository was archived by the owner on Jan 23, 2023. It is now read-only.

Fix checks for methods that use StackCrawlMark#9537

Merged
jkotas merged 2 commits into
dotnet:masterfrom
jkotas:StackCrawlMark
Feb 11, 2017
Merged

Fix checks for methods that use StackCrawlMark#9537
jkotas merged 2 commits into
dotnet:masterfrom
jkotas:StackCrawlMark

Conversation

@jkotas
Copy link
Copy Markdown
Member

@jkotas jkotas commented Feb 11, 2017

My recent changed these methods to be marked using IsMdRequireSecObject instead, but some
places that have to check for it were not updated correctly.

My recent changed these methods to be marked using IsMdRequireSecObject instead, but some
places that have to check for it were not updated correctly.
@jkotas
Copy link
Copy Markdown
Member Author

jkotas commented Feb 11, 2017

Fix for failures encountered in dotnet/corefx#16064

cc @stephentoub @gkhanna79

Comment thread src/vm/jitinterface.cpp

if (IsMdRequireSecObject(attribs))
{
// Assume all methods marked as DynamicSecurity are
Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

Can you please also add a similar comment at https://github.com/dotnet/coreclr/pull/9491/files#diff-6291818ea5a59bda1055bcd3e1d3dcddL12 so that it becomes obvious at the definition about its semantics?

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

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

Done.

@danmoseley
Copy link
Copy Markdown
Member

Briefly what are StackCrawlMarks for if not partial trust scenarios?

@jkotas
Copy link
Copy Markdown
Member Author

jkotas commented Feb 11, 2017

Number of APIs look at who called them and change behavior based on that. StackCrawlMarks are part of the puzzle that lets the API find who the caller was - using stackwalking.

The caller is basically passed in as an implicit argument. Alternative way to implement this would be codegen magic that recognizes these and APIs; and morphs them into calls into a different internal method that takes explicit caller argument. It is how it is done in CoreRT - it avoids the need for stackwalks.

@jkotas jkotas merged commit 15c2148 into dotnet:master Feb 11, 2017
@jkotas jkotas deleted the StackCrawlMark branch February 12, 2017 22:03
jorive pushed a commit to guhuro/coreclr that referenced this pull request May 4, 2017
* Fix checks for methods that use StackCrawlMark

My recent changed these methods to be marked using IsMdRequireSecObject instead, but some
places that have to check for it were not updated correctly.
@karelz karelz modified the milestone: 2.0.0 Aug 28, 2017
picenka21 pushed a commit to picenka21/runtime that referenced this pull request Feb 18, 2022
* Fix checks for methods that use StackCrawlMark

My recent changed these methods to be marked using IsMdRequireSecObject instead, but some
places that have to check for it were not updated correctly.

Commit migrated from dotnet/coreclr@15c2148
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

6 participants