diff options
author | Thomas Huth <thuth@redhat.com> | 2023-10-25 10:38:02 +0300 |
---|---|---|
committer | Arnd Bergmann <arnd@arndb.de> | 2023-10-25 16:54:24 +0300 |
commit | 550087a0ba91eb001c139f563a193b1e9ef5a8dd (patch) | |
tree | 1db7d2e1fe84ea2008444fa6131fee522c11f7fd /arch/hexagon | |
parent | f82060480095a909291adc90d5579f50b6ec0627 (diff) | |
download | linux-550087a0ba91eb001c139f563a193b1e9ef5a8dd.tar.xz |
hexagon: Remove unusable symbols from the ptrace.h uapi
Kernel-internal prototypes, references to current_thread_info()
and code hidden behind a CONFIG_HEXAGON_ARCH_VERSION switch are
certainly not usable in userspace, so this should not reside
in a uapi header. Move the code into an internal version of
ptrace.h instead.
Signed-off-by: Thomas Huth <thuth@redhat.com>
Signed-off-by: Arnd Bergmann <arnd@arndb.de>
Diffstat (limited to 'arch/hexagon')
-rw-r--r-- | arch/hexagon/include/asm/ptrace.h | 25 | ||||
-rw-r--r-- | arch/hexagon/include/uapi/asm/ptrace.h | 13 |
2 files changed, 25 insertions, 13 deletions
diff --git a/arch/hexagon/include/asm/ptrace.h b/arch/hexagon/include/asm/ptrace.h new file mode 100644 index 000000000000..ed35da1ee685 --- /dev/null +++ b/arch/hexagon/include/asm/ptrace.h @@ -0,0 +1,25 @@ +/* SPDX-License-Identifier: GPL-2.0 */ +/* + * Ptrace definitions for the Hexagon architecture + * + * Copyright (c) 2010-2011, The Linux Foundation. All rights reserved. + */ + +#ifndef _ASM_HEXAGON_PTRACE_H +#define _ASM_HEXAGON_PTRACE_H + +#include <uapi/asm/ptrace.h> + +/* kprobe-based event tracer support */ +extern int regs_query_register_offset(const char *name); +extern const char *regs_query_register_name(unsigned int offset); + +#define current_pt_regs() \ + ((struct pt_regs *) \ + ((unsigned long)current_thread_info() + THREAD_SIZE) - 1) + +#if CONFIG_HEXAGON_ARCH_VERSION >= 4 +#define arch_has_single_step() (1) +#endif + +#endif diff --git a/arch/hexagon/include/uapi/asm/ptrace.h b/arch/hexagon/include/uapi/asm/ptrace.h index f79de05b8689..2a3ea14ad9b9 100644 --- a/arch/hexagon/include/uapi/asm/ptrace.h +++ b/arch/hexagon/include/uapi/asm/ptrace.h @@ -29,17 +29,4 @@ #define profile_pc(regs) instruction_pointer(regs) -/* kprobe-based event tracer support */ -extern int regs_query_register_offset(const char *name); -extern const char *regs_query_register_name(unsigned int offset); - -#define current_pt_regs() \ - ((struct pt_regs *) \ - ((unsigned long)current_thread_info() + THREAD_SIZE) - 1) - -#if CONFIG_HEXAGON_ARCH_VERSION >= 4 -#define arch_has_single_step() (1) -#endif - - #endif |