This is an automated email from the ASF dual-hosted git repository.

wusheng pushed a commit to branch main
in repository https://gitbox.apache.org/repos/asf/skywalking-rover.git


The following commit(s) were added to refs/heads/main by this push:
     new 6bbd39a  Upgrade eBPF, Go library and adapt GHA (#115)
6bbd39a is described below

commit 6bbd39aa701984482330d9dfb4dbaaff0527d55c
Author: mrproliu <741550...@qq.com>
AuthorDate: Sat Mar 2 19:26:30 2024 +0800

    Upgrade eBPF, Go library and adapt GHA (#115)
---
 .github/workflows/compatibility.yaml               |  4 +--
 .github/workflows/rover.yaml                       |  8 ++---
 .gitignore                                         |  1 +
 .golangci.yml                                      | 11 ------
 CHANGES.md                                         |  2 +-
 bpf/include/socket.h                               |  1 +
 bpf/profiling/continuous/network.c                 | 10 ++++--
 bpf/profiling/network/sock_stats.h                 |  2 ++
 docker/Dockerfile.base                             |  2 +-
 go.mod                                             | 21 ++++++------
 go.sum                                             | 39 ++++++++++++++--------
 .../task/network/analyze/base/connection.go        |  2 ++
 pkg/tools/btf/linker.go                            |  4 +--
 pkg/tools/process/process.go                       |  2 +-
 scripts/build/base.mk                              |  4 +--
 scripts/build/lint.mk                              | 13 ++++++--
 16 files changed, 75 insertions(+), 51 deletions(-)

diff --git a/.github/workflows/compatibility.yaml 
b/.github/workflows/compatibility.yaml
index 348cb1f..0463a20 100644
--- a/.github/workflows/compatibility.yaml
+++ b/.github/workflows/compatibility.yaml
@@ -45,10 +45,10 @@ jobs:
       - uses: actions/checkout@v3
         with:
           submodules: true
-      - name: Set up Go 1.20
+      - name: Set up Go 1.21
         uses: actions/setup-go@v2
         with:
-          go-version: "1.20"
+          go-version: "1.21"
       - id: 'auth'
         uses: 'google-github-actions/auth@v1'
         with:
diff --git a/.github/workflows/rover.yaml b/.github/workflows/rover.yaml
index c0db1e2..ae63f97 100644
--- a/.github/workflows/rover.yaml
+++ b/.github/workflows/rover.yaml
@@ -25,12 +25,12 @@ jobs:
     runs-on: ubuntu-latest
     timeout-minutes: 60
     steps:
-      - name: Set up Go 1.20
+      - name: Set up Go 1.21
         uses: actions/setup-go@v2
         with:
-          go-version: "1.20"
+          go-version: "1.21"
       - name: Check out code into the Go module directory
-        uses: actions/checkout@v2
+        uses: actions/checkout@v4
         with:
           submodules: true
       - name: Check License
@@ -42,7 +42,7 @@ jobs:
       - name: BTF Generate
         run: make container-btfgen
       - name: Lint
-        run: make container-lint
+        run: make container-safe-lint
       - name: Make binary
         run: make linux
       - name: Check CI Consistency
diff --git a/.gitignore b/.gitignore
index b24b3ae..9d41cca 100644
--- a/.gitignore
+++ b/.gitignore
@@ -5,6 +5,7 @@
 .cache/
 bin/
 coverage.txt
+.gitconfig
 
 !/dist/bin/
 
diff --git a/.golangci.yml b/.golangci.yml
index dd69a2d..dd042c0 100644
--- a/.golangci.yml
+++ b/.golangci.yml
@@ -28,13 +28,6 @@ linters-settings:
   goconst:
     min-len: 2
     min-occurrences: 2
-  depguard:
-    list-type: blacklist
-    packages:
-      -
-    include-go-root: true
-    packages-with-error-messages:
-      fmt: "logging is allowed only by logutils.Log"
   misspell:
     locale: US
   lll:
@@ -68,7 +61,6 @@ linters:
   enable:
     - bodyclose
     - deadcode
-    - depguard
     - dogsled
     - dupl
     - errcheck
@@ -83,14 +75,11 @@ linters:
     - gosimple
     - govet
     - ineffassign
-    - interfacer
     - lll
     - misspell
     - nakedret
     - staticcheck
-    - structcheck
     - stylecheck
-    - typecheck
     - unconvert
     - unparam
     - unused
diff --git a/CHANGES.md b/CHANGES.md
index 7cb4d1f..f9de66b 100644
--- a/CHANGES.md
+++ b/CHANGES.md
@@ -12,7 +12,7 @@ Release Notes.
 * Improve the stability of Off CPU Profiling.
 * Support collecting the access log from Kubernetes.
 * Remove the scanner mode in the process discovery module.
-* Upgrade Go library to `1.20`.
+* Upgrade Go library to `1.21`, eBPF library to `0.13.2`.
 * Support using `make docker.debug` to building the debug docker image.
 
 #### Bug Fixes
diff --git a/bpf/include/socket.h b/bpf/include/socket.h
index b446bbb..5e92bed 100644
--- a/bpf/include/socket.h
+++ b/bpf/include/socket.h
@@ -66,6 +66,7 @@ struct iov_iter {
        __u64 count;
        union {
                const struct iovec *iov;
+               const struct iovec *__iov;
                const struct kvec *kvec;
                const struct bio_vec *bvec;
                struct xarray *xarray;
diff --git a/bpf/profiling/continuous/network.c 
b/bpf/profiling/continuous/network.c
index 42aa6c5..a68dec2 100644
--- a/bpf/profiling/continuous/network.c
+++ b/bpf/profiling/continuous/network.c
@@ -23,7 +23,6 @@
 #include <linux/ptrace.h>
 #include <asm/ptrace.h>
 #include <asm/errno.h>
-#include <asm/socket.h>
 #include <linux/netfilter_ipv4.h>
 #include <linux/tcp.h>
 #include <bpf/bpf_endian.h>
@@ -33,6 +32,7 @@
 #include <sys/uio.h>
 #include "network.h"
 #include "protocol_analyzer.h"
+#include "socket.h"
 
 char __license[] SEC("license") = "Dual MIT/GPL";
 
@@ -85,7 +85,13 @@ static __always_inline void process_data(struct pt_regs 
*ctx, __u64 id, void *ch
 
 static __always_inline void process_msghdr_data(struct pt_regs *ctx, __u64 id, 
void *channel_ref, struct msghdr *msg) {
     const struct iovec *iovec;
-    iovec = _KERNEL(msg->msg_iter.iov);
+    if (bpf_core_field_exists(msg->msg_iter.iov)) {
+        iovec = _KERNEL(msg->msg_iter.iov);
+    } else if (bpf_core_field_exists(msg->msg_iter.__iov)) {
+        iovec = _KERNEL(msg->msg_iter.__iov);
+    } else {
+        return;
+    }
     struct iovec iov_data;
     bpf_probe_read(&iov_data, sizeof(iov_data), iovec);
     char* buf = (char *)iov_data.iov_base;
diff --git a/bpf/profiling/network/sock_stats.h 
b/bpf/profiling/network/sock_stats.h
index 54f6775..9a4f10a 100644
--- a/bpf/profiling/network/sock_stats.h
+++ b/bpf/profiling/network/sock_stats.h
@@ -65,6 +65,8 @@ struct active_connection_t {
     __u8 connect_event_send;
     // current connection is ssl
     __u8 ssl;
+    __u8 fix1;
+    __u32 fix2;
 };
 struct {
        __uint(type, BPF_MAP_TYPE_HASH);
diff --git a/docker/Dockerfile.base b/docker/Dockerfile.base
index 3c5dcf1..8303d2f 100644
--- a/docker/Dockerfile.base
+++ b/docker/Dockerfile.base
@@ -14,7 +14,7 @@
 # See the License for the specific language governing permissions and
 # limitations under the License.
 
-FROM golang:1.20
+FROM golang:1.21
 
 RUN apt update && \
     git clone --depth 1 --branch v1.1.0 https://github.com/libbpf/libbpf.git 
&& \
diff --git a/go.mod b/go.mod
index 278c8a8..919e2d4 100644
--- a/go.mod
+++ b/go.mod
@@ -1,10 +1,10 @@
 module github.com/apache/skywalking-rover
 
-go 1.20
+go 1.21.0
 
 require (
        github.com/agiledragon/gomonkey/v2 v2.9.0
-       github.com/cilium/ebpf v0.9.3
+       github.com/cilium/ebpf v0.13.2
        github.com/docker/go-units v0.5.0
        github.com/florianl/go-conntrack v0.4.0
        github.com/google/uuid v1.3.0
@@ -19,8 +19,8 @@ require (
        github.com/stretchr/testify v1.8.1
        github.com/zekroTJA/timedmap v1.4.0
        golang.org/x/arch v0.0.0-20220722155209-00200b7164a7
-       golang.org/x/net v0.17.0
-       golang.org/x/sys v0.13.0
+       golang.org/x/net v0.21.0
+       golang.org/x/sys v0.17.0
        google.golang.org/grpc v1.44.0
        k8s.io/api v0.23.5
        k8s.io/apimachinery v0.23.5
@@ -37,7 +37,7 @@ require (
        github.com/go-ole/go-ole v1.2.6 // indirect
        github.com/gogo/protobuf v1.3.2 // indirect
        github.com/golang/protobuf v1.5.2 // indirect
-       github.com/google/go-cmp v0.5.6 // indirect
+       github.com/google/go-cmp v0.5.9 // indirect
        github.com/google/gofuzz v1.1.0 // indirect
        github.com/googleapis/gnostic v0.5.5 // indirect
        github.com/hashicorp/errwrap v1.0.0 // indirect
@@ -61,13 +61,14 @@ require (
        github.com/tklauser/go-sysconf v0.3.9 // indirect
        github.com/tklauser/numcpus v0.3.0 // indirect
        github.com/yusufpapurcu/wmi v1.2.2 // indirect
-       golang.org/x/mod v0.8.0 // indirect
+       golang.org/x/exp v0.0.0-20240222234643-814bf88cf225 // indirect
+       golang.org/x/mod v0.15.0 // indirect
        golang.org/x/oauth2 v0.0.0-20211104180415-d3ed0bb246c8 // indirect
-       golang.org/x/sync v0.1.0 // indirect
-       golang.org/x/term v0.13.0 // indirect
-       golang.org/x/text v0.13.0 // indirect
+       golang.org/x/sync v0.6.0 // indirect
+       golang.org/x/term v0.17.0 // indirect
+       golang.org/x/text v0.14.0 // indirect
        golang.org/x/time v0.0.0-20210723032227-1f47c861a9ac // indirect
-       golang.org/x/tools v0.6.0 // indirect
+       golang.org/x/tools v0.18.0 // indirect
        google.golang.org/appengine v1.6.7 // indirect
        google.golang.org/genproto v0.0.0-20211208223120-3a66f561d7aa // 
indirect
        google.golang.org/protobuf v1.31.0 // indirect
diff --git a/go.sum b/go.sum
index b94d84d..db352b1 100644
--- a/go.sum
+++ b/go.sum
@@ -89,8 +89,8 @@ github.com/chzyer/readline 
v0.0.0-20180603132655-2972be24d48e/go.mod h1:nSuG5e5P
 github.com/chzyer/test v0.0.0-20180213035817-a1ea475d72b1/go.mod 
h1:Q3SI9o4m/ZMnBNeIyt5eFwwo7qiLfzFZmjNmxjkiQlU=
 github.com/cilium/ebpf v0.5.0/go.mod 
h1:4tRaxcgiL706VnOzHOdBlY8IEAIdxINsQBcU4xJJXRs=
 github.com/cilium/ebpf v0.7.0/go.mod 
h1:/oI2+1shJiTGAMgl6/RgJr36Eo1jzrRcAWbcXO2usCA=
-github.com/cilium/ebpf v0.9.3 h1:5KtxXZU+scyERvkJMEm16TbScVvuuMrlhPly78ZMbSc=
-github.com/cilium/ebpf v0.9.3/go.mod 
h1:w27N4UjpaQ9X/DGrSugxUG+H+NhgntDuPb5lCzxCn8A=
+github.com/cilium/ebpf v0.13.2 h1:uhLimLX+jF9BTPPvoCUYh/mBeoONkjgaJ9w9fn0mRj4=
+github.com/cilium/ebpf v0.13.2/go.mod 
h1:DHp1WyrLeiBh19Cf/tfiSMhqheEiK8fXFZ4No0P1Hso=
 github.com/circonus-labs/circonus-gometrics v2.3.1+incompatible/go.mod 
h1:nmEj6Dob7S7YxXgwXpfOuvO54S+tGdZdw9fuRZt25Ag=
 github.com/circonus-labs/circonusllhist v0.1.3/go.mod 
h1:kMXHVDlOchFAehlya5ePtbp5jckzBHf4XRpQvBOLI+I=
 github.com/client9/misspell v0.3.4/go.mod 
h1:qj6jICC3Q7zFZvVWo7KLAzC3yx5G7kyvSDkc90ppPyw=
@@ -136,7 +136,6 @@ github.com/florianl/go-conntrack v0.4.0/go.mod 
h1:iPDx4oIats2T7X7Jm3PFyRCJM1GfZh
 github.com/form3tech-oss/jwt-go v3.2.2+incompatible/go.mod 
h1:pbq4aXjuKjdthFRnoDwaVPLA+WlJuPGy+QneDUgJi2k=
 github.com/form3tech-oss/jwt-go v3.2.3+incompatible/go.mod 
h1:pbq4aXjuKjdthFRnoDwaVPLA+WlJuPGy+QneDUgJi2k=
 github.com/frankban/quicktest v1.11.3/go.mod 
h1:wRf/ReqHper53s+kmmSZizM8NamnL3IM0I9ntUbOk+k=
-github.com/frankban/quicktest v1.14.0 
h1:+cqqvzZV87b4adx/5ayVOaYZ2CrvM4ejQvUdBzPPUss=
 github.com/fsnotify/fsnotify v1.4.7/go.mod 
h1:jwhsz4b93w/PPRr/qN1Yymfu8t87LnFCMoQvtojpjFo=
 github.com/fsnotify/fsnotify v1.4.9/go.mod 
h1:znqG4EE+3YCdAaPaxE2ZRY/06pZUdp0tY4IgpuI1SZQ=
 github.com/fsnotify/fsnotify v1.5.1 
h1:mZcQUHVQUQWoPXXtuf9yuEXKudkV2sx1E06UadKWpgI=
@@ -160,6 +159,8 @@ github.com/go-openapi/jsonpointer v0.19.3/go.mod 
h1:Pl9vOtqEWErmShwVjC8pYs9cog34
 github.com/go-openapi/jsonpointer v0.19.5/go.mod 
h1:Pl9vOtqEWErmShwVjC8pYs9cog34VGT37dQOVbmoatg=
 github.com/go-openapi/jsonreference v0.19.3/go.mod 
h1:rjx6GuL8TTa9VaixXglHmQmIL98+wF9xc8zWvFonSJ8=
 github.com/go-openapi/swag v0.19.5/go.mod 
h1:POnQmlKehdgb5mhVOsnJFsivZCEZ/vjK9gh66Z9tfKk=
+github.com/go-quicktest/qt v1.101.0 
h1:O1K29Txy5P2OK0dGo59b7b0LR6wKfIhttaAhHUyn7eI=
+github.com/go-quicktest/qt v1.101.0/go.mod 
h1:14Bz/f7NwaXPtdYEgzsx46kqSxVwTbzVZsDC26tQJow=
 github.com/go-stack/stack v1.8.0/go.mod 
h1:v0f6uXyyMGvRgIKkXu+yp6POWl0qKG85gN/melR3HDY=
 github.com/godbus/dbus/v5 v5.0.4/go.mod 
h1:xhWf0FNVPg57R7Z0UbKHbJfkEywrmjJnf7w5xrFpKfA=
 github.com/gogo/protobuf v1.1.1/go.mod 
h1:r8qH/GZQm5c6nD/R0oafs1akxWv10x8SbQlK7atdtwQ=
@@ -212,8 +213,9 @@ github.com/google/go-cmp v0.5.2/go.mod 
h1:v8dTdLbMG2kIc/vJvl+f65V22dbkXbowE6jgT/
 github.com/google/go-cmp v0.5.3/go.mod 
h1:v8dTdLbMG2kIc/vJvl+f65V22dbkXbowE6jgT/gNBxE=
 github.com/google/go-cmp v0.5.4/go.mod 
h1:v8dTdLbMG2kIc/vJvl+f65V22dbkXbowE6jgT/gNBxE=
 github.com/google/go-cmp v0.5.5/go.mod 
h1:v8dTdLbMG2kIc/vJvl+f65V22dbkXbowE6jgT/gNBxE=
-github.com/google/go-cmp v0.5.6 h1:BKbKCqvP6I+rmFHt06ZmyQtvB8xAkWdhFyr0ZUNZcxQ=
 github.com/google/go-cmp v0.5.6/go.mod 
h1:v8dTdLbMG2kIc/vJvl+f65V22dbkXbowE6jgT/gNBxE=
+github.com/google/go-cmp v0.5.9 h1:O2Tfq5qg4qc4AmwVlvv0oLiVAGB7enBSJ2x2DqQFi38=
+github.com/google/go-cmp v0.5.9/go.mod 
h1:17dUlkBOakJ0+DkrSSNjCkIjxS6bF9zb3elmeNGIjoY=
 github.com/google/gofuzz v1.0.0/go.mod 
h1:dBl0BpW6vV/+mYPU4Po3pmUjxk6FQPldtuIdl/M65Eg=
 github.com/google/gofuzz v1.1.0 h1:Hsa8mG0dQ46ij8Sl2AYJDUv1oA9/d6Vk+3LG99Oe02g=
 github.com/google/gofuzz v1.1.0/go.mod 
h1:dBl0BpW6vV/+mYPU4Po3pmUjxk6FQPldtuIdl/M65Eg=
@@ -323,7 +325,8 @@ github.com/kr/logfmt 
v0.0.0-20140226030751-b84e30acd515/go.mod h1:+0opPa2QZZtGFB
 github.com/kr/pretty v0.1.0/go.mod 
h1:dAy3ld7l9f0ibDNOQOHHMYYIIbhfbHSm3C4ZsoJORNo=
 github.com/kr/pretty v0.2.0/go.mod 
h1:ipq/a2n7PKx3OHsz4KJII5eveXtPO4qwEXGdVfWzfnI=
 github.com/kr/pretty v0.2.1/go.mod 
h1:ipq/a2n7PKx3OHsz4KJII5eveXtPO4qwEXGdVfWzfnI=
-github.com/kr/pretty v0.3.0 h1:WgNl7dwNpEZ6jJ9k1snq4pZsg7DOEN8hP9Xw0Tsjwk0=
+github.com/kr/pretty v0.3.1 h1:flRD4NNwYAUpkphVc1HcthR4KEIFJ65n8Mw5qdRn3LE=
+github.com/kr/pretty v0.3.1/go.mod 
h1:hoEshYVHaxMs3cyo3Yncou5ZscifuDolrwPKZanG3xk=
 github.com/kr/pty v1.1.1/go.mod h1:pFQYn66WHrOpPYNljwOMqo10TkYh1fy3cYio2l3bCsQ=
 github.com/kr/text v0.1.0/go.mod 
h1:4Jbv+DJW3UT/LiOwJeYQe1efqtUx/iVham/4vfdArNI=
 github.com/kr/text v0.2.0 h1:5Nx0Ya0ZqY2ygV366QzturHI13Jq95ApcVaJBhpS+AY=
@@ -429,7 +432,8 @@ github.com/prometheus/procfs v0.0.2/go.mod 
h1:TjEm7ze935MbeOT/UhFTIMYKhuLP4wbCsT
 github.com/prometheus/procfs v0.0.8/go.mod 
h1:7Qr8sr6344vo1JqZ6HhLceV9o3AJ1Ff+GxbHq6oeK9A=
 github.com/rogpeppe/fastuuid v1.2.0/go.mod 
h1:jVj6XXZzXRy/MSR5jhDC/2q6DgLz+nrA6LYCDYWNEvQ=
 github.com/rogpeppe/go-internal v1.3.0/go.mod 
h1:M8bDsm7K2OlrFYOpmOWEs/qY81heoFRclV5y23lUDJ4=
-github.com/rogpeppe/go-internal v1.6.1 
h1:/FiVV8dS/e+YqF2JvO3yXRFbBLTIuSDkuC7aBOAvL+k=
+github.com/rogpeppe/go-internal v1.11.0 
h1:cWPaGQEPrBb5/AsnsZesgZZ9yb1OQ+GOISoDNXVBh4M=
+github.com/rogpeppe/go-internal v1.11.0/go.mod 
h1:ddIwULY96R17DhadqLgMfk9H9tvdUzkipdSkR5nkCZA=
 github.com/russross/blackfriday/v2 v2.1.0/go.mod 
h1:+Rmxgy9KzJVeS9/2gXHxylqXiyQDYRxCVz55jmeOWTM=
 github.com/ryanuber/columnize v0.0.0-20160712163229-9b3edd62028f/go.mod 
h1:sm1tb6uqfes/u+d4ooFouqFdy9/2g9QGwK3SQygK0Ts=
 github.com/sagikazarmark/crypt v0.3.0/go.mod 
h1:uD/D+6UF4SrIR1uGEv7bBNkNqLGqUr43MRiaGWX1Nig=
@@ -531,6 +535,8 @@ golang.org/x/exp v0.0.0-20191227195350-da58074b4299/go.mod 
h1:2RIsYlXP63K8oxa1u0
 golang.org/x/exp v0.0.0-20200119233911-0405dc783f0a/go.mod 
h1:2RIsYlXP63K8oxa1u096TMicItID8zy7Y6sNkU49FU4=
 golang.org/x/exp v0.0.0-20200207192155-f17229e696bd/go.mod 
h1:J/WKrq2StrnmMY6+EHIKF9dgMWnmCNThgcyBT1FY9mM=
 golang.org/x/exp v0.0.0-20200224162631-6cc2880d07d6/go.mod 
h1:3jZMyOhIsHpP37uCMkUooju7aAi5cS1Q23tOzKc+0MU=
+golang.org/x/exp v0.0.0-20240222234643-814bf88cf225 
h1:LfspQV/FYTatPTr/3HzIcmiUFH7PGP+OQ6mgDYo3yuQ=
+golang.org/x/exp v0.0.0-20240222234643-814bf88cf225/go.mod 
h1:CxmFvTBINI24O/j8iY7H1xHzx2i4OsyguNBmN/uPtqc=
 golang.org/x/image v0.0.0-20190227222117-0694c2d4d067/go.mod 
h1:kZ7UVZpmo3dzQBMxlp+ypCbDeSB+sBbTgSJuh5dn5js=
 golang.org/x/image v0.0.0-20190802002840-cff245a6509b/go.mod 
h1:FeLwcggjj3mMvU+oOTbSwawSJRM1uh48EjtB4UJZlP0=
 golang.org/x/lint v0.0.0-20181026193005-c67002cb31c3/go.mod 
h1:UVdnD1Gm6xHRNCYTkRU2/jEulfH38KcIWyp/GAMgvoE=
@@ -559,8 +565,9 @@ golang.org/x/mod v0.4.2/go.mod 
h1:s0Qsj1ACt9ePp/hMypM3fl4fZqREWJwdYDEqhRiZZUA=
 golang.org/x/mod v0.5.0/go.mod h1:5OXOZSfqPIIbmVBIIKWRFfZjPR0E5r58TLhUjH0a2Ro=
 golang.org/x/mod v0.5.1/go.mod h1:5OXOZSfqPIIbmVBIIKWRFfZjPR0E5r58TLhUjH0a2Ro=
 golang.org/x/mod v0.6.0-dev.0.20220419223038-86c51ed26bb4/go.mod 
h1:jJ57K6gSWd91VN4djpZkiMVwK6gcyfeH4XE8wZrZaV4=
-golang.org/x/mod v0.8.0 h1:LUYupSeNrTNCGzR/hVBk2NHZO4hXcVaW1k4Qx7rjPx8=
 golang.org/x/mod v0.8.0/go.mod h1:iBbtSCu2XBx23ZKBPSOrRkjjQPZFPuis4dIYUhu/chs=
+golang.org/x/mod v0.15.0 h1:SernR4v+D55NyBH2QiEQrlBAnj1ECL6AGrA5+dPaMY8=
+golang.org/x/mod v0.15.0/go.mod h1:hTbmBsO62+eylJbnUtE2MGJUyE7QWk4xUqPFrRgJ+7c=
 golang.org/x/net v0.0.0-20180724234803-3673e40ba225/go.mod 
h1:mL1N/T3taQHkDXs73rZJwtUhF3w3ftmwwsq0BUmARs4=
 golang.org/x/net v0.0.0-20180826012351-8a410e7b638d/go.mod 
h1:mL1N/T3taQHkDXs73rZJwtUhF3w3ftmwwsq0BUmARs4=
 golang.org/x/net v0.0.0-20180906233101-161cd47e91fd/go.mod 
h1:mL1N/T3taQHkDXs73rZJwtUhF3w3ftmwwsq0BUmARs4=
@@ -618,8 +625,9 @@ golang.org/x/net v0.0.0-20220107192237-5cfca573fb4d/go.mod 
h1:9nx3DQGgdP8bBQD5qx
 golang.org/x/net v0.0.0-20220722155237-a158d28d115b/go.mod 
h1:XRhObCWvk6IyKnWLug+ECip1KBveYUHfp+8e9klMJ9c=
 golang.org/x/net v0.6.0/go.mod h1:2Tu9+aMcznHK/AK1HMvgo6xiTLG5rD5rZLDS+rp2Bjs=
 golang.org/x/net v0.10.0/go.mod h1:0qNGK6F8kojg2nk9dLZ2mShWaEBan6FAoqfSigmmuDg=
-golang.org/x/net v0.17.0 h1:pVaXccu2ozPjCXewfr1S7xza/zcXTity9cCdXQYSjIM=
 golang.org/x/net v0.17.0/go.mod h1:NxSsAGuq816PNPmqtQdLE42eU2Fs7NoRIZrHJAlaCOE=
+golang.org/x/net v0.21.0 h1:AQyQV4dYCvJ7vGmJyKki9+PBdyvhkSd8EIx/qb0AYv4=
+golang.org/x/net v0.21.0/go.mod h1:bIjVDfnllIU7BJ2DNgfnXvpSvtn8VRwhlsaeUTyUS44=
 golang.org/x/oauth2 v0.0.0-20180821212333-d2e6202438be/go.mod 
h1:N/0e6XlmueqKjAGxoOufVs8QHGRruUQn6yWY3a++T0U=
 golang.org/x/oauth2 v0.0.0-20190226205417-e64efc72b421/go.mod 
h1:gOpvHmFTYa4IltrdGE7lF6nIHvwfUNPOp7c8zoXwtLw=
 golang.org/x/oauth2 v0.0.0-20190604053449-0f29369cfe45/go.mod 
h1:gOpvHmFTYa4IltrdGE7lF6nIHvwfUNPOp7c8zoXwtLw=
@@ -650,8 +658,9 @@ golang.org/x/sync v0.0.0-20201020160332-67f06af15bc9/go.mod 
h1:RxMgew5VJxzue5/jJ
 golang.org/x/sync v0.0.0-20201207232520-09787c993a3a/go.mod 
h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM=
 golang.org/x/sync v0.0.0-20210220032951-036812b2e83c/go.mod 
h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM=
 golang.org/x/sync v0.0.0-20220722155255-886fb9371eb4/go.mod 
h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM=
-golang.org/x/sync v0.1.0 h1:wsuoTGHzEhffawBOhz5CYhcrV4IdKZbEyZjBMuTp12o=
 golang.org/x/sync v0.1.0/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM=
+golang.org/x/sync v0.6.0 h1:5BMeUDZ7vkXGfEr1x9B4bRcTH4lpkTkpdh0T/J+qjbQ=
+golang.org/x/sync v0.6.0/go.mod h1:Czt+wKu1gCyEFDUtn0jG5QVvpJ6rzVqr5aXyt9drQfk=
 golang.org/x/sys v0.0.0-20180823144017-11551d06cbcc/go.mod 
h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY=
 golang.org/x/sys v0.0.0-20180830151530-49385e6e1522/go.mod 
h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY=
 golang.org/x/sys v0.0.0-20180905080454-ebe1bf3edb33/go.mod 
h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY=
@@ -744,15 +753,17 @@ golang.org/x/sys 
v0.0.0-20220520151302-bc2c85ada10a/go.mod h1:oPkhp1MJrh7nUepCBc
 golang.org/x/sys v0.0.0-20220722155257-8c9f86f7a55f/go.mod 
h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg=
 golang.org/x/sys v0.5.0/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg=
 golang.org/x/sys v0.8.0/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg=
-golang.org/x/sys v0.13.0 h1:Af8nKPmuFypiUBjVoU9V20FiaFXOcuZI21p0ycVYYGE=
 golang.org/x/sys v0.13.0/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg=
+golang.org/x/sys v0.17.0 h1:25cE3gD+tdBA7lp7QfhuV+rJiE9YXTcS3VG1SqssI/Y=
+golang.org/x/sys v0.17.0/go.mod h1:/VUhepiaJMQUp4+oa/7Zr1D23ma6VTLIYjOOTFZPUcA=
 golang.org/x/term v0.0.0-20201126162022-7de9c90e9dd1/go.mod 
h1:bj7SfCRtBDWHUb9snDiAeCFNEtKQo2Wmx5Cou7ajbmo=
 golang.org/x/term v0.0.0-20210615171337-6886f2dfbf5b/go.mod 
h1:jbD1KX2456YbFQfuXm/mYQcufACuNUgVhRMnK/tPxf8=
 golang.org/x/term v0.0.0-20210927222741-03fcf44c2211/go.mod 
h1:jbD1KX2456YbFQfuXm/mYQcufACuNUgVhRMnK/tPxf8=
 golang.org/x/term v0.5.0/go.mod h1:jMB1sMXY+tzblOD4FWmEbocvup2/aLOaQEp7JmGp78k=
 golang.org/x/term v0.8.0/go.mod h1:xPskH00ivmX89bAKVGSKKtLOWNx2+17Eiy94tnKShWo=
-golang.org/x/term v0.13.0 h1:bb+I9cTfFazGW51MZqBVmZy7+JEJMouUHTUSKVQLBek=
 golang.org/x/term v0.13.0/go.mod 
h1:LTmsnFJwVN6bCy1rVCoS+qHT1HhALEFxKncY3WNNh4U=
+golang.org/x/term v0.17.0 h1:mkTF7LCd6WGJNL3K1Ad7kwxNfYAW6a8a8QqtMblp/4U=
+golang.org/x/term v0.17.0/go.mod 
h1:lLRBjIVuehSbZlaOtGMbcMncT+aqLLLmKrsjNrUguwk=
 golang.org/x/text v0.0.0-20170915032832-14c0d48ead0c/go.mod 
h1:NqM8EUOU14njkJ3fqMW+pc6Ldnwhi/IjpwHt7yyuwOQ=
 golang.org/x/text v0.3.0/go.mod h1:NqM8EUOU14njkJ3fqMW+pc6Ldnwhi/IjpwHt7yyuwOQ=
 golang.org/x/text v0.3.1-0.20180807135948-17ff2d5776d2/go.mod 
h1:NqM8EUOU14njkJ3fqMW+pc6Ldnwhi/IjpwHt7yyuwOQ=
@@ -764,8 +775,9 @@ golang.org/x/text v0.3.6/go.mod 
h1:5Zoc/QRtKVWzQhOtBMvqHzDpF6irO9z98xDceosuGiQ=
 golang.org/x/text v0.3.7/go.mod h1:u+2+/6zg+i71rQMx5EYifcz6MCKuco9NR6JIITiCfzQ=
 golang.org/x/text v0.7.0/go.mod h1:mrYo+phRRbMaCq/xk9113O4dZlRixOauAjOtrjsXDZ8=
 golang.org/x/text v0.9.0/go.mod h1:e1OnstbJyHTd6l/uOt8jFFHp6TRDWZR/bV3emEE/zU8=
-golang.org/x/text v0.13.0 h1:ablQoSUd0tRdKxZewP80B+BaqeKJuVhuRxj/dkrun3k=
 golang.org/x/text v0.13.0/go.mod 
h1:TvPlkZtksWOMsz7fbANvkp4WM8x/WCo/om8BMLbz+aE=
+golang.org/x/text v0.14.0 h1:ScX5w1eTa3QqT8oi6+ziP7dTV1S2+ALU0bI+0zXKWiQ=
+golang.org/x/text v0.14.0/go.mod 
h1:18ZOQIKpY8NJVqYksKHtTdi31H5itFRjB5/qKTNYzSU=
 golang.org/x/time v0.0.0-20181108054448-85acf8d2951c/go.mod 
h1:tRJNPiyCQ0inRvYxbN9jk5I+vvW/OXSQhTDSoE431IQ=
 golang.org/x/time v0.0.0-20190308202827-9d24e82272b4/go.mod 
h1:tRJNPiyCQ0inRvYxbN9jk5I+vvW/OXSQhTDSoE431IQ=
 golang.org/x/time v0.0.0-20191024005414-555d28b269f0/go.mod 
h1:tRJNPiyCQ0inRvYxbN9jk5I+vvW/OXSQhTDSoE431IQ=
@@ -829,8 +841,9 @@ golang.org/x/tools v0.1.4/go.mod 
h1:o0xws9oXOQQZyjljx8fwUC0k7L1pTE6eaCbjGeHmOkk=
 golang.org/x/tools v0.1.5/go.mod 
h1:o0xws9oXOQQZyjljx8fwUC0k7L1pTE6eaCbjGeHmOkk=
 golang.org/x/tools v0.1.7/go.mod 
h1:LGqMHiF4EqQNHR1JncWGqT5BVaXmza+X+BDGol+dOxo=
 golang.org/x/tools v0.1.12/go.mod 
h1:hNGJHUnrk76NpqgfD5Aqm5Crs+Hm0VOH/i9J2+nxYbc=
-golang.org/x/tools v0.6.0 h1:BOw41kyTf3PuCW1pVQf8+Cyg8pMlkYB1oo9iJ6D/lKM=
 golang.org/x/tools v0.6.0/go.mod 
h1:Xwgl3UAJ/d3gWutnCtw505GrjyAbvKui8lOU390QaIU=
+golang.org/x/tools v0.18.0 h1:k8NLag8AGHnn+PHbl7g43CtqZAwG60vZkLqgyZgIHgQ=
+golang.org/x/tools v0.18.0/go.mod 
h1:GL7B4CwcLLeo59yx/9UWWuNOW1n3VZ4f5axWfML7Lcg=
 golang.org/x/xerrors v0.0.0-20190717185122-a985d3407aa7/go.mod 
h1:I/5z698sn9Ka8TeJc9MKroUUfqBBauWjQqLJ2OPfmY0=
 golang.org/x/xerrors v0.0.0-20191011141410-1b5146add898/go.mod 
h1:I/5z698sn9Ka8TeJc9MKroUUfqBBauWjQqLJ2OPfmY0=
 golang.org/x/xerrors v0.0.0-20191204190536-9bdfabe68543/go.mod 
h1:I/5z698sn9Ka8TeJc9MKroUUfqBBauWjQqLJ2OPfmY0=
diff --git a/pkg/profiling/task/network/analyze/base/connection.go 
b/pkg/profiling/task/network/analyze/base/connection.go
index 2bd1cc9..2393f35 100644
--- a/pkg/profiling/task/network/analyze/base/connection.go
+++ b/pkg/profiling/task/network/analyze/base/connection.go
@@ -95,4 +95,6 @@ type ActiveConnectionInBPF struct {
        // the connect event is already sent
        ConnectEventIsSent uint8
        IsSSL              uint8
+       _                  uint8
+       _                  uint32
 }
diff --git a/pkg/tools/btf/linker.go b/pkg/tools/btf/linker.go
index 5db5fe3..c8b7c68 100644
--- a/pkg/tools/btf/linker.go
+++ b/pkg/tools/btf/linker.go
@@ -72,7 +72,7 @@ func init() {
                }
        }
        if !found {
-               syscallPrefix = "sys_"
+               syscallPrefix = defaultSymbolPrefix
        }
 }
 
@@ -138,7 +138,7 @@ func (m *Linker) AddSysCallWithKProbe(call string, linkK 
LinkFunc, p *ebpf.Progr
        kprobe, err := linkK(syscallPrefix+call, p, nil)
 
        if err != nil {
-               m.errors = multierror.Append(m.errors, fmt.Errorf("could not 
attach syscall with %s: %v", "sys_"+call, err))
+               m.errors = multierror.Append(m.errors, fmt.Errorf("could not 
attach syscall with %s: %v", defaultSymbolPrefix+call, err))
        } else {
                log.Debugf("attach to the syscall: %s", syscallPrefix+call)
                m.closers = append(m.closers, kprobe)
diff --git a/pkg/tools/process/process.go b/pkg/tools/process/process.go
index fd074a6..b2b79d9 100644
--- a/pkg/tools/process/process.go
+++ b/pkg/tools/process/process.go
@@ -157,7 +157,7 @@ func parseUInt64InModule(err error, moduleName, key, val 
string) (uint64, error)
 }
 
 func isIgnoreModuleName(name string) bool {
-       return len(name) > 0 &&
+       return name != "" &&
                (strings.HasPrefix(name, "//anon") ||
                        strings.HasPrefix(name, "/dev/zero") ||
                        strings.HasPrefix(name, "/anon_hugepage") ||
diff --git a/scripts/build/base.mk b/scripts/build/base.mk
index e302bdb..8e63156 100644
--- a/scripts/build/base.mk
+++ b/scripts/build/base.mk
@@ -21,7 +21,7 @@ VERSION ?= latest
 
 SHELL = /bin/bash
 
-REPODIR := $(shell dirname $(realpath $(firstword $(MAKEFILE_LIST))))/
+REPODIR := $(shell dirname $(realpath $(firstword $(MAKEFILE_LIST))))
 
 OSNAME := $(if $(findstring Darwin,$(shell uname)),darwin,linux)
 
@@ -65,4 +65,4 @@ container-command: build-base-container
                --env CFLAGS="-fdebug-prefix-map=/skywalking-rover=." \
                --env HOME="/skywalking-rover" \
                "${CONTAINER_COMMAND_IMAGE}:${CONTAINER_COMMAND_TAG}" \
-               make ${COMMAND}
\ No newline at end of file
+               make ${COMMAND}
diff --git a/scripts/build/lint.mk b/scripts/build/lint.mk
index 8dc0c6f..a7fded4 100644
--- a/scripts/build/lint.mk
+++ b/scripts/build/lint.mk
@@ -19,12 +19,21 @@
 GO_LINT = $(GO_PATH)/bin/golangci-lint
 
 linter:
-       $(GO_LINT) version || curl -sfL 
https://raw.githubusercontent.com/golangci/golangci-lint/master/install.sh | sh 
-s -- -b $(GO_PATH)/bin v1.52.0
+       $(GO_LINT) version || curl -sfL 
https://raw.githubusercontent.com/golangci/golangci-lint/master/install.sh | sh 
-s -- -b $(GO_PATH)/bin v1.54.0
 
 .PHONY: lint
 lint: linter generate
        $(GO_LINT) run -v --timeout 5m ./...
 
+.PHONY: safe-lint
+safe-lint: linter generate
+       git config --global --add safe.directory ${REPODIR}
+       $(GO_LINT) run -v --timeout 5m ./...
+
 .PHONY: container-lint
 container-lint: COMMAND=lint
-container-lint: container-command
\ No newline at end of file
+container-lint: container-command
+
+.PHONY: container-safe-lint
+container-safe-lint: COMMAND=safe-lint
+container-safe-lint: container-command

Reply via email to