forked from unikraft/pykraft
-
Notifications
You must be signed in to change notification settings - Fork 3
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Change the build process for EPT such that IDs are used in cross-compartment calls instead of function pointers. This is necessary to restrict control flow of cross-compartment calls to actual function boundaries instead of arbitrary pointers. Also make the maximum number of threads supported by the EPT backend configurable. Signed-off-by: Sebastian Rauch <[email protected]>
- Loading branch information
1 parent
064f674
commit 7bbfdc8
Showing
5 changed files
with
195 additions
and
7 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,13 +1,65 @@ | ||
@gatereplacer_return0_{{ rule_nr }}@ | ||
identifier func; | ||
expression ret, lname; | ||
fresh identifier func_id = "{{ ept_id_prefix }}" ## func; | ||
@@ | ||
- flexos_gate_r({{ lib_dest_name }}, ret, func); | ||
+ {{ gate_r }}({{ comp_cur_nb }}, {{ comp_dest_nb }}, ret, func_id); | ||
|
||
@script:python@ | ||
func_name << gatereplacer_return0_{{ rule_nr }}.func; | ||
@@ | ||
fname = str(func_name) | ||
if fname not in entries: | ||
entries[fname] = entry_cnt | ||
entry_cnt += 1 | ||
|
||
@gatereplacer_return{{ rule_nr }}@ | ||
identifier func; | ||
expression list EL; | ||
expression ret, lname; | ||
fresh identifier func_id = "{{ ept_id_prefix }}" ## func; | ||
@@ | ||
- flexos_gate_r({{ lib_dest_name }}, ret, func, EL); | ||
+ {{ gate_r }}({{ comp_cur_nb }}, {{ comp_dest_nb }}, ret, func_id, EL); | ||
|
||
@script:python@ | ||
func_name << gatereplacer_return{{ rule_nr }}.func; | ||
@@ | ||
- flexos_gate_r({{ lib_dest_name }}, ret, EL); | ||
+ {{ gate_r }}({{ comp_cur_nb }}, {{ comp_dest_nb }}, ret, EL); | ||
fname = str(func_name) | ||
if fname not in entries: | ||
entries[fname] = entry_cnt | ||
entry_cnt += 1 | ||
|
||
@gatereplacer_noreturn0_{{ rule_nr }}@ | ||
identifier func; | ||
expression lname; | ||
fresh identifier func_id = "{{ ept_id_prefix }}" ## func; | ||
@@ | ||
- flexos_gate({{ lib_dest_name }}, func); | ||
+ {{ gate }}({{ comp_cur_nb }}, {{ comp_dest_nb }}, func_id); | ||
|
||
@script:python@ | ||
func_name << gatereplacer_noreturn0_{{ rule_nr }}.func; | ||
@@ | ||
fname = str(func_name) | ||
if fname not in entries: | ||
entries[fname] = entry_cnt | ||
entry_cnt += 1 | ||
|
||
@gatereplacer_noreturn{{ rule_nr }}@ | ||
identifier func; | ||
expression list EL; | ||
expression lname; | ||
fresh identifier func_id = "{{ ept_id_prefix }}" ## func; | ||
@@ | ||
- flexos_gate({{ lib_dest_name }}, func, EL); | ||
+ {{ gate }}({{ comp_cur_nb }}, {{ comp_dest_nb }}, func_id, EL); | ||
|
||
@script:python@ | ||
func_name << gatereplacer_noreturn{{ rule_nr }}.func; | ||
@@ | ||
- flexos_gate({{ lib_dest_name }}, EL); | ||
+ {{ gate }}({{ comp_cur_nb }}, {{ comp_dest_nb }}, EL); | ||
fname = str(func_name) | ||
if fname not in entries: | ||
entries[fname] = entry_cnt | ||
entry_cnt += 1 |