libs icon indicating copy to clipboard operation
libs copied to clipboard

new(driver,userspace): automatically generate syscall_info_table entries at startup time

Open FedeDP opened this issue 3 years ago • 7 comments

What type of PR is this?

/kind cleanup /kind feature

Any specific area of the project related to this PR?

/area driver-kmod /area driver-bpf /area driver-modern-bpf /area libscap /area libsinsp

Does this PR require a change in the driver versions?

I don't think so since we are using the automatic generic filler / event.

What this PR does / why we need it:

We use a lazy generation, ie: first time scap_get_syscall_info_table is called, we fill the table.

The table is filled with correct names; the category is either fetched from the event_table, or EC_UNKNOWN (for syscalls that have no event attached, and use the generic one).

Moreover, added generic event support for https://github.com/falcosecurity/falco/issues/1998 syscalls; they won't use any specific filler, just the automatic generic one, and there is no even mapping for them.

Only downside: we lost the ability to mark "generic" syscalls with a proper category. I don't think it is a huge downsie, yet i want to highlight it.

Which issue(s) this PR fixes:

We add string-support (through generic event) for all syscalls listed here: https://github.com/falcosecurity/falco/issues/1998

A proper specific filler where needed, will be introduced in subsequent PRs.

Fixes #

Special notes for your reviewer:

Does this PR introduce a user-facing change?:

NONE

FedeDP avatar Oct 03 '22 10:10 FedeDP

TODO:

  • [x] fix non-linux CI.

FedeDP avatar Oct 03 '22 10:10 FedeDP

Rebased on top of master.

FedeDP avatar Oct 04 '22 07:10 FedeDP

Addressed review comments @Andreagit97 ! Thanks btw :)

FedeDP avatar Oct 17 '22 07:10 FedeDP

LGTM label has been added.

Git tree hash: cc0ec4224c10e31e909a96a8365548f708f6056e

poiana avatar Oct 17 '22 08:10 poiana

LGTM label has been added.

Git tree hash: 4141ba6dd5b1c97a1554ad83ba80eeb14b38d779

poiana avatar Oct 17 '22 10:10 poiana

You're welcome Mauro :100:

FedeDP avatar Oct 17 '22 10:10 FedeDP

/hold

Andreagit97 avatar Oct 20 '22 10:10 Andreagit97

Rebased on top of master @Andreagit97 @Molter73 !

FedeDP avatar Oct 25 '22 15:10 FedeDP

LGTM label has been added.

Git tree hash: 7cdb2bed79147e4d95e89d099709fd5ac31d070e

poiana avatar Oct 25 '22 16:10 poiana

[APPROVALNOTIFIER] This PR is APPROVED

This pull-request has been approved by: Andreagit97, FedeDP, leogr, Molter73

The full list of commands accepted by this bot can be found here.

The pull request process is described here

Needs approval from an approver in each of these files:
  • ~~OWNERS~~ [Andreagit97,FedeDP,Molter73,leogr]

Approvers can indicate their approval by writing /approve in a comment Approvers can cancel approval by writing /approve cancel in a comment

poiana avatar Oct 26 '22 13:10 poiana

/unhold

FedeDP avatar Oct 26 '22 13:10 FedeDP