Merge tag 'v5.2-rc4' into mauro
We need to pick up post-rc1 changes to various document files so they don't get lost in Mauro's massive RST conversion push.
This commit is contained in:
@@ -1,7 +1,7 @@
|
||||
#!/bin/sh
|
||||
# SPDX-License-Identifier: GPL-2.0-only
|
||||
# check_cc.sh - Helper to test userspace compilation support
|
||||
# Copyright (c) 2015 Andrew Lutomirski
|
||||
# GPL v2
|
||||
|
||||
CC="$1"
|
||||
TESTPROG="$2"
|
||||
|
@@ -1,15 +1,7 @@
|
||||
// SPDX-License-Identifier: GPL-2.0-only
|
||||
/*
|
||||
* check_initial_reg_state.c - check that execve sets the correct state
|
||||
* Copyright (c) 2014-2016 Andrew Lutomirski
|
||||
*
|
||||
* This program is free software; you can redistribute it and/or modify
|
||||
* it under the terms and conditions of the GNU General Public License,
|
||||
* version 2, as published by the Free Software Foundation.
|
||||
*
|
||||
* This program is distributed in the hope it will be useful, but
|
||||
* WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
|
||||
* General Public License for more details.
|
||||
*/
|
||||
|
||||
#define _GNU_SOURCE
|
||||
|
@@ -1,10 +1,9 @@
|
||||
// SPDX-License-Identifier: GPL-2.0-only
|
||||
/*
|
||||
* entry_from_vm86.c - tests kernel entries from vm86 mode
|
||||
* Copyright (c) 2014-2015 Andrew Lutomirski
|
||||
*
|
||||
* This exercises a few paths that need to special-case vm86 mode.
|
||||
*
|
||||
* GPL v2.
|
||||
*/
|
||||
|
||||
#define _GNU_SOURCE
|
||||
|
@@ -1,7 +1,7 @@
|
||||
// SPDX-License-Identifier: GPL-2.0-only
|
||||
/*
|
||||
* fsgsbase.c, an fsgsbase test
|
||||
* Copyright (c) 2014-2016 Andy Lutomirski
|
||||
* GPL v2
|
||||
*/
|
||||
|
||||
#define _GNU_SOURCE
|
||||
|
@@ -1,3 +1,4 @@
|
||||
// SPDX-License-Identifier: GPL-2.0-only
|
||||
/*
|
||||
* mpx-mini-test.c: routines to test Intel MPX (Memory Protection eXtentions)
|
||||
*
|
||||
@@ -5,10 +6,6 @@
|
||||
* "Ren, Qiaowei" <qiaowei.ren@intel.com>
|
||||
* "Wei, Gang" <gang.wei@intel.com>
|
||||
* "Hansen, Dave" <dave.hansen@intel.com>
|
||||
*
|
||||
* This program is free software; you can redistribute it and/or modify it
|
||||
* under the terms and conditions of the GNU General Public License,
|
||||
* version 2.
|
||||
*/
|
||||
|
||||
/*
|
||||
|
@@ -1,16 +1,8 @@
|
||||
// SPDX-License-Identifier: GPL-2.0-only
|
||||
/*
|
||||
* sigreturn.c - tests for x86 sigreturn(2) and exit-to-userspace
|
||||
* Copyright (c) 2014-2015 Andrew Lutomirski
|
||||
*
|
||||
* This program is free software; you can redistribute it and/or modify
|
||||
* it under the terms and conditions of the GNU General Public License,
|
||||
* version 2, as published by the Free Software Foundation.
|
||||
*
|
||||
* This program is distributed in the hope it will be useful, but
|
||||
* WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
|
||||
* General Public License for more details.
|
||||
*
|
||||
* This is a series of tests that exercises the sigreturn(2) syscall and
|
||||
* the IRET / SYSRET paths in the kernel.
|
||||
*
|
||||
|
@@ -1,16 +1,8 @@
|
||||
// SPDX-License-Identifier: GPL-2.0-only
|
||||
/*
|
||||
* single_step_syscall.c - single-steps various x86 syscalls
|
||||
* Copyright (c) 2014-2015 Andrew Lutomirski
|
||||
*
|
||||
* This program is free software; you can redistribute it and/or modify
|
||||
* it under the terms and conditions of the GNU General Public License,
|
||||
* version 2, as published by the Free Software Foundation.
|
||||
*
|
||||
* This program is distributed in the hope it will be useful, but
|
||||
* WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
|
||||
* General Public License for more details.
|
||||
*
|
||||
* This is a very simple series of tests that makes system calls with
|
||||
* the TF flag set. This exercises some nasty kernel code in the
|
||||
* SYSENTER case: SYSENTER does not clear TF, so SYSENTER with TF set
|
||||
|
@@ -1,15 +1,7 @@
|
||||
// SPDX-License-Identifier: GPL-2.0-only
|
||||
/*
|
||||
* syscall_arg_fault.c - tests faults 32-bit fast syscall stack args
|
||||
* Copyright (c) 2015 Andrew Lutomirski
|
||||
*
|
||||
* This program is free software; you can redistribute it and/or modify
|
||||
* it under the terms and conditions of the GNU General Public License,
|
||||
* version 2, as published by the Free Software Foundation.
|
||||
*
|
||||
* This program is distributed in the hope it will be useful, but
|
||||
* WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
|
||||
* General Public License for more details.
|
||||
*/
|
||||
|
||||
#define _GNU_SOURCE
|
||||
@@ -43,7 +35,7 @@ static sigjmp_buf jmpbuf;
|
||||
|
||||
static volatile sig_atomic_t n_errs;
|
||||
|
||||
static void sigsegv(int sig, siginfo_t *info, void *ctx_void)
|
||||
static void sigsegv_or_sigbus(int sig, siginfo_t *info, void *ctx_void)
|
||||
{
|
||||
ucontext_t *ctx = (ucontext_t*)ctx_void;
|
||||
|
||||
@@ -73,7 +65,13 @@ int main()
|
||||
if (sigaltstack(&stack, NULL) != 0)
|
||||
err(1, "sigaltstack");
|
||||
|
||||
sethandler(SIGSEGV, sigsegv, SA_ONSTACK);
|
||||
sethandler(SIGSEGV, sigsegv_or_sigbus, SA_ONSTACK);
|
||||
/*
|
||||
* The actual exception can vary. On Atom CPUs, we get #SS
|
||||
* instead of #PF when the vDSO fails to access the stack when
|
||||
* ESP is too close to 2^32, and #SS causes SIGBUS.
|
||||
*/
|
||||
sethandler(SIGBUS, sigsegv_or_sigbus, SA_ONSTACK);
|
||||
sethandler(SIGILL, sigill, SA_ONSTACK);
|
||||
|
||||
/*
|
||||
|
@@ -1,16 +1,8 @@
|
||||
// SPDX-License-Identifier: GPL-2.0-only
|
||||
/*
|
||||
* syscall_nt.c - checks syscalls with NT set
|
||||
* Copyright (c) 2014-2015 Andrew Lutomirski
|
||||
*
|
||||
* This program is free software; you can redistribute it and/or modify
|
||||
* it under the terms and conditions of the GNU General Public License,
|
||||
* version 2, as published by the Free Software Foundation.
|
||||
*
|
||||
* This program is distributed in the hope it will be useful, but
|
||||
* WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
|
||||
* General Public License for more details.
|
||||
*
|
||||
* Some obscure user-space code requires the ability to make system calls
|
||||
* with FLAGS.NT set. Make sure it works.
|
||||
*/
|
||||
|
@@ -1,15 +1,7 @@
|
||||
// SPDX-License-Identifier: GPL-2.0-only
|
||||
/*
|
||||
* sigreturn.c - tests that x86 avoids Intel SYSRET pitfalls
|
||||
* Copyright (c) 2014-2016 Andrew Lutomirski
|
||||
*
|
||||
* This program is free software; you can redistribute it and/or modify
|
||||
* it under the terms and conditions of the GNU General Public License,
|
||||
* version 2, as published by the Free Software Foundation.
|
||||
*
|
||||
* This program is distributed in the hope it will be useful, but
|
||||
* WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
|
||||
* General Public License for more details.
|
||||
*/
|
||||
|
||||
#define _GNU_SOURCE
|
||||
|
@@ -1,16 +1,8 @@
|
||||
// SPDX-License-Identifier: GPL-2.0-only
|
||||
/*
|
||||
* sysret_ss_attrs.c - test that syscalls return valid hidden SS attributes
|
||||
* Copyright (c) 2015 Andrew Lutomirski
|
||||
*
|
||||
* This program is free software; you can redistribute it and/or modify
|
||||
* it under the terms and conditions of the GNU General Public License,
|
||||
* version 2, as published by the Free Software Foundation.
|
||||
*
|
||||
* This program is distributed in the hope it will be useful, but
|
||||
* WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
|
||||
* General Public License for more details.
|
||||
*
|
||||
* On AMD CPUs, SYSRET can return with a valid SS descriptor with with
|
||||
* the hidden attributes set to an unusable state. Make sure the kernel
|
||||
* doesn't let this happen.
|
||||
|
@@ -1,17 +1,9 @@
|
||||
// SPDX-License-Identifier: GPL-2.0-only
|
||||
/*
|
||||
* 32-bit test to check vDSO mremap.
|
||||
*
|
||||
* Copyright (c) 2016 Dmitry Safonov
|
||||
* Suggested-by: Andrew Lutomirski
|
||||
*
|
||||
* This program is free software; you can redistribute it and/or modify
|
||||
* it under the terms and conditions of the GNU General Public License,
|
||||
* version 2, as published by the Free Software Foundation.
|
||||
*
|
||||
* This program is distributed in the hope it will be useful, but
|
||||
* WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
|
||||
* General Public License for more details.
|
||||
*/
|
||||
/*
|
||||
* Can be built statically:
|
||||
|
@@ -1,16 +1,8 @@
|
||||
// SPDX-License-Identifier: GPL-2.0-only
|
||||
/*
|
||||
* 32-bit syscall ABI conformance test.
|
||||
*
|
||||
* Copyright (c) 2015 Denys Vlasenko
|
||||
*
|
||||
* This program is free software; you can redistribute it and/or modify
|
||||
* it under the terms and conditions of the GNU General Public License,
|
||||
* version 2, as published by the Free Software Foundation.
|
||||
*
|
||||
* This program is distributed in the hope it will be useful, but
|
||||
* WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
|
||||
* General Public License for more details.
|
||||
*/
|
||||
/*
|
||||
* Can be built statically:
|
||||
|
@@ -1,16 +1,8 @@
|
||||
/* SPDX-License-Identifier: GPL-2.0-only */
|
||||
/*
|
||||
* thunks.S - assembly helpers for mixed-bitness code
|
||||
* Copyright (c) 2015 Andrew Lutomirski
|
||||
*
|
||||
* This program is free software; you can redistribute it and/or modify
|
||||
* it under the terms and conditions of the GNU General Public License,
|
||||
* version 2, as published by the Free Software Foundation.
|
||||
*
|
||||
* This program is distributed in the hope it will be useful, but
|
||||
* WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
|
||||
* General Public License for more details.
|
||||
*
|
||||
* These are little helpers that make it easier to switch bitness on
|
||||
* the fly.
|
||||
*/
|
||||
|
@@ -1,16 +1,8 @@
|
||||
/* SPDX-License-Identifier: GPL-2.0-only */
|
||||
/*
|
||||
* thunks_32.S - assembly helpers for mixed-bitness code
|
||||
* Copyright (c) 2015 Denys Vlasenko
|
||||
*
|
||||
* This program is free software; you can redistribute it and/or modify
|
||||
* it under the terms and conditions of the GNU General Public License,
|
||||
* version 2, as published by the Free Software Foundation.
|
||||
*
|
||||
* This program is distributed in the hope it will be useful, but
|
||||
* WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
|
||||
* General Public License for more details.
|
||||
*
|
||||
* These are little helpers that make it easier to switch bitness on
|
||||
* the fly.
|
||||
*/
|
||||
|
@@ -1,7 +1,7 @@
|
||||
// SPDX-License-Identifier: GPL-2.0-only
|
||||
/*
|
||||
* Trivial program to check that we have a valid 32-bit build environment.
|
||||
* Copyright (c) 2015 Andy Lutomirski
|
||||
* GPL v2
|
||||
*/
|
||||
|
||||
#ifndef __i386__
|
||||
|
@@ -1,7 +1,7 @@
|
||||
// SPDX-License-Identifier: GPL-2.0-only
|
||||
/*
|
||||
* Trivial program to check that we have a valid 64-bit build environment.
|
||||
* Copyright (c) 2015 Andy Lutomirski
|
||||
* GPL v2
|
||||
*/
|
||||
|
||||
#ifndef __x86_64__
|
||||
|
@@ -1,16 +1,8 @@
|
||||
// SPDX-License-Identifier: GPL-2.0-only
|
||||
/*
|
||||
* unwind_vdso.c - tests unwind info for AT_SYSINFO in the vDSO
|
||||
* Copyright (c) 2014-2015 Andrew Lutomirski
|
||||
*
|
||||
* This program is free software; you can redistribute it and/or modify
|
||||
* it under the terms and conditions of the GNU General Public License,
|
||||
* version 2, as published by the Free Software Foundation.
|
||||
*
|
||||
* This program is distributed in the hope it will be useful, but
|
||||
* WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
|
||||
* General Public License for more details.
|
||||
*
|
||||
* This tests __kernel_vsyscall's unwind info.
|
||||
*/
|
||||
|
||||
|
@@ -1,16 +1,8 @@
|
||||
// SPDX-License-Identifier: GPL-2.0-only
|
||||
/*
|
||||
* vdso_restorer.c - tests vDSO-based signal restore
|
||||
* Copyright (c) 2015 Andrew Lutomirski
|
||||
*
|
||||
* This program is free software; you can redistribute it and/or modify
|
||||
* it under the terms and conditions of the GNU General Public License,
|
||||
* version 2, as published by the Free Software Foundation.
|
||||
*
|
||||
* This program is distributed in the hope it will be useful, but
|
||||
* WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
|
||||
* General Public License for more details.
|
||||
*
|
||||
* This makes sure that sa_restorer == NULL keeps working on 32-bit
|
||||
* configurations. Modern glibc doesn't use it under any circumstances,
|
||||
* so it's easy to overlook breakage.
|
||||
|
Reference in New Issue
Block a user