File tree Expand file tree Collapse file tree 1 file changed +19
-0
lines changed Expand file tree Collapse file tree 1 file changed +19
-0
lines changed Original file line number Diff line number Diff line change @@ -186,6 +186,25 @@ SYM_CODE_START(srso_alias_return_thunk)
186
186
ud2
187
187
SYM_CODE_END(srso_alias_return_thunk)
188
188
189
+ /*
190
+ * Some generic notes on the untraining sequences:
191
+ *
192
+ * They are interchangeable when it comes to flushing potentially wrong
193
+ * RET predictions from the BTB.
194
+ *
195
+ * The SRSO Zen1/2 (MOVABS) untraining sequence is longer than the
196
+ * Retbleed sequence because the return sequence done there
197
+ * (srso_safe_ret()) is longer and the return sequence must fully nest
198
+ * (end before) the untraining sequence. Therefore, the untraining
199
+ * sequence must fully overlap the return sequence.
200
+ *
201
+ * Regarding alignment - the instructions which need to be untrained,
202
+ * must all start at a cacheline boundary for Zen1/2 generations. That
203
+ * is, instruction sequences starting at srso_safe_ret() and
204
+ * the respective instruction sequences at retbleed_return_thunk()
205
+ * must start at a cacheline boundary.
206
+ */
207
+
189
208
/*
190
209
* Safety details here pertain to the AMD Zen{1,2} microarchitecture:
191
210
* 1) The RET at retbleed_return_thunk must be on a 64 byte boundary, for
You can’t perform that action at this time.
0 commit comments