Skip to content
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

Make relax_verifier() into one instruction #280

Merged
merged 1 commit into from
Aug 2, 2022

Conversation

kevsecurity
Copy link
Contributor

relax_verifier() is used to cause the verifier to add a prune point that
can be helpful in reducing the overall complexity. It does this by
calling get_smp_processor_id(); in order to prevent the call from being
optimised out, its result is stored in a register and marked with the
unused attribute. This results in two assembler instructions, one for
the call and one to store the result. It also potentially causes a
register spill.

This commit changes relax_verifier() into a single assembler instruction
to call the helper. This reduces the overall instruction count and
reduces complexity.

Signed-off-by: Kevin Sheldrake [email protected]

relax_verifier() is used to cause the verifier to add a prune point that
can be helpful in reducing the overall complexity. It does this by
calling get_smp_processor_id(); in order to prevent the call from being
optimised out, its result is stored in a register and marked with the
unused attribute. This results in two assembler instructions, one for
the call and one to store the result. It also potentially causes a
register spill.

This commit changes relax_verifier() into a single assembler instruction
to call the helper. This reduces the overall instruction count and
reduces complexity.

Signed-off-by: Kevin Sheldrake <[email protected]>
@kevsecurity kevsecurity requested a review from a team as a code owner August 2, 2022 15:26
@kevsecurity kevsecurity requested a review from tixxdz August 2, 2022 15:26
@jrfastab jrfastab merged commit e820e95 into main Aug 2, 2022
@jrfastab jrfastab deleted the pr/kevsecurity/makeRelaxVerifierOneInsn branch August 2, 2022 16:59
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