summaryrefslogtreecommitdiffstats
path: root/tools
diff options
context:
space:
mode:
authorDave Hansen <dave.hansen@linux.intel.com>2017-02-03 13:51:35 -0500
committerShuah Khan <shuahkh@osg.samsung.com>2017-02-08 13:15:43 -0500
commit2195bff041486eb7fcceaf058acaedcd057efbdc (patch)
treee6c9d26b02dd210190f595e9dd5bf0c332a48298 /tools
parent16846c2d96b0d7b3f7123257c4b58b06768c6d65 (diff)
selftests, x86, protection_keys: fix wrong offset in siginfo
The siginfo contains a bunch of information about the fault. For protection keys, it tells us which protection key's permissions were violated. The wrong offset in here leads to reading garbage and thus failures in the tests. We should probably eventually move this over to using the kernel's headers defining the siginfo instead of a hard-coded offset. But, for now, just do the simplest fix. Signed-off-by: Dave Hansen <dave.hansen@linux.intel.com> Cc: Ingo Molnar <mingo@kernel.org> Cc: Shuah Khan <shuahkh@osg.samsung.com> Signed-off-by: Shuah Khan <shuahkh@osg.samsung.com>
Diffstat (limited to 'tools')
-rw-r--r--tools/testing/selftests/x86/protection_keys.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/tools/testing/selftests/x86/protection_keys.c b/tools/testing/selftests/x86/protection_keys.c
index bccc6f2a2f7e..f39c5bc6e01a 100644
--- a/tools/testing/selftests/x86/protection_keys.c
+++ b/tools/testing/selftests/x86/protection_keys.c
@@ -192,7 +192,7 @@ void lots_o_noops_around_write(int *write_to_me)
192#define SYS_pkey_alloc 381 192#define SYS_pkey_alloc 381
193#define SYS_pkey_free 382 193#define SYS_pkey_free 382
194#define REG_IP_IDX REG_EIP 194#define REG_IP_IDX REG_EIP
195#define si_pkey_offset 0x18 195#define si_pkey_offset 0x14
196#else 196#else
197#define SYS_mprotect_key 329 197#define SYS_mprotect_key 329
198#define SYS_pkey_alloc 330 198#define SYS_pkey_alloc 330