OSDN Git Service

selftests, x86, protection_keys: fix wrong offset in siginfo
authorDave Hansen <dave.hansen@linux.intel.com>
Fri, 3 Feb 2017 18:51:35 +0000 (10:51 -0800)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Wed, 28 Mar 2018 16:39:25 +0000 (18:39 +0200)
commit26e9852f9d50945c7a3b245143eed8f7004cdaed
treec273e1104d2e7904beb4d930fd50b353e2965790
parent1e0fc7dba23d8ecf8baee8ccf8440503f7013221
selftests, x86, protection_keys: fix wrong offset in siginfo

commit 2195bff041486eb7fcceaf058acaedcd057efbdc upstream.

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>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
tools/testing/selftests/x86/protection_keys.c