提交 2195bff0 编写于 作者: D Dave Hansen 提交者: Shuah Khan

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: NDave Hansen <dave.hansen@linux.intel.com>
Cc: Ingo Molnar <mingo@kernel.org>
Cc: Shuah Khan <shuahkh@osg.samsung.com>
Signed-off-by: NShuah Khan <shuahkh@osg.samsung.com>
上级 16846c2d
...@@ -192,7 +192,7 @@ void lots_o_noops_around_write(int *write_to_me) ...@@ -192,7 +192,7 @@ void lots_o_noops_around_write(int *write_to_me)
#define SYS_pkey_alloc 381 #define SYS_pkey_alloc 381
#define SYS_pkey_free 382 #define SYS_pkey_free 382
#define REG_IP_IDX REG_EIP #define REG_IP_IDX REG_EIP
#define si_pkey_offset 0x18 #define si_pkey_offset 0x14
#else #else
#define SYS_mprotect_key 329 #define SYS_mprotect_key 329
#define SYS_pkey_alloc 330 #define SYS_pkey_alloc 330
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册