Skip to content

Commit 03248ad

Browse files
committed
resume_user_mode: Move to resume_user_mode.h
Move set_notify_resume and tracehook_notify_resume into resume_user_mode.h. While doing that rename tracehook_notify_resume to resume_user_mode_work. Update all of the places that included tracehook.h for these functions to include resume_user_mode.h instead. Update all of the callers of tracehook_notify_resume to call resume_user_mode_work. Reviewed-by: Kees Cook <keescook@chromium.org> Link: https://lkml.kernel.org/r/20220309162454.123006-12-ebiederm@xmission.com Signed-off-by: "Eric W. Biederman" <ebiederm@xmission.com>
1 parent d3c51a0 commit 03248ad

File tree

35 files changed

+117
-107
lines changed

35 files changed

+117
-107
lines changed

arch/Kconfig

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -218,7 +218,7 @@ config TRACE_IRQFLAGS_SUPPORT
218218
# linux/regset.h user_regset interfaces
219219
# CORE_DUMP_USE_REGSET #define'd in linux/elf.h
220220
# TIF_SYSCALL_TRACE calls ptrace_report_syscall_{entry,exit}
221-
# TIF_NOTIFY_RESUME calls tracehook_notify_resume()
221+
# TIF_NOTIFY_RESUME calls resume_user_mode_work()
222222
#
223223
config HAVE_ARCH_TRACEHOOK
224224
bool

arch/alpha/kernel/signal.c

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -22,7 +22,7 @@
2222
#include <linux/binfmts.h>
2323
#include <linux/bitops.h>
2424
#include <linux/syscalls.h>
25-
#include <linux/tracehook.h>
25+
#include <linux/resume_user_mode.h>
2626

2727
#include <linux/uaccess.h>
2828
#include <asm/sigcontext.h>
@@ -531,7 +531,7 @@ do_work_pending(struct pt_regs *regs, unsigned long thread_flags,
531531
do_signal(regs, r0, r19);
532532
r0 = 0;
533533
} else {
534-
tracehook_notify_resume(regs);
534+
resume_user_mode_work(regs);
535535
}
536536
}
537537
local_irq_disable();

arch/arc/kernel/signal.c

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -49,7 +49,7 @@
4949
#include <linux/personality.h>
5050
#include <linux/uaccess.h>
5151
#include <linux/syscalls.h>
52-
#include <linux/tracehook.h>
52+
#include <linux/resume_user_mode.h>
5353
#include <linux/sched/task_stack.h>
5454

5555
#include <asm/ucontext.h>
@@ -438,5 +438,5 @@ void do_notify_resume(struct pt_regs *regs)
438438
* user mode
439439
*/
440440
if (test_thread_flag(TIF_NOTIFY_RESUME))
441-
tracehook_notify_resume(regs);
441+
resume_user_mode_work(regs);
442442
}

arch/arm/kernel/signal.c

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@
99
#include <linux/signal.h>
1010
#include <linux/personality.h>
1111
#include <linux/uaccess.h>
12-
#include <linux/tracehook.h>
12+
#include <linux/resume_user_mode.h>
1313
#include <linux/uprobes.h>
1414
#include <linux/syscalls.h>
1515

@@ -627,7 +627,7 @@ do_work_pending(struct pt_regs *regs, unsigned int thread_flags, int syscall)
627627
} else if (thread_flags & _TIF_UPROBE) {
628628
uprobe_notify_resume(regs);
629629
} else {
630-
tracehook_notify_resume(regs);
630+
resume_user_mode_work(regs);
631631
}
632632
}
633633
local_irq_disable();

arch/arm64/kernel/signal.c

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,7 @@
1717
#include <linux/uaccess.h>
1818
#include <linux/sizes.h>
1919
#include <linux/string.h>
20-
#include <linux/tracehook.h>
20+
#include <linux/resume_user_mode.h>
2121
#include <linux/ratelimit.h>
2222
#include <linux/syscalls.h>
2323

@@ -941,7 +941,7 @@ void do_notify_resume(struct pt_regs *regs, unsigned long thread_flags)
941941
do_signal(regs);
942942

943943
if (thread_flags & _TIF_NOTIFY_RESUME)
944-
tracehook_notify_resume(regs);
944+
resume_user_mode_work(regs);
945945

946946
if (thread_flags & _TIF_FOREIGN_FPSTATE)
947947
fpsimd_restore_current_state();

arch/csky/kernel/signal.c

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@
33
#include <linux/signal.h>
44
#include <linux/uaccess.h>
55
#include <linux/syscalls.h>
6-
#include <linux/tracehook.h>
6+
#include <linux/resume_user_mode.h>
77

88
#include <asm/traps.h>
99
#include <asm/ucontext.h>
@@ -265,5 +265,5 @@ asmlinkage void do_notify_resume(struct pt_regs *regs,
265265
do_signal(regs);
266266

267267
if (thread_info_flags & _TIF_NOTIFY_RESUME)
268-
tracehook_notify_resume(regs);
268+
resume_user_mode_work(regs);
269269
}

arch/h8300/kernel/signal.c

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -39,7 +39,7 @@
3939
#include <linux/personality.h>
4040
#include <linux/tty.h>
4141
#include <linux/binfmts.h>
42-
#include <linux/tracehook.h>
42+
#include <linux/resume_user_mode.h>
4343

4444
#include <asm/setup.h>
4545
#include <linux/uaccess.h>
@@ -283,5 +283,5 @@ asmlinkage void do_notify_resume(struct pt_regs *regs, u32 thread_info_flags)
283283
do_signal(regs);
284284

285285
if (thread_info_flags & _TIF_NOTIFY_RESUME)
286-
tracehook_notify_resume(regs);
286+
resume_user_mode_work(regs);
287287
}

arch/hexagon/kernel/process.c

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,7 @@
1414
#include <linux/tick.h>
1515
#include <linux/uaccess.h>
1616
#include <linux/slab.h>
17-
#include <linux/tracehook.h>
17+
#include <linux/resume_user_mode.h>
1818

1919
/*
2020
* Program thread launch. Often defined as a macro in processor.h,
@@ -178,7 +178,7 @@ int do_work_pending(struct pt_regs *regs, u32 thread_info_flags)
178178
}
179179

180180
if (thread_info_flags & _TIF_NOTIFY_RESUME) {
181-
tracehook_notify_resume(regs);
181+
resume_user_mode_work(regs);
182182
return 1;
183183
}
184184

arch/hexagon/kernel/signal.c

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,6 @@
77

88
#include <linux/linkage.h>
99
#include <linux/syscalls.h>
10-
#include <linux/tracehook.h>
1110
#include <linux/sched/task_stack.h>
1211

1312
#include <asm/registers.h>

arch/ia64/kernel/process.c

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -32,7 +32,7 @@
3232
#include <linux/delay.h>
3333
#include <linux/kdebug.h>
3434
#include <linux/utsname.h>
35-
#include <linux/tracehook.h>
35+
#include <linux/resume_user_mode.h>
3636
#include <linux/rcupdate.h>
3737

3838
#include <asm/cpu.h>
@@ -179,7 +179,7 @@ do_notify_resume_user(sigset_t *unused, struct sigscratch *scr, long in_syscall)
179179

180180
if (test_thread_flag(TIF_NOTIFY_RESUME)) {
181181
local_irq_enable(); /* force interrupt enable */
182-
tracehook_notify_resume(&scr->pt);
182+
resume_user_mode_work(&scr->pt);
183183
}
184184

185185
/* copy user rbs to kernel rbs */

0 commit comments

Comments
 (0)