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

bash module crash , with the asm method, the constant value has to be of type uint64 #301

Closed
cq1982 opened this issue Jan 29, 2023 · 1 comment · Fixed by #302
Closed
Labels
bug Something isn't working

Comments

@cq1982
Copy link

cq1982 commented Jan 29, 2023

root@test:/home/ecapture-v0.4.11-linux-x86_64# uname -a
Linux test 5.13.0-52-generic #59-Ubuntu SMP Wed Jun 15 20:17:13 UTC 2022 x86_64 x86_64 x86_64 GNU/Linux

root@test:/home/ecapture-v0.4.11-linux-x86_64# ./ecapture bash
bash_2023/01/29 08:44:12 ECAPTURE :: version :linux_x86_64:0.4.11-20230107-7b66305:5.15.0-1023-azure
bash_2023/01/29 08:44:12 ECAPTURE :: start to run EBPFProbeBash module
bash_2023/01/29 08:44:12 ECAPTURE :: pid info :2012
bash_2023/01/29 08:44:12 EBPFProbeBash Module.Run()
bash_2023/01/29 08:44:12 EBPFProbeBash BPF bytecode filename:user/bytecode/bash_kern.o
bash_2023/01/29 08:44:12 EBPFProbeBash HOOK binrayPath:/bin/bash, FunctionName:readline
bash_2023/01/29 08:44:12 EBPFProbeBash HOOK binrayPath:/bin/bash, FunctionName:execute_command
bash_2023/01/29 08:44:12 EBPFProbeBash target all process.
bash_2023/01/29 08:44:12 EBPFProbeBash target all users.
bash_2023/01/29 08:44:12 couldn't init manager error:with the asm method, the constant value has to be of type uint64 , couldn't edit target_errno in uretprobe_bash_retval

@cq1982
Copy link
Author

cq1982 commented Jan 29, 2023

没问题了,照着这个把clang和llvm这些升级了一遍就好了,升级后make也正常了。

ubuntu@VM-0-5-ubuntu:$sudo apt-get update
ubuntu@VM-0-5-ubuntu:
$sudo apt-get install --yes wget git golang build-essential pkgconf libelf-dev llvm-12 clang-12 linux-tools-generic linux-tools-common
ubuntu@VM-0-5-ubuntu:$wget https://golang.google.cn/dl/go1.18.linux-amd64.tar.gz
ubuntu@VM-0-5-ubuntu:
$sudo rm -rf /usr/local/go && sudo tar -C /usr/local -xzf go1.18.linux-amd64.tar.gz
ubuntu@VM-0-5-ubuntu:~$sudo rm -f /usr/bin/go && sudo ln /usr/local/go/bin/go /usr/bin/go

ubuntu@VM-0-5-ubuntu:~$for tool in "clang" "llc" "llvm-strip"
do
sudo rm -f /usr/bin/$tool
sudo ln -s /usr/bin/$tool-12 /usr/bin/$tool
done

ubuntu@VM-0-5-ubuntu:$export GOPROXY=https://goproxy.cn
ubuntu@VM-0-5-ubuntu:
$export PATH=$PATH:/usr/local/go/bin

@cq1982 cq1982 closed this as completed Jan 29, 2023
@cfc4n cfc4n reopened this Jan 29, 2023
@cfc4n cfc4n added the bug Something isn't working label Jan 29, 2023
cfc4n added a commit that referenced this issue Jan 29, 2023
Signed-off-by: CFC4N <cfc4n.cs@gmail.com>
@cfc4n cfc4n linked a pull request Jan 29, 2023 that will close this issue
cfc4n added a commit that referenced this issue Jan 29, 2023
Signed-off-by: CFC4N <cfc4n.cs@gmail.com>
@cfc4n cfc4n changed the title bash监控报了异常 bash module crash , with the asm method, the constant value has to be of type uint64 Jan 29, 2023
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

Successfully merging a pull request may close this issue.

2 participants