Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
C
CFI
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Wiki
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Package Registry
Container Registry
Model registry
Operate
Environments
Terraform modules
Monitor
Incidents
Service Desk
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
Open Source Software
CFI
Commits
ed439683
Commit
ed439683
authored
6 years ago
by
Matthew McGill
Browse files
Options
Downloads
Patches
Plain Diff
Changed constant variables to const where it was not problematic
parent
831df994
No related branches found
No related tags found
No related merge requests found
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
scfi_instr.hpp
+15
-15
15 additions, 15 deletions
scfi_instr.hpp
with
15 additions
and
15 deletions
scfi_instr.hpp
+
15
−
15
View file @
ed439683
...
...
@@ -144,29 +144,29 @@ class SCFI_Instrument
// predecessors of instructions.
libIRDB
::
InstructionPredecessors_t
preds
;
libIRDB
::
FileIR_t
*
firp
;
int
nonce_size
;
int
exe_nonce_size
;
bool
do_coloring
;
bool
do_color_exe_nonces
;
bool
do_common_slow_path
;
bool
do_jumps
;
bool
do_calls
;
bool
do_rets
;
bool
do_multimodule
;
bool
protect_safefn
;
bool
do_exe_nonce_for_call
;
const
int
nonce_size
;
const
int
exe_nonce_size
;
const
bool
do_coloring
;
const
bool
do_color_exe_nonces
;
const
bool
do_common_slow_path
;
const
bool
do_jumps
;
const
bool
do_calls
;
const
bool
do_rets
;
const
bool
do_multimodule
;
const
bool
protect_safefn
;
const
bool
do_exe_nonce_for_call
;
std
::
unique_ptr
<
ColoredInstructionNonces_t
>
color_map
;
std
::
unique_ptr
<
ColoredInstructionNonces_t
>
exe_nonce_color_map
;
libIRDB
::
Instruction_t
*
ret_shared
;
const
libIRDB
::
Instruction_t
*
ret_shared
;
libIRDB
::
Instruction_t
*
zestcfi_function_entry
;
std
::
string
ExecutableNonceValue
;
// Exe Nonce helpers
int
EXE_NONCE_OPCODE_SIZE
=
3
;
const
int
EXE_NONCE_OPCODE_SIZE
=
3
;
// Enter opcode val in reverse-byte order, as nonce_relocs reverses the bytes before placement
// (The nonce values themselves are placed little endian, but the opcode should be placed big-endian)
int
EXE_NONCE_OPCODE_VAL
=
0x801F0F
;
// actual opcode = 0x0F1F80
int
EXE_NONCE_ARG_SIZE
=
4
;
const
int
EXE_NONCE_OPCODE_VAL
=
0x801F0F
;
// actual opcode = 0x0F1F80
const
int
EXE_NONCE_ARG_SIZE
=
4
;
/* Nonces are just bit strings. To fit them into exe
* nonces that have a limited argument size, they may need to
* be split over more than one exe nonce. To be stored as tightly
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment