-
Notifications
You must be signed in to change notification settings - Fork 729
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
elf: do not remove dots from names #1680
base: main
Are you sure you want to change the base?
Conversation
89e0865
to
14bd6e2
Compare
14bd6e2
to
c7b8bd9
Compare
The ELF reader currently strips dots from object names if the kernel doesn't support them. This is against the goal that the ELF reader should produce the same result no matter which environment it is run in. Change the setup around slightly, so that the ELF reader now always allows dots in names. Instead we strip dots if necessary when making the syscalls. This will break users which: * use object names with dots in them * on kernels which don't support dots * which are pinned into bppfs Signed-off-by: Lorenz Bauer <[email protected]>
This reverts commit cfd8515. Now that the ELF reader doesn't rely on feature tests anymore we can undo the change to treat EPERM specially. Signed-off-by: Lorenz Bauer <[email protected]>
@ti-mo any concerns about this one? |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Not Timo here but this would be a great change 👍
My main concern is we should've thought this through before we merged the initial version. 😛 Also, I'd really like to unexport Also, I found this: https://sourcegraph.com/github.com/cloudflare/xdpcap/-/blob/hook.go?L23-25. We need to give existing users a workaround if we can. Unfortunately, xdpcap substitutes with I have a few Qs:
|
As far as I know bpffs doesn't have restrictions on what files can be named (outside of the usual rules which apply to all filesystems). The only limitation is on map and program names as passed to the create syscalls. I think that rule came about because programs end up in /proc/kallsyms, but I'm not sure. I think we shouldn't sanitize in Pin and LoadPinned since bpffs doesn't have these restrictions.
You're saying: this change may break xdpcap because on old kernels
Let's tackle that separately if need be? |
elf: do not remove dots from names
Revert "features: tolerate EPERM in haveObjName and objNameAllowsDot"