Commit 0e7cac7
Dmitrii Kuvaiskii
[PAL/Linux-SGX] Prepare AEX handler to call C code in release mode
Previously, the AEX handler only called C code (more specific to our use
case, the code that works on the untrusted-thread stack) for SGX
profiling logic and only when Gramine was built in debug mode.
As a preparation for AEX Notify support, this commit modifies the AEX
handler such that it can call C code when Gramine is built in release
mode. Also, the AEX handler logic is not restricted to SGX profiling
only, so the `_PROF`/`_prof` suffixes in related function and variable
names are removed.
This commit also adds two small prerequisites for AEX Notify: (1)
`eenter_pointer` helper so that signal handling logic can learn whether
an exception happened at EENTER instruction, and (2) dummy function
`maybe_raise_pending_signal` that will be populated in a later commit.
Signed-off-by: Dmitrii Kuvaiskii <[email protected]>1 parent 988e6b8 commit 0e7cac7
File tree
6 files changed
+34
-22
lines changed- pal/src/host/linux-sgx
6 files changed
+34
-22
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
63 | 63 | | |
64 | 64 | | |
65 | 65 | | |
66 | | - | |
| 66 | + | |
67 | 67 | | |
68 | 68 | | |
69 | 69 | | |
70 | 70 | | |
71 | 71 | | |
72 | 72 | | |
73 | | - | |
74 | | - | |
75 | 73 | | |
76 | 74 | | |
77 | 75 | | |
78 | 76 | | |
79 | 77 | | |
80 | 78 | | |
81 | | - | |
82 | | - | |
83 | | - | |
84 | | - | |
85 | | - | |
86 | | - | |
87 | 79 | | |
88 | 80 | | |
89 | 81 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
106 | 106 | | |
107 | 107 | | |
108 | 108 | | |
109 | | - | |
| 109 | + | |
110 | 110 | | |
111 | 111 | | |
112 | 112 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
14 | 14 | | |
15 | 15 | | |
16 | 16 | | |
17 | | - | |
18 | | - | |
19 | 17 | | |
| 18 | + | |
20 | 19 | | |
21 | 20 | | |
22 | 21 | | |
| |||
54 | 53 | | |
55 | 54 | | |
56 | 55 | | |
| 56 | + | |
| 57 | + | |
| 58 | + | |
| 59 | + | |
| 60 | + | |
57 | 61 | | |
58 | 62 | | |
59 | | - | |
| 63 | + | |
60 | 64 | | |
61 | 65 | | |
62 | 66 | | |
| |||
80 | 84 | | |
81 | 85 | | |
82 | 86 | | |
| 87 | + | |
| 88 | + | |
| 89 | + | |
83 | 90 | | |
84 | 91 | | |
85 | 92 | | |
86 | | - | |
87 | | - | |
88 | | - | |
| 93 | + | |
| 94 | + | |
| 95 | + | |
89 | 96 | | |
90 | 97 | | |
91 | 98 | | |
| |||
99 | 106 | | |
100 | 107 | | |
101 | 108 | | |
| 109 | + | |
102 | 110 | | |
103 | 111 | | |
104 | 112 | | |
105 | 113 | | |
106 | 114 | | |
| 115 | + | |
| 116 | + | |
| 117 | + | |
107 | 118 | | |
108 | 119 | | |
109 | 120 | | |
| |||
116 | 127 | | |
117 | 128 | | |
118 | 129 | | |
119 | | - | |
120 | | - | |
121 | 130 | | |
| 131 | + | |
| 132 | + | |
| 133 | + | |
| 134 | + | |
122 | 135 | | |
123 | 136 | | |
124 | 137 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
88 | 88 | | |
89 | 89 | | |
90 | 90 | | |
91 | | - | |
92 | | - | |
| 91 | + | |
| 92 | + | |
93 | 93 | | |
94 | 94 | | |
95 | 95 | | |
| |||
153 | 153 | | |
154 | 154 | | |
155 | 155 | | |
156 | | - | |
| 156 | + | |
157 | 157 | | |
158 | 158 | | |
159 | 159 | | |
| |||
287 | 287 | | |
288 | 288 | | |
289 | 289 | | |
| 290 | + | |
| 291 | + | |
| 292 | + | |
| 293 | + | |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
114 | 114 | | |
115 | 115 | | |
116 | 116 | | |
| 117 | + | |
117 | 118 | | |
118 | 119 | | |
119 | 120 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
92 | 92 | | |
93 | 93 | | |
94 | 94 | | |
95 | | - | |
| 95 | + | |
96 | 96 | | |
97 | 97 | | |
98 | 98 | | |
| |||
122 | 122 | | |
123 | 123 | | |
124 | 124 | | |
| 125 | + | |
| 126 | + | |
125 | 127 | | |
0 commit comments