mirror of https://github.com/OpenIPC/firmware.git
37 lines
1.0 KiB
Diff
37 lines
1.0 KiB
Diff
diff -drupN a/arch/arm64/kernel/ptrace.c b/arch/arm64/kernel/ptrace.c
|
|
--- a/arch/arm64/kernel/ptrace.c 2018-08-06 17:23:04.000000000 +0300
|
|
+++ b/arch/arm64/kernel/ptrace.c 2022-06-12 05:28:14.000000000 +0300
|
|
@@ -327,13 +327,13 @@ static int ptrace_hbp_fill_attr_ctrl(uns
|
|
struct arch_hw_breakpoint_ctrl ctrl,
|
|
struct perf_event_attr *attr)
|
|
{
|
|
- int err, len, type, disabled = !ctrl.enabled;
|
|
+ int err, len, type, offset, disabled = !ctrl.enabled;
|
|
|
|
attr->disabled = disabled;
|
|
if (disabled)
|
|
return 0;
|
|
|
|
- err = arch_bp_generic_fields(ctrl, &len, &type);
|
|
+ err = arch_bp_generic_fields(ctrl, &len, &type, &offset);
|
|
if (err)
|
|
return err;
|
|
|
|
@@ -352,6 +352,7 @@ static int ptrace_hbp_fill_attr_ctrl(uns
|
|
|
|
attr->bp_len = len;
|
|
attr->bp_type = type;
|
|
+ attr->bp_addr += offset;
|
|
|
|
return 0;
|
|
}
|
|
@@ -404,7 +405,7 @@ static int ptrace_hbp_get_addr(unsigned
|
|
if (IS_ERR(bp))
|
|
return PTR_ERR(bp);
|
|
|
|
- *addr = bp ? bp->attr.bp_addr : 0;
|
|
+ *addr = bp ? counter_arch_bp(bp)->address : 0;
|
|
return 0;
|
|
}
|
|
|