-
Notifications
You must be signed in to change notification settings - Fork 487
Fix bug with resolving relative symlinks during linux header detection #2038
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
Merged
ddelnano
merged 3 commits into
pixie-io:main
from
ddelnano:ddelnano/fix-header-path-resolution-for-relative-symlinks
Oct 11, 2024
Merged
Fix bug with resolving relative symlinks during linux header detection #2038
ddelnano
merged 3 commits into
pixie-io:main
from
ddelnano:ddelnano/fix-header-path-resolution-for-relative-symlinks
Oct 11, 2024
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
Signed-off-by: Dom Del Nano <ddelnano@gmail.com>
|
Thank you! |
oazizi000
reviewed
Oct 11, 2024
…lambda. Signed-off-by: Dom Del Nano <ddelnano@gmail.com>
oazizi000
approved these changes
Oct 11, 2024
Signed-off-by: Dom Del Nano <ddelnano@gmail.com>
ddelnano
added a commit
to ddelnano/pixie
that referenced
this pull request
Aug 6, 2025
pixie-io#2038) Summary: Fix bug with resolving relative symlinks during linux header detection Please see linked issue for details Relevant Issues: Closes pixie-io#2037 Type of change: /kind bugfix Test Plan: Verified the following - [x] Confirmed with user that reported the issue that this works for openSUSE's MicroOS linux headers - [x] Verified on Ubuntu that using an absolute symlink works (upstream package, no modification) ``` ddelnano@dev-vm:/lib/modules/6.8.0-1015-gcp$ ls -l build lrwxrwxrwx 1 root root 37 Sep 2 14:42 build -> /usr/src/linux-headers-6.8.0-1015-gcp # Verify custom built stirling_wrapper identifies absolute headers $ sudo docker run -v /:/host -v /sys:/sys -v /var/lib/docker:/var/lib/docker --pid=host --cgroupns host --env "PL_HOST_PATH=/host" bazel/src/stirling/binaries:stirling_wrapper_image I20241011 21:32:38.893605 395713 linux_headers.cc:257] Looking for host Linux headers at /host/lib/modules/6.8.0-1015-gcp/build. I20241011 21:32:38.893646 395713 linux_headers.cc:237] Symlink target is an absolute path. Converting that to host path: /usr/src/linux-headers-6.8.0-1015-gcp -> /host/usr/src/linux-headers-6.8.0-1015-gcp. I20241011 21:32:38.893750 395713 linux_headers.cc:261] Linked host headers at /host/usr/src/linux-headers-6.8.0-1015-gcp to symlink in pem namespace at /lib/modules/6.8.0-1015-gcp/build. I20241011 21:32:38.893783 395713 linux_headers.cc:257] Looking for host Linux headers at /host/lib/modules/6.8.0-1015-gcp/source. ``` - [x] Verified on Ubuntu that using a relative symlink (modified by hand with reproduction steps in pixie-io#2037) ``` # Verify build is a relative symlink and resolves outside a container ddelnano@dev-vm:/lib/modules/6.8.0-1015-gcp$ ls -l total 1480 lrwxrwxrwx 1 root root 48 Oct 11 20:39 build -> ../../../../usr/src/linux-headers-6.8.0-1015-gcp # Verify custom built stirling_wrapper identifies relative headers $ sudo docker run -v /:/host -v /sys:/sys -v /var/lib/docker:/var/lib/docker --pid=host --cgroupns host --env "PL_HOST_PATH=/host" bazel/src/stirling/binaries:stirling_wrapper_image I20241011 21:30:16.825937 395471 linux_headers.cc:257] Looking for host Linux headers at /host/lib/modules/6.8.0-1015-gcp/build. I20241011 21:30:16.825973 395471 linux_headers.cc:242] Symlink target is a relative path. Concatenating it to parent directory: /host/lib/modules/6.8.0-1015-gcp/../../../../usr/src/linux-headers-6.8.0-1015-gcp I20241011 21:30:16.826067 395471 linux_headers.cc:261] Linked host headers at /host/lib/modules/6.8.0-1015-gcp/../../../../usr/src/linux-headers-6.8.0-1015-gcp to symlink in pem namespace at /lib/modules/6.8.0-1015-gcp/build. ``` Changelog Message: Fixed an issue where certain linux upstream distro's header packages would fail to be identified --------- Signed-off-by: Dom Del Nano <ddelnano@gmail.com> GitOrigin-RevId: 1bd9ace
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: Fix bug with resolving relative symlinks during linux header detection
Please see linked issue for details
Relevant Issues: Closes #2037
Type of change: /kind bugfix
Test Plan: Verified the following
Changelog Message: Fixed an issue where certain linux upstream distro's header packages would fail to be identified