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

[BUG]24-hide libbpf: failed to find BTF info for global/extern symbol 'pid_to_hide' #143

Open
zer0-1s opened this issue Nov 7, 2024 · 1 comment
Labels
bug Something isn't working

Comments

@zer0-1s
Copy link
Contributor

zer0-1s commented Nov 7, 2024

Describe the bug
A clear and concise description of what the bug is.
在编译 24-hide 代码时,编译错误

598 warnings generated.
libbpf: failed to find BTF info for global/extern symbol 'pid_to_hide'
Error: failed to link '.output/pidhide.tmp.bpf.o': No such file or directory (2)
make: *** [Makefile:112: .output/pidhide.bpf.o] Error 254
make: *** Deleting file '.output/pidhide.bpf.o'

To Reproduce
Steps to reproduce the behavior:

cd src/24-hide
make

Expected behavior
A clear and concise description of what you expected to happen.

Screenshots
If applicable, add screenshots to help explain your problem.

image

Desktop (please complete the following information):

  • Ubuntu 20.04
  • Linux version 5.15.0-124-generic
  • clang version 10.0.0-4ubuntu1

Additional context

Add any other context about the problem here.

https://lore.kernel.org/bpf/CAEf4BzZnZ=jqTxShQ7p2tp=0sT5iMEJVB+zqhf55XtwQHOODtA@mail.gmail.com/T/

有一个patch与此类似

@zer0-1s zer0-1s added the bug Something isn't working label Nov 7, 2024
@zer0-1s
Copy link
Contributor Author

zer0-1s commented Nov 11, 2024

修改pidhide.bpf.c

const volatile char pid_to_hide[MAX_PID_LEN] = "";

参考patch可以修改,完成编译操作

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

1 participant