File tree 1 file changed +6
-4
lines changed 1 file changed +6
-4
lines changed Original file line number Diff line number Diff line change 189
189
#define X8 (x ...) X4(x), X4(x)
190
190
#define X16 (x ...) X8(x), X8(x)
191
191
192
- #define NR_FASTOP (ilog2(sizeof(ulong)) + 1)
193
- #define FASTOP_SIZE (8 * (1 + HAS_KERNEL_IBT))
192
+ #define NR_FASTOP (ilog2(sizeof(ulong)) + 1)
193
+ #define RET_LENGTH (1 + (4 * IS_ENABLED(CONFIG_RETHUNK)) + \
194
+ IS_ENABLED(CONFIG_SLS))
195
+ #define FASTOP_LENGTH (ENDBR_INSN_SIZE + 7 + RET_LENGTH)
196
+ #define FASTOP_SIZE (8 << ((FASTOP_LENGTH > 8) & 1) << ((FASTOP_LENGTH > 16) & 1))
197
+ static_assert (FASTOP_LENGTH <= FASTOP_SIZE );
194
198
195
199
struct opcode {
196
200
u64 flags ;
@@ -442,8 +446,6 @@ static int fastop(struct x86_emulate_ctxt *ctxt, fastop_t fop);
442
446
* RET | JMP __x86_return_thunk [1,5 bytes; CONFIG_RETHUNK]
443
447
* INT3 [1 byte; CONFIG_SLS]
444
448
*/
445
- #define RET_LENGTH (1 + (4 * IS_ENABLED(CONFIG_RETHUNK)) + \
446
- IS_ENABLED(CONFIG_SLS))
447
449
#define SETCC_LENGTH (ENDBR_INSN_SIZE + 3 + RET_LENGTH)
448
450
#define SETCC_ALIGN (4 << ((SETCC_LENGTH > 4) & 1) << ((SETCC_LENGTH > 8) & 1))
449
451
static_assert (SETCC_LENGTH <= SETCC_ALIGN );
You can’t perform that action at this time.
0 commit comments