diff options
author | Brian Gerst <brgerst@gmail.com> | 2022-03-25 11:39:52 -0400 |
---|---|---|
committer | Borislav Petkov <bp@suse.de> | 2022-04-14 14:09:43 +0200 |
commit | 3a24a60854d2ef19e0edcd11cdbbb4fabc655dde (patch) | |
tree | 6061a7a4b6201c8614472b17bbccafb249bd91d3 /arch/x86/kernel/ptrace.c | |
parent | 9554e908fb5d02e48a681d1eca180225bf109e83 (diff) | |
download | lwn-3a24a60854d2ef19e0edcd11cdbbb4fabc655dde.tar.gz lwn-3a24a60854d2ef19e0edcd11cdbbb4fabc655dde.zip |
x86/32: Remove lazy GS macros
GS is always a user segment now.
Signed-off-by: Brian Gerst <brgerst@gmail.com>
Signed-off-by: Borislav Petkov <bp@suse.de>
Reviewed-by: Thomas Gleixner <tglx@linutronix.de>
Acked-by: Andy Lutomirski <luto@kernel.org>
Link: https://lore.kernel.org/r/20220325153953.162643-4-brgerst@gmail.com
Diffstat (limited to 'arch/x86/kernel/ptrace.c')
-rw-r--r-- | arch/x86/kernel/ptrace.c | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/arch/x86/kernel/ptrace.c b/arch/x86/kernel/ptrace.c index 98d10ef60571..37c12fb92906 100644 --- a/arch/x86/kernel/ptrace.c +++ b/arch/x86/kernel/ptrace.c @@ -170,9 +170,9 @@ static u16 get_segment_reg(struct task_struct *task, unsigned long offset) retval = *pt_regs_access(task_pt_regs(task), offset); else { if (task == current) - retval = get_user_gs(task_pt_regs(task)); + savesegment(gs, retval); else - retval = task_user_gs(task); + retval = task->thread.gs; } return retval; } @@ -210,7 +210,7 @@ static int set_segment_reg(struct task_struct *task, break; case offsetof(struct user_regs_struct, gs): - task_user_gs(task) = value; + task->thread.gs = value; } return 0; |