lkml.org 
[lkml]   [2020]   [Jun]   [26]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
    Patch in this message
    /
    From
    Subject[PATCH 4/6] selftests/x86/syscall_nt: Add more flag combinations
    Date
    Add EFLAGS.AC to the mix.

    Signed-off-by: Andy Lutomirski <luto@kernel.org>
    ---
    tools/testing/selftests/x86/syscall_nt.c | 15 +++++++++++++++
    1 file changed, 15 insertions(+)

    diff --git a/tools/testing/selftests/x86/syscall_nt.c b/tools/testing/selftests/x86/syscall_nt.c
    index 02309a195041..f060534b66a0 100644
    --- a/tools/testing/selftests/x86/syscall_nt.c
    +++ b/tools/testing/selftests/x86/syscall_nt.c
    @@ -73,6 +73,12 @@ int main(void)
    printf("[RUN]\tSet NT and issue a syscall\n");
    do_it(X86_EFLAGS_NT);

    + printf("[RUN]\tSet AC and issue a syscall\n");
    + do_it(X86_EFLAGS_AC);
    +
    + printf("[RUN]\tSet NT|AC and issue a syscall\n");
    + do_it(X86_EFLAGS_NT | X86_EFLAGS_AC);
    +
    /*
    * Now try it again with TF set -- TF forces returns via IRET in all
    * cases except non-ptregs-using 64-bit full fast path syscalls.
    @@ -80,8 +86,17 @@ int main(void)

    sethandler(SIGTRAP, sigtrap, 0);

    + printf("[RUN]\tSet TF and issue a syscall\n");
    + do_it(X86_EFLAGS_TF);
    +
    printf("[RUN]\tSet NT|TF and issue a syscall\n");
    do_it(X86_EFLAGS_NT | X86_EFLAGS_TF);

    + printf("[RUN]\tSet AC|TF and issue a syscall\n");
    + do_it(X86_EFLAGS_AC | X86_EFLAGS_TF);
    +
    + printf("[RUN]\tSet NT|AC|TF and issue a syscall\n");
    + do_it(X86_EFLAGS_NT | X86_EFLAGS_AC | X86_EFLAGS_TF);
    +
    return nerrs == 0 ? 0 : 1;
    }
    --
    2.25.4
    \
     
     \ /
      Last update: 2020-06-26 19:22    [W:5.968 / U:0.172 seconds]
    ©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site