Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

timechaos: support injection on aarch64 #3088

Merged
merged 25 commits into from
Jun 1, 2022

Conversation

YangKeao
Copy link
Member

What problem does this PR solve?

Support TimeChaos on aarch64

Before reviewing this PR, it's highly suggested to read the document of ldr arm instruction: ldr literal and ldr register. The source code of binutils is also helpful in understanding the relocation of arm64.

You could objdump -d to disassembly the codes of fake image.

@ti-chi-bot
Copy link
Member

ti-chi-bot commented Mar 31, 2022

[REVIEW NOTIFICATION]

This pull request has been approved by:

  • Andrewmatilde
  • iguoyr

To complete the pull request process, please ask the reviewers in the list to review by filling /cc @reviewer in the comment.
After your PR has acquired the required number of LGTMs, you can assign this pull request to the committer in the list by filling /assign @committer in the comment to help you merge this pull request.

The full list of commands accepted by this bot can be found here.

Reviewer can indicate their review by submitting an approval review.
Reviewer can cancel approval by submitting a request changes review.

@codecov
Copy link

codecov bot commented Mar 31, 2022

Codecov Report

Merging #3088 (cc406d9) into master (bbbb6da) will increase coverage by 0.12%.
The diff coverage is 80.00%.

Impacted file tree graph

@@            Coverage Diff             @@
##           master    #3088      +/-   ##
==========================================
+ Coverage   41.08%   41.21%   +0.12%     
==========================================
  Files         163      165       +2     
  Lines       13796    13819      +23     
==========================================
+ Hits         5668     5695      +27     
+ Misses       7699     7695       -4     
  Partials      429      429              
Impacted Files Coverage Δ
pkg/chaosdaemon/time_server.go 0.00% <0.00%> (ø)
pkg/time/asset.go 58.92% <57.14%> (-5.36%) ⬇️
pkg/time/fake_image_linux.go 49.29% <71.42%> (ø)
pkg/time/fake_image_amd64.go 83.33% <83.33%> (ø)
pkg/time/asset_amd64.go 100.00% <100.00%> (ø)
api/v1alpha1/zz_generated.chaosmesh.go 57.04% <0.00%> (-0.32%) ⬇️
pkg/workflow/controllers/chaos_node_reconciler.go 61.31% <0.00%> (+3.15%) ⬆️

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 9ed62da...cc406d9. Read the comment docs.

buffer := make([]byte, size)

localIov := C.struct_iovec{
iov_base: C.long(uintptr(unsafe.Pointer(&buffer[0]))),
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

G103: Use of unsafe calls should be audited

(at-me in a reply with help or ignore)

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

ignore

Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I've recorded this as ignored for this pull request. If you change your mind, just comment @sonatype-lift unignore.

Signed-off-by: YangKeao <yangkeao@chunibyo.icu>
Signed-off-by: YangKeao <yangkeao@chunibyo.icu>
Signed-off-by: YangKeao <yangkeao@chunibyo.icu>
Signed-off-by: YangKeao <yangkeao@chunibyo.icu>
Signed-off-by: YangKeao <yangkeao@chunibyo.icu>
@iguoyr
Copy link
Member

iguoyr commented Apr 15, 2022

Close #2634

@iguoyr iguoyr linked an issue Apr 15, 2022 that may be closed by this pull request
@YangKeao
Copy link
Member Author

@iguoyr @Andrewmatilde PTAL

@STRRL STRRL added this to the Draft: Release 2.3 milestone Apr 26, 2022
@iguoyr iguoyr linked an issue Apr 29, 2022 that may be closed by this pull request
Signed-off-by: YangKeao <yangkeao@chunibyo.icu>
Signed-off-by: YangKeao <yangkeao@chunibyo.icu>
Signed-off-by: YangKeao <yangkeao@chunibyo.icu>
Signed-off-by: YangKeao <yangkeao@chunibyo.icu>
Copy link
Member

@Andrewmatilde Andrewmatilde left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Rest LGTM

pkg/ptrace/stdwrapper_amd64.go Outdated Show resolved Hide resolved
pkg/ptrace/ptrace_linux.go Show resolved Hide resolved
pkg/ptrace/ptrace_linux_arm64.go Show resolved Hide resolved
Signed-off-by: YangKeao <yangkeao@chunibyo.icu>
Signed-off-by: YangKeao <yangkeao@chunibyo.icu>
Signed-off-by: YangKeao <yangkeao@chunibyo.icu>
@YangKeao
Copy link
Member Author

YangKeao commented May 26, 2022

@STRRL PTAL.

The arm timechaos test has passed 😆

Signed-off-by: YangKeao <yangkeao@chunibyo.icu>
pkg/time/asset.go Outdated Show resolved Hide resolved
Signed-off-by: YangKeao <yangkeao@chunibyo.icu>
pkg/time/asset_amd64.go Outdated Show resolved Hide resolved
pkg/time/asset_arm64.go Outdated Show resolved Hide resolved
pkg/time/asset_arm64.go Show resolved Hide resolved
Signed-off-by: YangKeao <yangkeao@chunibyo.icu>
pkg/time/asset_arm64.go Outdated Show resolved Hide resolved
Signed-off-by: YangKeao <yangkeao@chunibyo.icu>
pkg/ptrace/ptrace_linux_arm64.go Show resolved Hide resolved
pkg/ptrace/ptrace_linux_arm64.go Show resolved Hide resolved
pkg/ptrace/ptrace_linux_arm64.go Outdated Show resolved Hide resolved
pkg/ptrace/ptrace_linux_arm64.go Show resolved Hide resolved
Signed-off-by: YangKeao <yangkeao@chunibyo.icu>
pkg/ptrace/ptrace_linux.go Outdated Show resolved Hide resolved
Signed-off-by: YangKeao <yangkeao@chunibyo.icu>
@iguoyr
Copy link
Member

iguoyr commented May 30, 2022

@YangKeao Please fix the CI :)

@YangKeao
Copy link
Member Author

@YangKeao Please fix the CI :)

PTAL

Copy link
Member

@iguoyr iguoyr left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM! 👍

@YangKeao
Copy link
Member Author

@Andrewmatilde @STRRL PTAL

Copy link
Member

@Andrewmatilde Andrewmatilde left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

@YangKeao
Copy link
Member Author

YangKeao commented Jun 1, 2022

/merge

@ti-chi-bot
Copy link
Member

This pull request has been accepted and is ready to merge.

Commit hash: 8ff6cb2

@ti-chi-bot ti-chi-bot merged commit 5184d78 into chaos-mesh:master Jun 1, 2022
xlgao-zju pushed a commit to xlgao-zju/chaos-mesh that referenced this pull request Apr 23, 2023
* add aarch64 support for timechaos

Signed-off-by: YangKeao <yangkeao@chunibyo.icu>

Co-authored-by: Ti Chi Robot <ti-community-prow-bot@tidb.io>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

support ptrace on arm64 timechaos support arm64
5 participants