Lines Matching +full:tf +full:- +full:a

1 // SPDX-License-Identifier: GPL-2.0
3 * x86 single-step support code, common to 32-bit and 64-bit.
16 addr = regs->ip; in convert_ip_to_linear()
17 seg = regs->cs; in convert_ip_to_linear()
26 * are all zero-based. That is largely true: the in convert_ip_to_linear()
36 mutex_lock(&child->mm->context.lock); in convert_ip_to_linear()
37 if (unlikely(!child->mm->context.ldt || in convert_ip_to_linear()
38 seg >= child->mm->context.ldt->nr_entries)) in convert_ip_to_linear()
39 addr = -1L; /* bogus selector, access would fault */ in convert_ip_to_linear()
41 desc = &child->mm->context.ldt->entries[seg]; in convert_ip_to_linear()
44 /* 16-bit code segment? */ in convert_ip_to_linear()
45 if (!desc->d) in convert_ip_to_linear()
49 mutex_unlock(&child->mm->context.lock); in convert_ip_to_linear()
85 /* 32-bit mode: register increment */ in is_setting_trap_flag()
87 /* 64-bit mode: REX prefix */ in is_setting_trap_flag()
95 * the user see the TF bit being set. But in is_setting_trap_flag()
97 * it, and a debugger could emulate this in is_setting_trap_flag()
109 * Enable single-stepping. Return nonzero if user mode is not using TF itself.
117 * If we stepped into a sysenter/syscall insn, it trapped in in enable_single_step()
118 * kernel mode; do_debug() cleared TF and set TIF_SINGLESTEP. in enable_single_step()
119 * If user-mode had set TF itself, then it's still clear from in enable_single_step()
123 * set TIF_SINGLESTEP, then both TF and TIF_FORCED_TF are in enable_single_step()
127 regs->flags |= X86_EFLAGS_TF; in enable_single_step()
130 * Always set TIF_SINGLESTEP - this guarantees that in enable_single_step()
131 * we single-step system calls etc.. This will also in enable_single_step()
132 * cause us to set TF when returning to user mode. in enable_single_step()
136 oflags = regs->flags; in enable_single_step()
138 /* Set TF on the kernel stack.. */ in enable_single_step()
139 regs->flags |= X86_EFLAGS_TF; in enable_single_step()
142 * ..but if TF is changed by the instruction we will trace, in enable_single_step()
147 * of a signal arriving right now or suchlike, we will lose in enable_single_step()
156 * If TF was already set, check whether it was us who set it. in enable_single_step()
157 * If not, we should never attempt a block step. in enable_single_step()
204 * So no one should try to use debugger block stepping in a program in enable_step()
205 * that uses user-mode single stepping itself. in enable_step()
234 /* But touch TF only if it was set by us.. */ in user_disable_single_step()
236 task_pt_regs(child)->flags &= ~X86_EFLAGS_TF; in user_disable_single_step()