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

internal: fix reading auxv on 32-bit platforms #1144

Merged
merged 1 commit into from
Oct 11, 2023
Merged

Conversation

lmb
Copy link
Collaborator

@lmb lmb commented Oct 2, 2023

It turns out that the auxiliary vector has a platform specific size. Adjust the code to use uintptr to approximate "unsigned long" from C.

Fixes #1133

@lmb lmb force-pushed the arm32-auxv branch 3 times, most recently from 687471a to c41af06 Compare October 2, 2023 15:46
@lmb
Copy link
Collaborator Author

lmb commented Oct 2, 2023

@hailwind could you give this a try on your arm32 environment?

@lmb lmb requested a review from brycekahle October 2, 2023 15:53
@lmb lmb marked this pull request as ready for review October 2, 2023 15:53
internal/vdso.go Outdated Show resolved Hide resolved
@ti-mo
Copy link
Collaborator

ti-mo commented Oct 11, 2023

@lmb Here's /proc/self/auxv from an i686 bookworm VM: auxv32.txt. Named .txt because GitHub.

It turns out that the auxiliary vector has a platform specific size.
Adjust the code to use uintptr to approximate "unsigned long" from C.
auxv32le.bin is from an i686 Debian bookworm machine.

Fixes cilium#1133

Signed-off-by: Lorenz Bauer <lmb@isovalent.com>
@lmb
Copy link
Collaborator Author

lmb commented Oct 11, 2023

Thanks for that, I had to change the code a little to be able to test 32bit on a 64bit host.

@lmb lmb merged commit ed9bf3b into cilium:main Oct 11, 2023
12 checks passed
@lmb lmb deleted the arm32-auxv branch October 11, 2023 14:03
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

error read auxv in vdsoMemoryAddress function in arm_32 env
3 participants