Skip to content

Commit e4ef7de

Browse files
amlutoKAGA-KOKO
authored andcommitted
selftests/x86/syscall_nt: Add more flag combinations
Add EFLAGS.AC to the mix. Signed-off-by: Andy Lutomirski <[email protected]> Signed-off-by: Thomas Gleixner <[email protected]> Link: https://lkml.kernel.org/r/12924e2fe2c5826568b7fc9436d85ca7f5eb1743.1593191971.git.luto@kernel.org
1 parent ffae641 commit e4ef7de

File tree

1 file changed

+15
-0
lines changed

1 file changed

+15
-0
lines changed

tools/testing/selftests/x86/syscall_nt.c

Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -73,15 +73,30 @@ int main(void)
7373
printf("[RUN]\tSet NT and issue a syscall\n");
7474
do_it(X86_EFLAGS_NT);
7575

76+
printf("[RUN]\tSet AC and issue a syscall\n");
77+
do_it(X86_EFLAGS_AC);
78+
79+
printf("[RUN]\tSet NT|AC and issue a syscall\n");
80+
do_it(X86_EFLAGS_NT | X86_EFLAGS_AC);
81+
7682
/*
7783
* Now try it again with TF set -- TF forces returns via IRET in all
7884
* cases except non-ptregs-using 64-bit full fast path syscalls.
7985
*/
8086

8187
sethandler(SIGTRAP, sigtrap, 0);
8288

89+
printf("[RUN]\tSet TF and issue a syscall\n");
90+
do_it(X86_EFLAGS_TF);
91+
8392
printf("[RUN]\tSet NT|TF and issue a syscall\n");
8493
do_it(X86_EFLAGS_NT | X86_EFLAGS_TF);
8594

95+
printf("[RUN]\tSet AC|TF and issue a syscall\n");
96+
do_it(X86_EFLAGS_AC | X86_EFLAGS_TF);
97+
98+
printf("[RUN]\tSet NT|AC|TF and issue a syscall\n");
99+
do_it(X86_EFLAGS_NT | X86_EFLAGS_AC | X86_EFLAGS_TF);
100+
86101
return nerrs == 0 ? 0 : 1;
87102
}

0 commit comments

Comments
 (0)