函数逻辑报告

Linux Kernel

v5.5.9

Brick Technologies Co., Ltd

Source Code:arch\x86\kernel\ptrace.c Create Date:2022-07-27 08:51:55
Last Modify:2020-03-12 14:18:49 Copyright©Brick
首页 函数Tree
注解内核,赢得工具下载SCCTEnglish

函数名称:Handle ptrace writes to debug register 7.

函数原型:static int ptrace_write_dr7(struct task_struct *tsk, unsigned long data)

返回类型:int

参数:

类型参数名称
struct task_struct *tsk
unsigned longdata
579  thread等于* New fields for task_struct should be added above here, so that * they are included in the randomized portion of task_struct.
581  bool second_pass = false
582  ret等于0
584  data与等于Reserved 的反
585  old_dr7等于Walk through every ptrace breakpoints for this thread and* build the dr7 value on top of their attributes.
587  restore :
588  rc等于0
589 i小于Total number of available HW breakpoint registers 循环
591  disabled等于非Decode the length and type bits for a particular breakpoint as* stored in debug register 7. Return the "enabled" status.
592  bp等于 Save middle states of ptrace breakpoints [i]
594  如果非bp
595  如果disabled则继续下一循环
600  如果是错误
601  rc等于错误
602  退出
606  继续下一循环
609  rc等于ptrace_modify_breakpoint(bp, len, type, disabled)
610  如果rc退出
615  如果rc且非WARN_ON(second_pass)则
616  ret等于rc
617  data等于old_dr7
618  second_pass = true
619  转到:restore
622  返回:ret
调用者
名称描述
ptrace_set_debugregHandle PTRACE_POKEUSR calls for the debug register area.