Merge tag 'linux-kselftest-4.11-rc1' of git://git.kernel.org/pub/scm/linux/kernel/git/shuah/linux-kselftest
Pull Kselftest update from Shuah Khan: "This update consists of: - fixes to several existing tests from Stafford Horne - cpufreq tests from Viresh Kumar - Selftest build and install fixes from Bamvor Jian Zhang and Michael Ellerman - Fixes to protection-keys tests from Dave Hansen - Warning fixes from Shuah Khan" * tag 'linux-kselftest-4.11-rc1' of git://git.kernel.org/pub/scm/linux/kernel/git/shuah/linux-kselftest: (28 commits) selftests/powerpc: Fix remaining fallout from recent changes selftests/powerpc: Fix the clean rule since recent changes selftests: Fix the .S and .S -> .o rules selftests: Fix the .c linking rule selftests: Fix selftests build to just build, not run tests selftests, x86, protection_keys: fix wrong offset in siginfo selftests, x86, protection_keys: fix uninitialized variable warning selftest: cpufreq: Update MAINTAINERS file selftest: cpufreq: Add special tests selftest: cpufreq: Add support to test cpufreq modules selftest: cpufreq: Add suspend/resume/hibernate support selftest: cpufreq: Add support for cpufreq tests selftests: Add intel_pstate to TARGETS selftests/intel_pstate: Update makefile to match new style selftests/intel_pstate: Fix warning on loop index overflow cpupower: Restore format of frequency-info limit selftests/futex: Add headers to makefile dependencies selftests/futex: Add stdio used for logging selftests: x86 protection_keys remove dead code selftests: x86 protection_keys fix unused variable compile warnings ...
This commit is contained in:
@@ -192,7 +192,7 @@ void lots_o_noops_around_write(int *write_to_me)
|
||||
#define SYS_pkey_alloc 381
|
||||
#define SYS_pkey_free 382
|
||||
#define REG_IP_IDX REG_EIP
|
||||
#define si_pkey_offset 0x18
|
||||
#define si_pkey_offset 0x14
|
||||
#else
|
||||
#define SYS_mprotect_key 329
|
||||
#define SYS_pkey_alloc 330
|
||||
@@ -462,7 +462,7 @@ void pkey_disable_set(int pkey, int flags)
|
||||
unsigned long syscall_flags = 0;
|
||||
int ret;
|
||||
int pkey_rights;
|
||||
u32 orig_pkru;
|
||||
u32 orig_pkru = rdpkru();
|
||||
|
||||
dprintf1("START->%s(%d, 0x%x)\n", __func__,
|
||||
pkey, flags);
|
||||
@@ -812,8 +812,6 @@ void setup_hugetlbfs(void)
|
||||
{
|
||||
int err;
|
||||
int fd;
|
||||
int validated_nr_pages;
|
||||
int i;
|
||||
char buf[] = "123";
|
||||
|
||||
if (geteuid() != 0) {
|
||||
@@ -1116,11 +1114,6 @@ void test_pkey_syscalls_on_non_allocated_pkey(int *ptr, u16 pkey)
|
||||
err = sys_pkey_free(i);
|
||||
pkey_assert(err);
|
||||
|
||||
/* not enforced when pkey_get() is not a syscall
|
||||
err = pkey_get(i, 0);
|
||||
pkey_assert(err < 0);
|
||||
*/
|
||||
|
||||
err = sys_pkey_free(i);
|
||||
pkey_assert(err);
|
||||
|
||||
@@ -1133,14 +1126,8 @@ void test_pkey_syscalls_on_non_allocated_pkey(int *ptr, u16 pkey)
|
||||
void test_pkey_syscalls_bad_args(int *ptr, u16 pkey)
|
||||
{
|
||||
int err;
|
||||
int bad_flag = (PKEY_DISABLE_ACCESS | PKEY_DISABLE_WRITE) + 1;
|
||||
int bad_pkey = NR_PKEYS+99;
|
||||
|
||||
/* not enforced when pkey_get() is not a syscall
|
||||
err = pkey_get(bad_pkey, bad_flag);
|
||||
pkey_assert(err < 0);
|
||||
*/
|
||||
|
||||
/* pass a known-invalid pkey in: */
|
||||
err = sys_mprotect_pkey(ptr, PAGE_SIZE, PROT_READ, bad_pkey);
|
||||
pkey_assert(err);
|
||||
@@ -1149,8 +1136,6 @@ void test_pkey_syscalls_bad_args(int *ptr, u16 pkey)
|
||||
/* Assumes that all pkeys other than 'pkey' are unallocated */
|
||||
void test_pkey_alloc_exhaust(int *ptr, u16 pkey)
|
||||
{
|
||||
unsigned long flags;
|
||||
unsigned long init_val;
|
||||
int err;
|
||||
int allocated_pkeys[NR_PKEYS] = {0};
|
||||
int nr_allocated_pkeys = 0;
|
||||
|
Reference in New Issue
Block a user