Add ARM64 / AWS Graviton build support and portability fixes for rpcapd#6
Open
0xM47H3W wants to merge 2 commits intoExtraHop:masterfrom
Open
Add ARM64 / AWS Graviton build support and portability fixes for rpcapd#60xM47H3W wants to merge 2 commits intoExtraHop:masterfrom
0xM47H3W wants to merge 2 commits intoExtraHop:masterfrom
Conversation
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
This PR adds ARM64 / AArch64 platform support to the ExtraHop
rpcapdagent by applying a series of portability, build, and compatibility fixes.The resulting binary runs successfully on:
This work enables customers and partners to deploy rpcapd on ARM-based cloud infrastructure, which is increasingly common (especially Graviton EC2 instances).
The patches preserve the existing x86 behavior while enabling the remote-capture functionality (
HAVE_REMOTE) to work correctly on ARM64.Why This Change Is Needed
ExtraHop sensors rely on rpcapd for remote packet capture, but the upstream rpcapd codebase is derived from an older WinPcap/libpcap tree that:
sfence,lfence)Customers using AWS Graviton or other ARM64 compute platforms cannot currently deploy rpcapd successfully without these modifications.
This PR provides the necessary compatibility updates.
Key Changes
✔ libpcap compatibility fixes
#include <linux/sockios.h>(required for SIOCGSTAMP)HAVE_REMOTE)<stdint.h>forUINT16_MAX-staticto avoid missing libc/crypt static libs on ARM✔ rpcapd portability fixes
sfence,lfence)__sync_synchronize()sockmainbetweenpcap-new.candrpcapd.c✔ Build system updates
configureaccepts AArch64 via--build=aarch64-unknown-linux-gnu-Wno-error -DHAVE_REMOTE -I../Testing
The ARM64
rpcapdbinary was successfully validated against:✔ Amazon Linux 2023 (Graviton)
✔ Local RPCAP protocol testing
-a <sensor-ip>,2003) establishes TCP connections correctly-p 2002) binds and listens on ARM64✔ ExtraHop sensor (production test)
Backward Compatibility
This PR introduces no breaking changes for x86/x86_64 platforms:
__sync_synchronize()safelyAdditional Notes
Thank you for maintaining this repository — and please let me know if you'd like the ARM64 patches split into multiple commits for easier review.