Skip to content

Remove PSEUDORANDOM_NOP_INSERTION and associated code #54242

@SingleAccretion

Description

@SingleAccretion

While browsing the Jit's source, I noticed this comment:

// All code generated by this function must not contain the randomly-inserted NOPs
// that we insert to inhibit JIT spraying in partial trust scenarios.
// The PINVOKE_PROLOG op signals this to the code generator/emitter.

And the corresponding #define PSEUDORANDOM_NOP_INSERTION, which is now disabled:

/*****************************************************************************/

// The pseudorandom nop insertion is not necessary for current scenarios
// #define PSEUDORANDOM_NOP_INSERTION

/*****************************************************************************/

So the question is as in the header: do we foresee this being a useful mitigation to have in the future, and if not, should the code supporting it be removed?

cc @jkotas, @BruceForstall

category:implementation
theme:codegen
skill-level:beginner
cost:small
impact:small

Metadata

Metadata

Assignees

Labels

area-CodeGen-coreclrCLR JIT compiler in src/coreclr/src/jit and related components such as SuperPMIhelp wanted[up-for-grabs] Good issue for external contributorsin-prThere is an active PR which will close this issue when it is merged

Type

No type
No fields configured for issues without a type.

Projects

No projects

Relationships

None yet

Development

No branches or pull requests

Issue actions