diff options
author | Andy Lutomirski <luto@kernel.org> | 2020-05-28 02:02:36 +0300 |
---|---|---|
committer | Borislav Petkov <bp@suse.de> | 2020-06-22 19:56:36 +0300 |
commit | a5d25e01c8146ad8846da4760422e12242fceafe (patch) | |
tree | c49aa6d29b239fcea083dd0c9ee760dbb6e8d215 /scripts/gcc-plugins/cyc_complexity_plugin.c | |
parent | 5e7ec8578fa3dada50c50f5b234fa8d154b76349 (diff) | |
download | linux-a5d25e01c8146ad8846da4760422e12242fceafe.tar.xz |
selftests/x86: Add a syscall_arg_fault_64 test for negative GSBASE
If the kernel erroneously allows WRGSBASE and user code writes a
negative value, paranoid_entry will get confused. Check for this by
writing a negative value to GSBASE and doing SYSENTER with TF set. A
successful run looks like:
[RUN] SYSENTER with TF, invalid state, and GSBASE < 0
[SKIP] Illegal instruction
A failed run causes a kernel hang, and I believe it's because we
double-fault and then get a never ending series of page faults and,
when we exhaust the double fault stack we double fault again,
starting the process over.
Signed-off-by: Andy Lutomirski <luto@kernel.org>
Signed-off-by: Borislav Petkov <bp@suse.de>
Link: https://lkml.kernel.org/r/f4f71efc91b9eae5e3dae21c9aee1c70cf5f370e.1590620529.git.luto@kernel.org
Diffstat (limited to 'scripts/gcc-plugins/cyc_complexity_plugin.c')
0 files changed, 0 insertions, 0 deletions