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.
18 addr = regs->ip; in convert_ip_to_linear()
19 seg = regs->cs; in convert_ip_to_linear()
28 * are all zero-based. That is largely true: the in convert_ip_to_linear()
38 mutex_lock(&child->mm->context.lock); in convert_ip_to_linear()
39 if (unlikely(!child->mm->context.ldt || in convert_ip_to_linear()
40 seg >= child->mm->context.ldt->nr_entries)) in convert_ip_to_linear()
41 addr = -1L; /* bogus selector, access would fault */ in convert_ip_to_linear()
43 desc = &child->mm->context.ldt->entries[seg]; in convert_ip_to_linear()
46 /* 16-bit code segment? */ in convert_ip_to_linear()
47 if (!desc->d) in convert_ip_to_linear()
51 mutex_unlock(&child->mm->context.lock); in convert_ip_to_linear()
87 /* 32-bit mode: register increment */ in is_setting_trap_flag()
89 /* 64-bit mode: REX prefix */ in is_setting_trap_flag()
97 * the user see the TF bit being set. But in is_setting_trap_flag()
99 * it, and a debugger could emulate this in is_setting_trap_flag()
111 * Enable single-stepping. Return nonzero if user mode is not using TF itself.
119 * If we stepped into a sysenter/syscall insn, it trapped in in enable_single_step()
120 * kernel mode; do_debug() cleared TF and set TIF_SINGLESTEP. in enable_single_step()
121 * If user-mode had set TF itself, then it's still clear from in enable_single_step()
125 * set TIF_SINGLESTEP, then both TF and TIF_FORCED_TF are in enable_single_step()
129 regs->flags |= X86_EFLAGS_TF; in enable_single_step()
133 * cause us to set TF when returning to user mode. in enable_single_step()
138 * Ensure that a trap is triggered once stepping out of a system in enable_single_step()
143 oflags = regs->flags; in enable_single_step()
145 /* Set TF on the kernel stack.. */ in enable_single_step()
146 regs->flags |= X86_EFLAGS_TF; in enable_single_step()
149 * ..but if TF is changed by the instruction we will trace, in enable_single_step()
154 * of a signal arriving right now or suchlike, we will lose in enable_single_step()
163 * If TF was already set, check whether it was us who set it. in enable_single_step()
164 * If not, we should never attempt a block step. in enable_single_step()
210 * So no one should try to use debugger block stepping in a program in enable_step()
211 * that uses user-mode single stepping itself. in enable_step()
241 /* But touch TF only if it was set by us.. */ in user_disable_single_step()
243 task_pt_regs(child)->flags &= ~X86_EFLAGS_TF; in user_disable_single_step()