Skip to content

[pull] main from aquasecurity:main #77

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

Open
wants to merge 16 commits into
base: main
Choose a base branch
from
Open

Conversation

pull[bot]
Copy link

@pull pull bot commented Apr 18, 2025

See Commits and Changes for more details.


Created by pull[bot] (v2.0.0-alpha.1)

Can you help keep this open source service alive? 💖 Please sponsor : )

dependabot bot and others added 2 commits April 17, 2025 21:01
Bumps kernel.org/pub/linux/libs/security/libcap/cap from 1.2.75 to 1.2.76.

---
updated-dependencies:
- dependency-name: kernel.org/pub/linux/libs/security/libcap/cap
  dependency-version: 1.2.76
  dependency-type: direct:production
  update-type: version-update:semver-patch
...

Signed-off-by: Geyslan Gregório <[email protected]>
Co-authored-by: Geyslan Gregório <[email protected]>
@pull pull bot added the ⤵️ pull label Apr 18, 2025
geyslan and others added 14 commits May 23, 2025 17:04
... and tidy up go mod files.

- find . -name "go.mod" -execdir go mod tidy \;
Original PR: #480

Reviewed-by: Geyslan Gregório <[email protected]>
This patch introduces support for multi uprobe attach
via uprobe_multi link [1], to support attach of multiple
uprobes and usdt probes without involving perf events.
Normal uprobe is attached through the perf event and
attaching many uprobes generates one perf event each.

New BPFProg.AttachUprobeMulti and BPFProg.AttachURetprobeMulti
methods are available from this patch, which are
astractions over the libbpf bpf_program__attach_uprobe_multi
helper, to attach uprobes and uretprobes respectively.

Moreover, the API is simplified over the
bpf_program__attach_uprobe_multi, by abstracting the
bpf_uprobe_multi_opts API. Following the libbpf API, only the second set
of inputs of the libbpf API is supported now, that is, mentioning
libbpf:
  bpf_program__attach_uprobe_multi() attaches a BPF program to multiple
  uprobes with uprobe_multi link.

  User can specify 2 mutually exclusive set of inputs:

  1) use only path/func_pattern/pid arguments

  2) use path/pid with allowed combinations of
     syms/offsets/ref_ctr_offsets/cookies/cnt

The Go binding API indeed supports the path and offsets set of inputs,
in a similar fashion the BPFProg.AttachUprobe and
BPFProg.AttachUretprobe provide.

[1]
https://lore.kernel.org/bpf/[email protected]/

Signed-off-by: Massimiliano Giovagnoli <[email protected]>
This commit updates the vmlinux.h header to support intel
fred into the stack and data segment registers.

Signed-off-by: Massimiliano Giovagnoli <[email protected]>
offset is size_t, therefore it is 8 bytes.

BREAKING CHANGE: This changes the signature of AttachUprobe and
AttachURetprobe.
Polling loops are cgo hotpaths in consuming applications. Since cgo calls
are rather expensive, moving the polling loop to cgo should significantly
reduce the number of cgo calls.

Now the go part only handles orchestration of the internal c loop.
An atomic flag is used to signal the c loop to exit.
* build(deps): bump actions/checkout from 4 to 5

Bumps [actions/checkout](https://github.com/actions/checkout) from 4 to 5.
- [Release notes](https://github.com/actions/checkout/releases)
- [Commits](actions/checkout@v4...v5)

---
updated-dependencies:
- dependency-name: actions/checkout
  dependency-version: '5'
  dependency-type: direct:production
  update-type: version-update:semver-major
...

Signed-off-by: dependabot[bot] <[email protected]>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
Co-authored-by: Geyslan Gregório <[email protected]>
... to common package.

- Create selftest/common package with shared utility functions
- Move duplicate symbolToOffset and resizeMap implementations to common
- Add common utilities: Error, SymbolToOffset, ResizeMap, ByteOrder, etc.
- Update all 40+ selftest modules to use shared common package
- Add go.mod with replace directives for selftest/common in all tests
- Eliminate code duplication across selftest directories

This major refactoring consolidates repeated utility functions from
individual selftest directories into a centralized common package,
improving maintainability and reducing code duplication.
- Replace ping commands with sleep processes to ensure test stability
- Use 'sleep 10' instead of 'ping -c1 -w1' for more predictable timing
- Add proper process cleanup with defer and Kill() calls
- Increase startup delay to 2 seconds for process registration
- Fix intermittent failures where ping processes completed too quickly

The original test was flaky because ping processes (-c1 -w1) would
complete within 1-2 seconds, often finishing before the BPF iterator
could capture them, resulting in 0 matches instead of the expected 10.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Development

Successfully merging this pull request may close these issues.

4 participants