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

fix(analyze): support signatures based on signatures #4010

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

Conversation

AlonZivony
Copy link
Collaborator

1. Explain what the PR does

Support signatures based on signatures in the analyze mode.
This is done in the purpose of making all signatures that are compatible with tracee to be also compatible with the analyze mode.

Fix #4009

2. Explain how to test it

3. Other comments

Change the current analyze mode to support signatures based on signatures.
The overall logic now should be much more similar to that of tracee.
sync: latest libbpf changes from kernel

Syncing latest libbpf commits from kernel repository.
Baseline bpf-next commit:   155addf0814a92d08fce26a11b27e3315cdba977
Checkpoint bpf-next commit: 750011e239a50873251c16207b0fe78eabf8577e
Baseline bpf commit:        83b9dda8afa4e968d9cce253f390b01c0612a2a5
Checkpoint bpf commit:      bc4fbf022c68967cb49b2b820b465cf90de974b8

Andrii Nakryiko (2):
  bpf: add register bounds sanity checks and sanitization
  bpf: rename BPF_F_TEST_SANITY_STRICT to BPF_F_TEST_REG_INVARIANTS

Jordan Rome (1):
  bpf: Add crosstask check to __bpf_get_stack

 include/uapi/linux/bpf.h | 6 ++++++
 1 file changed, 6 insertions(+)

Signed-off-by: Andrii Nakryiko <andrii@kernel.org>
Copy link
Member

@geyslan geyslan left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

On a cursory review, it looks ok, even though I haven't tested it yet.

How about moving the pipeline logic into a new file like analyze_pipeline.go?

cmd/tracee/cmd/analyze.go Outdated Show resolved Hide resolved
@AlonZivony AlonZivony force-pushed the feature/support-sigs-on-sigs-tracee-rules branch 2 times, most recently from 208b923 to e566de3 Compare May 1, 2024 11:21
@geyslan
Copy link
Member

geyslan commented May 23, 2024

Hey @AlonZivony I think this is good for merging right? Could you just rebase again?

Comment on lines +71 to +72

go sigEngine.Start(ctx)
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Is missing a wg.Add(1)?

for _, eventName := range eventsToPrint {
eventsToPrintMap[eventName] = struct{}{}
}
go func() {
Copy link
Member

@geyslan geyslan May 23, 2024

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

nit: move the (156 line) wg.Add(1) to here, just before go func().

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Analyze mode doesn't support sigs-on-sigs
2 participants