Conversation
… of events mask, like bpf and modern bpf. Signed-off-by: Federico Di Pierro <nierro92@gmail.com>
308227e to
761dec9
Compare
|
/cc @gnosek @Andreagit97 |
|
/milestone 0.10.0 |
| consumer->fullcapture_port_range_end = 0; | ||
| consumer->statsd_port = PPM_PORT_STATSD; | ||
| bitmap_fill(consumer->events_mask, PPM_EVENT_MAX); /* Enable all syscall to be passed to userspace */ | ||
| bitmap_fill(consumer->syscalls_mask, SYSCALL_TABLE_SIZE); /* Enable all syscalls to be passed to userspace */ |
There was a problem hiding this comment.
Why do we need to enable all the syscalls here?
There was a problem hiding this comment.
Yep this is a default; i don't think it is necessary given that scap_kmod will set all the interesting syscalls at startup time.
There was a problem hiding this comment.
I'd leave it there for now :)
|
This needs an API version bump, and ideally a new ioctl name/number instead of changing the behavior of existing ones EDIT:
I still disagree about this but I know I'm outnumbered so 🤷♂️ 🙃 |
|
I agree with the rename but do we really need the old feature on |
In any case, we cannot just change the ioctl behavior and use the same number (there's tons of fun to be had if you e.g. use an ancient consumer with a new driver). IMO:
|
The tracepoint events shouldn't be masked, they should be always available, we just directly attach and detach the tracepoints 🤔 if the tracepoint is not there it cannot generate any event (probably this is exactly what you said 😆 )
Absolutely agree with that! |
yeah, this is what I mean |
Api version bump, as said in the op, was already done in this release cycle for #709; no more changes are required. |
We are going to reach chromium version in a couple of weeks if we bump every time we break 😆 |
…ated ioctls; added new ioctls for syscalls mask. Moreover, renamed `scap_eventmask_op` values accordingly. Signed-off-by: Federico Di Pierro <nierro92@gmail.com>
Signed-off-by: Federico Di Pierro <nierro92@gmail.com>
|
@gnosek everything should be ok now :) I dropped the old ioctls and added new ones. |
… do not need to be bound to kmod ioctls. Signed-off-by: Federico Di Pierro <nierro92@gmail.com> Co-authored-by: Grzegorz Nosek <grzegorz.nosek@sysdig.com>
Where does this leave the non-syscall kmod tracepoints ( |
Well, the |
|
Makes sense. I guess what I was getting at was this: // #define PPM_IOCTL_DISABLE_SIGNAL_DELIVER _IO(PPM_IOCTL_MAGIC, 14) Support dropped
// #define PPM_IOCTL_ENABLE_SIGNAL_DELIVER _IO(PPM_IOCTL_MAGIC, 15) Support dropped☝️this change (96aa1686) seems fairly recent, does it mean that we can no longer disable these tracepoints (there are others that were disabled as well). |
|
Of course you can :) but there is now a proper Scap API for that and a TPMASK ioctl! (A bit lower in that very same file) |
leogr
left a comment
There was a problem hiding this comment.
SGTM, however, we should also bump the DRIVER API version, shouldn't we?
cc @gnosek @FedeDP @Andreagit97
|
Answered above to grzeg with the same question! 😄 |
|
LGTM label has been added. DetailsGit tree hash: 17ca6765b5bdac9f93e80b7f231108ce36d4c3a8 |
|
@gnosek mind to approve if you are ok? |
|
[APPROVALNOTIFIER] This PR is APPROVED This pull-request has been approved by: Andreagit97, FedeDP, gnosek, hbrueckner The full list of commands accepted by this bot can be found here. The pull request process is described here DetailsNeeds approval from an approver in each of these files:
Approvers can indicate their approval by writing |
What type of PR is this?
/kind cleanup
Any specific area of the project related to this PR?
/area driver-kmod
/area libscap-engine-kmod
Does this PR require a change in the driver versions?
/version driver-API-version-major
But we already bumped major in #709
What this PR does / why we need it:
Both bpf and modern bpf use a syscalls of interest concept; kmod was instead using an event of interest concept.
I ported kmod to use same concept of bpf and modern bpf.
NOTE: using event of interest also carried bugs, because when an user enforce certain
ppm_scthrough the scap/sinsp APIs, we would also lose all other non-syscalls event types generated by kmod (ie: signals, drops...), because kmod internally zeroed the event mask.Which issue(s) this PR fixes:
Described above.
Fixes #
Special notes for your reviewer:
Does this PR introduce a user-facing change?: