Function report

Linux Kernel

v5.5.9

Brick Technologies Co., Ltd

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

Name:Validate the arch-specific HW Breakpoint register settings

Proto:int hw_breakpoint_arch_parse(struct perf_event *bp, const struct perf_event_attr *attr, struct arch_hw_breakpoint *hw)

Type:int

Parameter:

TypeParameterName
struct perf_event *bp
const struct perf_event_attr *attr
struct arch_hw_breakpoint *hw
322  ret = arch_build_bp_info(bp, attr, hw)
323  If ret Then Return ret
327  Case len == X86_BREAKPOINT_LEN_1
328  align = 0
329  If mask Then align = mask
331  Break
332  Case len == X86_BREAKPOINT_LEN_2
333  align = 1
334  Break
335  Case len == X86_BREAKPOINT_LEN_4
336  align = 3
337  Break
339  Case len == X86_BREAKPOINT_LEN_8
340  align = 7
341  Break
343  Default
344  WARN_ON_ONCE(1)
345  Return -EINVAL
352  If address & align Then Return -EINVAL
355  Return 0