函数逻辑报告

Linux Kernel

v5.5.9

Brick Technologies Co., Ltd

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

函数名称:Handle debug exception notifications.* Return value is either NOTIFY_STOP or NOTIFY_DONE as explained below.* NOTIFY_DONE returned if one of the following conditions is true.* i) When the causative address is from user-space and the exception

函数原型:static int hw_breakpoint_handler(struct die_args *args)

返回类型:int

参数:

类型参数名称
struct die_args *args
440  rc等于Clean way to return from the notifier and stop further calls.
446  dr6_p等于错误号
447  dr6等于dr6_p
450  如果dr6按位与single-step 则返回:Don't care
454  如果dr6按位与DR_TRAP_BITS的值恒等于0则返回:Don't care
457  These special macros can be used to get or set a debugging register(dr7, 7)
459  set_debugreg(0UL, 7)
465  debugreg6与等于DR_TRAP_BITS的反
466  cpu等于get_cpu()
469 i小于Total number of available HW breakpoint registers 循环
470  如果此条件成立可能性大(为编译器优化)(!(dr6 & (db0 << i)))则继续下一循环
479  _read_lock() - mark the beginning of an RCU read-side critical section* When synchronize_rcu() is invoked on one CPU while other CPUs* are within RCU read-side critical sections, then the* synchronize_rcu() is guaranteed to block until after all the other
481  bp等于per_cpu(Stores the breakpoints currently in use on each breakpoint address* register for each cpus[i], cpu)
486  dr6_p与等于db0 左移i位的值的反
491  如果非bp
493  退出
496  perf_bp_event(bp, regs)
502  如果type恒等于rigger on instruction execute flags或等于X86_EFLAGS_RF
505  _read_unlock() - marks the end of an RCU read-side critical section.* In most situations, rcu_read_unlock() is immune from deadlock.* However, in kernels built with CONFIG_RCU_BOOST, rcu_read_unlock()
512  如果debugreg6按位与DR_TRAP_BITSdr6按位与DR_TRAP_BITS的反则rc等于Don't care
516  set_debugreg(dr7, 7)
517  put_cpu()
519  返回:rc
调用者
名称描述
hw_breakpoint_exceptions_notifyHandle debug exception notifications.