1 --- ltp-full-20190930.orig/testcases/kernel/syscalls/pkeys/pkey.h 2019-09-30 13:30:26.000000000 +0200
2 +++ ltp-full-20190930/testcases/kernel/syscalls/pkeys/pkey.h 2019-10-29 15:02:09.524423510 +0100
4 // SPDX-License-Identifier: GPL-2.0-or-later
6 * Copyright (c) 2019 Red Hat, Inc.
7 + * Copyright (c) Linux Test Project, 2019
14 #ifndef HAVE_PKEY_MPROTECT
15 -static inline int pkey_mprotect(void *addr, size_t len, int prot, int pkey)
16 +inline int ltp_pkey_mprotect(void *addr, size_t len, int prot, int pkey)
18 return tst_syscall(__NR_pkey_mprotect, addr, len, prot, pkey);
21 -static inline int pkey_alloc(unsigned int flags, unsigned int access_rights)
22 +inline int ltp_pkey_alloc(unsigned int flags, unsigned int access_rights)
24 return tst_syscall(__NR_pkey_alloc, flags, access_rights);
27 -static inline int pkey_free(int pkey)
28 +inline int ltp_pkey_free(int pkey)
30 return tst_syscall(__NR_pkey_free, pkey);
33 +#define ltp_pkey_alloc pkey_alloc
34 +#define ltp_pkey_free pkey_free
35 +#define ltp_pkey_mprotect pkey_mprotect
36 #endif /* HAVE_PKEY_MPROTECT */
38 static inline void check_pkey_support(void)
40 - int pkey = pkey_alloc(0, 0);
41 + int pkey = ltp_pkey_alloc(0, 0);
45 @@ -44,7 +49,7 @@ static inline void check_pkey_support(vo
46 tst_brk(TCONF, "pkeys are not available for test");
50 + ltp_pkey_free(pkey);