criu icon indicating copy to clipboard operation
criu copied to clipboard

breakpoint: implement hw breakpoint for arm64 platform

Open time-river opened this issue 2 years ago • 7 comments

The same as commit 0b1b815, I implement the hardware breakpoint for arm64 platform :-)

I notice the following commit, therefore the feature can't be enabled:

        /*
         * Temporary workaround for Xen guests. Breakpoints degrade
         * performance linearly, so until we find out the reason,
         * let's disable them.
         */
        if (f == FI_NO_BREAKPOINTS)
                return true;

I don't know the reason here, and I don't have Xen environment. Besides the arm64 breakpoint, only x86 has this feature, therefore I only disable x86 by macro CONFIG_X86_64.

Note: the problem I met before is here #1811

NOTICE: DOING -- bug: Can't restore SIGTRAP signal (testcase zdtm/static/sigtrap01 failed)

time-river avatar Apr 20 '22 15:04 time-river

@time-river what is the status of this PR? Is it ready for review?

avagin avatar May 11 '22 15:05 avagin

@time-river could you rebase this pr?

avagin avatar May 17 '22 15:05 avagin

@time-river could you rebase this pr?

time-river avatar May 20 '22 08:05 time-river

@time-river could you rebase this pr?

no problem.

time-river avatar May 20 '22 08:05 time-river

Codecov Report

Merging #1815 (e1605c4) into criu-dev (2b3763f) will increase coverage by 0.38%. The diff coverage is 28.57%.

@@             Coverage Diff              @@
##           criu-dev    #1815      +/-   ##
============================================
+ Coverage     69.20%   69.59%   +0.38%     
============================================
  Files           126      128       +2     
  Lines         33355    32234    -1121     
============================================
- Hits          23083    22432     -651     
+ Misses        10272     9802     -470     
Impacted Files Coverage Δ
criu/arch/x86/include/asm/restorer.h 69.23% <ø> (ø)
criu/include/fault-injection.h 100.00% <ø> (ø)
criu/cr-restore.c 67.08% <16.66%> (+0.01%) :arrow_up:
compel/arch/x86/src/lib/infect.c 45.42% <100.00%> (ø)
criu/page-xfer.c 78.48% <0.00%> (-0.93%) :arrow_down:
criu/uffd.c 79.58% <0.00%> (-0.26%) :arrow_down:
criu/arch/x86/cpu.c 74.65% <0.00%> (-0.18%) :arrow_down:
criu/include/vma.h 100.00% <0.00%> (ø)
criu/include/parasite.h 100.00% <0.00%> (ø)
compel/src/lib/infect.c
... and 11 more

Continue to review full report at Codecov.

Legend - Click here to learn more Δ = absolute <relative> (impact), ø = not affected, ? = missing data Powered by Codecov. Last update 2b3763f...e1605c4. Read the comment docs.

codecov-commenter avatar May 22 '22 07:05 codecov-commenter

@time-river what is the status of this PR? Is it ready for review?

YES, I run the test suit in arm64 platform, it works well.

time-river avatar May 23 '22 01:05 time-river

commit 5211a57f4a73217c737b843389c9be80c50063aa
Author: fu.lin <[email protected]>
Date:   Fri Apr 15 13:00:04 2022 +0800

    compel: switch breakpoint functions to non-inline at arm64 platform
    
    Signed-off-by: fu.lin <[email protected]>
    
    init

^ leftover comment in first patch commit message - please remove.

Also you add argument restore to ptrace_flush_breakpoints() function without mentioning it in a commit message, please do.

Snorch avatar Jun 03 '22 12:06 Snorch