diff options
author | Ram Pai <linuxram@us.ibm.com> | 2020-06-05 01:52:39 +0200 |
---|---|---|
committer | Linus Torvalds <torvalds@linux-foundation.org> | 2020-06-05 04:06:27 +0200 |
commit | 6e2c2d0fb7819a05765147286ed71d5bb96faa36 (patch) | |
tree | a8dd21a1f77e3de465d6626d8d427a3e4c192667 /tools/testing/selftests/vm/pkey-x86.h | |
parent | selftests/vm/pkeys: detect write violation on a mapped access-denied-key page (diff) | |
download | linux-6e2c2d0fb7819a05765147286ed71d5bb96faa36.tar.xz linux-6e2c2d0fb7819a05765147286ed71d5bb96faa36.zip |
selftests/vm/pkeys: introduce a sub-page allocator
This introduces a new allocator that allocates 4K hardware pages to back
64K linux pages. This allocator is available only on powerpc.
Signed-off-by: Ram Pai <linuxram@us.ibm.com>
Signed-off-by: Thiago Jung Bauermann <bauerman@linux.ibm.com>
Signed-off-by: Sandipan Das <sandipan@linux.ibm.com>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Acked-by: Dave Hansen <dave.hansen@intel.com>
Cc: Dave Hansen <dave.hansen@intel.com>
Cc: Florian Weimer <fweimer@redhat.com>
Cc: "Desnes A. Nunes do Rosario" <desnesn@linux.vnet.ibm.com>
Cc: Ingo Molnar <mingo@kernel.org>
Cc: "Aneesh Kumar K.V" <aneesh.kumar@linux.ibm.com>
Cc: Michael Ellerman <mpe@ellerman.id.au>
Cc: Michal Hocko <mhocko@kernel.org>
Cc: Michal Suchanek <msuchanek@suse.de>
Cc: Shuah Khan <shuah@kernel.org>
Link: http://lkml.kernel.org/r/c4a82fa962ec71015b994fab1aaf83bdfd091553.1585646528.git.sandipan@linux.ibm.com
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
Diffstat (limited to 'tools/testing/selftests/vm/pkey-x86.h')
-rw-r--r-- | tools/testing/selftests/vm/pkey-x86.h | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/tools/testing/selftests/vm/pkey-x86.h b/tools/testing/selftests/vm/pkey-x86.h index 6421b846aa16..3be20f5d5275 100644 --- a/tools/testing/selftests/vm/pkey-x86.h +++ b/tools/testing/selftests/vm/pkey-x86.h @@ -173,4 +173,9 @@ void expect_fault_on_read_execonly_key(void *p1, int pkey) expected_pkey_fault(pkey); } +void *malloc_pkey_with_mprotect_subpage(long size, int prot, u16 pkey) +{ + return PTR_ERR_ENOTSUP; +} + #endif /* _PKEYS_X86_H */ |