Skip to content

Commit

Permalink
内置完整syscall配置
Browse files Browse the repository at this point in the history
  • Loading branch information
SeeFlowerX committed Jan 28, 2024
1 parent 649e74e commit cc601f7
Show file tree
Hide file tree
Showing 8 changed files with 6,145 additions and 25 deletions.
2 changes: 1 addition & 1 deletion Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -80,7 +80,7 @@ genbtf:

.PHONY: assets
assets:
$(CMD_GO) run github.com/shuLhan/go-bindata/cmd/go-bindata -pkg assets -o "assets/ebpf_probe.go" $(wildcard ./user/assets/*.o ./user/assets/*_min.btf ./preload_libs/*.so)
$(CMD_GO) run github.com/shuLhan/go-bindata/cmd/go-bindata -pkg assets -o "assets/ebpf_probe.go" $(wildcard ./user/config/config_syscall_*.json ./user/assets/*.o ./user/assets/*_min.btf ./preload_libs/*.so)

.PHONY: build
build:
Expand Down
10 changes: 9 additions & 1 deletion cli/cmd/root.go
Original file line number Diff line number Diff line change
Expand Up @@ -286,7 +286,15 @@ func persistentPreRunEFunc(command *cobra.Command, args []string) error {
}

// 3. hook config
if len(gconfig.ConfigFiles) > 0 {
if len(gconfig.ConfigFiles) == 0 {
config_syscall_aarch64 := "user/config/config_syscall_aarch64.json"
err = assets.RestoreAsset(exec_path, config_syscall_aarch64)
if err != nil {
panic(err)
}
gconfig.ConfigFiles = append(gconfig.ConfigFiles, config_syscall_aarch64)
}
if len(gconfig.HookPoint) == 0 {
mconfig.LoadConfig(gconfig)
}

Expand Down
Loading

0 comments on commit cc601f7

Please sign in to comment.