Skip to content

Commit

Permalink
Fix gate replacement for non-EPT backends.
Browse files Browse the repository at this point in the history
  • Loading branch information
UniformlyR4ndom committed Dec 21, 2021
1 parent 9970ccc commit 5553c25
Showing 1 changed file with 6 additions and 2 deletions.
8 changes: 6 additions & 2 deletions kraft/app/app.py
Original file line number Diff line number Diff line change
Expand Up @@ -837,18 +837,22 @@ def simple_replace(template_path, path, marker, shstack_enabled=True):
add_local_linkerscript(lib, fulldiff=fulldiff)

# then generate cocci files dynamically from the template
gr_rule_template = get_sec_rule("gatereplacer.cocci.in")
if is_ept:
gr_rule_template = get_sec_rule("gatereplacer_ept.cocci.in")
else:
gr_rule_template = get_sec_rule("gatereplacer.cocci.in")
if FCALLS_enabled:
cb_rule_template = get_sec_rule("rmcallbacks.cocci.in")
else:
cb_rule_template = get_sec_rule("callbackreplacer.cocci.in")

gr_rule_template = gr_rule_template.replace("{{ comp_cur_nb }}",
str(lib.compartment.number))
ept_rpc_id_prefix = "_RPC_ID_" if is_ept else ""
cb_rule_template = cb_rule_template.replace("{{ comp_cur_nb }}",
str(lib.compartment.number))
gr_rule = ""

ept_rpc_id_prefix = "_RPC_ID_" if is_ept else ""
if (is_ept):
rpc_id_gen_template = get_sec_rule("rpc_id_gen.cocci.in")
rpc_id_gen_template = rpc_id_gen_template.replace("{{ filename }}",
Expand Down

0 comments on commit 5553c25

Please sign in to comment.