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

linux aarch64 (ARM) #8

Merged
merged 2 commits into from Jul 8, 2023
Merged

linux aarch64 (ARM) #8

merged 2 commits into from Jul 8, 2023

Conversation

nilnullzip
Copy link
Contributor

@nilnullzip nilnullzip commented May 8, 2023

Here is support for aarch64, issue #7. I created a new handler_ptr.c that employs pointers instead of coding addresses inline. I added Makefile target linux-aarch64 to generate the hex. This commit passes the pytest suite and also worked in my application.

In adding this support, I minimized changes to your code vs trying to introduce my methods everywhere as I didn't know what you would want to do there. I think perhaps handler_ptr.c could work for all instruction architectures and replace handler.c. Also I introduced some changes to how the hex is extracted that should be more universal.

@codecov
Copy link

codecov bot commented Jun 3, 2023

Codecov Report

Patch coverage: 50.00% and project coverage change: -1.14 ⚠️

Comparison is base (2ae15ea) 100.00% compared to head (baca206) 98.86%.

❗ Current head baca206 differs from pull request most recent head 55c0011. Consider uploading reports for the commit 55c0011 to get more accurate results

Additional details and impacted files
@@             Coverage Diff             @@
##              main       #8      +/-   ##
===========================================
- Coverage   100.00%   98.86%   -1.14%     
===========================================
  Files            7        7              
  Lines          173      176       +3     
  Branches        11       12       +1     
===========================================
+ Hits           173      174       +1     
- Misses           0        1       +1     
- Partials         0        1       +1     
Impacted Files Coverage Δ
intercepts/_handlers/__init__.py 100.00% <ø> (ø)
intercepts/_handlers/linux.py 90.00% <50.00%> (-10.00%) ⬇️

☔ View full report in Codecov by Sentry.
📢 Do you have feedback about the report comment? Let us know in this issue.

Copy link
Owner

@dlshriver dlshriver left a comment

Choose a reason for hiding this comment

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

This looks pretty good to me. Could you run ./scripts/style.sh --format on everything to make sure it passes the style check?

I'm in the process of getting an ARM system so that I can actually exercise your code. I probably won't merge this into main until that happens. I'd also like to have ARM support in the CI pipeline, but I'm not going to block this while waiting for that to happen.

handler/handler_ptr.c Show resolved Hide resolved
@nilnullzip
Copy link
Contributor Author

Black formatting fixed.

I am running intercepts on an 8GB Raspberry Pi4. Available for $120 on Amazon. Smaller memory configuration probably works too. I don't think it will work on earlier RPi as I don't think those are 64 bit.

Let me know if there is anything else you need. Thanks for the great project! -Juan

@nilnullzip nilnullzip requested a review from dlshriver June 3, 2023 21:01
@dlshriver dlshriver merged commit fd5f13d into dlshriver:main Jul 8, 2023
1 check passed
@dlshriver dlshriver self-assigned this Jul 8, 2023
@dlshriver dlshriver added the enhancement New feature or request label Jul 8, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants