Function report

Linux Kernel

v5.5.9

Brick Technologies Co., Ltd

Source Code:arch\x86\kernel\ptrace.c Create Date:2022-07-28 07:51:46
Last Modify:2020-03-12 14:18:49 Copyright©Brick
home page Tree
Annotation kernel can get tool activityDownload SCCTChinese

Name:Handle PTRACE_PEEKUSR calls for the debug register area.

Proto:static unsigned long ptrace_get_debugreg(struct task_struct *tsk, int n)

Type:unsigned long

Parameter:

TypeParameterName
struct task_struct *tsk
intn
630  thread = * New fields for task_struct should be added above here, so that * they are included in the randomized portion of task_struct.
631  val = 0
633  If n < Total number of available HW breakpoint registers Then
634  index = array_index_nospec - sanitize an array index after a bounds check* For a code sequence like:* if (index < size) {* index = array_index_nospec(index, size);* val = array[index];* }* (n, Total number of available HW breakpoint registers )
635  bp = Save middle states of ptrace breakpoints [index]
637  If bp Then val = address
639  Else if n == 6 Then
640  val = Debug status used for traps, single steps, etc...
641  Else if n == 7 Then
642  val = Keep track of the exact dr7 value set by the user
644  Return val
Caller
NameDescribe
arch_ptrace