mirror of
https://git.kernel.org/pub/scm/linux/kernel/git/next/linux-next.git
synced 2025-01-17 13:58:46 +00:00
selftests/mm: remove empty pkey helper definition
Some of the functions declared in pkey-helpers.h are actually defined in protections_keys.c, meaning they can only be called from protections_keys.c. This is less than ideal, but it is hard to avoid as these helpers are themselves called from inline functions in pkey-<arch>.h. Let's at least add a comment clarifying that. We can also remove the empty definition in pkey_sighandler_tests.c: expected_pkey_fault() is not meant to be called from there. Link: https://lkml.kernel.org/r/20241209095019.1732120-10-kevin.brodsky@arm.com Signed-off-by: Kevin Brodsky <kevin.brodsky@arm.com> Cc: Aruna Ramakrishna <aruna.ramakrishna@oracle.com> Cc: Catalin Marinas <catalin.marinas@arm.com> Cc: Dave Hansen <dave.hansen@linux.intel.com> Cc: Joey Gouly <joey.gouly@arm.com> Cc: Keith Lucas <keith.lucas@oracle.com> Cc: Ryan Roberts <ryan.roberts@arm.com> Cc: Shuah Khan <shuah@kernel.org> Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
This commit is contained in:
parent
cc5d6dfa88
commit
adae653ec8
@ -84,10 +84,12 @@ extern void abort_hooks(void);
|
|||||||
# define noinline __attribute__((noinline))
|
# define noinline __attribute__((noinline))
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
noinline int read_ptr(int *ptr);
|
|
||||||
void expected_pkey_fault(int pkey);
|
|
||||||
int sys_pkey_alloc(unsigned long flags, unsigned long init_val);
|
int sys_pkey_alloc(unsigned long flags, unsigned long init_val);
|
||||||
int sys_pkey_free(unsigned long pkey);
|
int sys_pkey_free(unsigned long pkey);
|
||||||
|
|
||||||
|
/* For functions called from protection_keys.c only */
|
||||||
|
noinline int read_ptr(int *ptr);
|
||||||
|
void expected_pkey_fault(int pkey);
|
||||||
int mprotect_pkey(void *ptr, size_t size, unsigned long orig_prot,
|
int mprotect_pkey(void *ptr, size_t size, unsigned long orig_prot,
|
||||||
unsigned long pkey);
|
unsigned long pkey);
|
||||||
void record_pkey_malloc(void *ptr, long size, int prot);
|
void record_pkey_malloc(void *ptr, long size, int prot);
|
||||||
|
@ -32,8 +32,6 @@
|
|||||||
|
|
||||||
#define STACK_SIZE PTHREAD_STACK_MIN
|
#define STACK_SIZE PTHREAD_STACK_MIN
|
||||||
|
|
||||||
void expected_pkey_fault(int pkey) {}
|
|
||||||
|
|
||||||
pthread_mutex_t mutex = PTHREAD_MUTEX_INITIALIZER;
|
pthread_mutex_t mutex = PTHREAD_MUTEX_INITIALIZER;
|
||||||
pthread_cond_t cond = PTHREAD_COND_INITIALIZER;
|
pthread_cond_t cond = PTHREAD_COND_INITIALIZER;
|
||||||
siginfo_t siginfo = {0};
|
siginfo_t siginfo = {0};
|
||||||
|
Loading…
x
Reference in New Issue
Block a user