Skip to content

Commit 550087a

Browse files
hutharndb
authored andcommitted
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>
1 parent f820604 commit 550087a

File tree

3 files changed

+25
-14
lines changed

3 files changed

+25
-14
lines changed

arch/hexagon/include/asm/ptrace.h

Lines changed: 25 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,25 @@
1+
/* SPDX-License-Identifier: GPL-2.0 */
2+
/*
3+
* Ptrace definitions for the Hexagon architecture
4+
*
5+
* Copyright (c) 2010-2011, The Linux Foundation. All rights reserved.
6+
*/
7+
8+
#ifndef _ASM_HEXAGON_PTRACE_H
9+
#define _ASM_HEXAGON_PTRACE_H
10+
11+
#include <uapi/asm/ptrace.h>
12+
13+
/* kprobe-based event tracer support */
14+
extern int regs_query_register_offset(const char *name);
15+
extern const char *regs_query_register_name(unsigned int offset);
16+
17+
#define current_pt_regs() \
18+
((struct pt_regs *) \
19+
((unsigned long)current_thread_info() + THREAD_SIZE) - 1)
20+
21+
#if CONFIG_HEXAGON_ARCH_VERSION >= 4
22+
#define arch_has_single_step() (1)
23+
#endif
24+
25+
#endif

arch/hexagon/include/uapi/asm/ptrace.h

Lines changed: 0 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -29,17 +29,4 @@
2929

3030
#define profile_pc(regs) instruction_pointer(regs)
3131

32-
/* kprobe-based event tracer support */
33-
extern int regs_query_register_offset(const char *name);
34-
extern const char *regs_query_register_name(unsigned int offset);
35-
36-
#define current_pt_regs() \
37-
((struct pt_regs *) \
38-
((unsigned long)current_thread_info() + THREAD_SIZE) - 1)
39-
40-
#if CONFIG_HEXAGON_ARCH_VERSION >= 4
41-
#define arch_has_single_step() (1)
42-
#endif
43-
44-
4532
#endif

scripts/headers_install.sh

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -74,7 +74,6 @@ arch/arc/include/uapi/asm/page.h:CONFIG_ARC_PAGE_SIZE_16K
7474
arch/arc/include/uapi/asm/page.h:CONFIG_ARC_PAGE_SIZE_4K
7575
arch/arc/include/uapi/asm/swab.h:CONFIG_ARC_HAS_SWAPE
7676
arch/arm/include/uapi/asm/ptrace.h:CONFIG_CPU_ENDIAN_BE8
77-
arch/hexagon/include/uapi/asm/ptrace.h:CONFIG_HEXAGON_ARCH_VERSION
7877
arch/hexagon/include/uapi/asm/user.h:CONFIG_HEXAGON_ARCH_VERSION
7978
arch/m68k/include/uapi/asm/ptrace.h:CONFIG_COLDFIRE
8079
arch/nios2/include/uapi/asm/swab.h:CONFIG_NIOS2_CI_SWAB_NO

0 commit comments

Comments
 (0)