libs icon indicating copy to clipboard operation
libs copied to clipboard

Allow the userspace libs to specify a driver at runtime

Open dwindsor opened this issue 3 years ago • 21 comments

It would be useful to be able to load custom named drivers (e.g. falco-acme) alongside the stock driver (falco).

Currently, this isn't possible because stock libscap is unable to connect to custom-named Falco drivers. This happens because libscap sets the name of the driver at compile time via the environment variable DRIVER_DEVICE_NAME.

From scap_open_live_int():

//
// Open the device
//
snprintf(filename, sizeof(filename), "%s/dev/" DRIVER_DEVICE_NAME "%d", scap_get_host_root(), all_scanned_devs);

Feature

We need to add support for runtime selection of a driver by name.

This can be accomplished by adding a parameter to e.g. scap_open_int_live() and sinsp_open() containing the driver name:

sinsp s;

try
{
    // First, try connecting to a custom-named driver.
    s.open("acme-falco");
 }
 catch (sinsp_exception &ex)
 {
    driverLoaded = false;
 }
 
 if (!driverLoaded)
 {
    try
    {
        // If unable to connect to a custom-named driver, try the stock driver.
        s.open("falco")
    }
    catch (sinsp_exception)
    {
    }
}

**Alternatives**

**Additional context**

dwindsor avatar Mar 09 '22 17:03 dwindsor

I think it makes sense! We might add an optional param to sinsp::open() to retain backward compatibility; then add a new field to scap_open_args.

Would you be open to contribute? ;) Thanks!

FedeDP avatar Mar 29 '22 16:03 FedeDP

Issues go stale after 90d of inactivity.

Mark the issue as fresh with /remove-lifecycle stale.

Stale issues rot after an additional 30d of inactivity and eventually close.

If this issue is safe to close now please do so with /close.

Provide feedback via https://github.com/falcosecurity/community.

/lifecycle stale

poiana avatar Jun 27 '22 18:06 poiana

/remove-lifecycle stale

FedeDP avatar Jun 28 '22 10:06 FedeDP

Issues go stale after 90d of inactivity.

Mark the issue as fresh with /remove-lifecycle stale.

Stale issues rot after an additional 30d of inactivity and eventually close.

If this issue is safe to close now please do so with /close.

Provide feedback via https://github.com/falcosecurity/community.

/lifecycle stale

poiana avatar Sep 26 '22 15:09 poiana

/remove-lifecycle stale

FedeDP avatar Sep 26 '22 16:09 FedeDP

Issues go stale after 90d of inactivity.

Mark the issue as fresh with /remove-lifecycle stale.

Stale issues rot after an additional 30d of inactivity and eventually close.

If this issue is safe to close now please do so with /close.

Provide feedback via https://github.com/falcosecurity/community.

/lifecycle stale

poiana avatar Dec 25 '22 21:12 poiana

/remove-lifecycle stale

Andreagit97 avatar Dec 25 '22 23:12 Andreagit97

Issues go stale after 90d of inactivity.

Mark the issue as fresh with /remove-lifecycle stale.

Stale issues rot after an additional 30d of inactivity and eventually close.

If this issue is safe to close now please do so with /close.

Provide feedback via https://github.com/falcosecurity/community.

/lifecycle stale

poiana avatar Mar 26 '23 03:03 poiana

/remove-lifecycle stale

FedeDP avatar Mar 26 '23 08:03 FedeDP

Issues go stale after 90d of inactivity.

Mark the issue as fresh with /remove-lifecycle stale.

Stale issues rot after an additional 30d of inactivity and eventually close.

If this issue is safe to close now please do so with /close.

Provide feedback via https://github.com/falcosecurity/community.

/lifecycle stale

poiana avatar Sep 05 '23 13:09 poiana

/remove-lifecycle stale

Andreagit97 avatar Sep 05 '23 13:09 Andreagit97

Issues go stale after 90d of inactivity.

Mark the issue as fresh with /remove-lifecycle stale.

Stale issues rot after an additional 30d of inactivity and eventually close.

If this issue is safe to close now please do so with /close.

Provide feedback via https://github.com/falcosecurity/community.

/lifecycle stale

poiana avatar Dec 04 '23 15:12 poiana

Stale issues rot after 30d of inactivity.

Mark the issue as fresh with /remove-lifecycle rotten.

Rotten issues close after an additional 30d of inactivity.

If this issue is safe to close now please do so with /close.

Provide feedback via https://github.com/falcosecurity/community.

/lifecycle rotten

poiana avatar Jan 03 '24 15:01 poiana

Rotten issues close after 30d of inactivity.

Reopen the issue with /reopen.

Mark the issue as fresh with /remove-lifecycle rotten.

Provide feedback via https://github.com/falcosecurity/community. /close

poiana avatar Feb 02 '24 15:02 poiana

@poiana: Closing this issue.

In response to this:

Rotten issues close after 30d of inactivity.

Reopen the issue with /reopen.

Mark the issue as fresh with /remove-lifecycle rotten.

Provide feedback via https://github.com/falcosecurity/community. /close

Instructions for interacting with me using PR comments are available here. If you have questions or suggestions related to my behavior, please file an issue against the kubernetes/test-infra repository.

poiana avatar Feb 02 '24 15:02 poiana

/remove-lifecycle stale

Andreagit97 avatar Feb 02 '24 16:02 Andreagit97

Rotten issues close after 30d of inactivity.

Reopen the issue with /reopen.

Mark the issue as fresh with /remove-lifecycle rotten.

Provide feedback via https://github.com/falcosecurity/community. /close

poiana avatar Mar 03 '24 21:03 poiana

@poiana: Closing this issue.

In response to this:

Rotten issues close after 30d of inactivity.

Reopen the issue with /reopen.

Mark the issue as fresh with /remove-lifecycle rotten.

Provide feedback via https://github.com/falcosecurity/community. /close

Instructions for interacting with me using PR comments are available here. If you have questions or suggestions related to my behavior, please file an issue against the kubernetes/test-infra repository.

poiana avatar Mar 03 '24 21:03 poiana

/reopen

FedeDP avatar Mar 03 '24 22:03 FedeDP

@FedeDP: Reopened this issue.

In response to this:

/reopen

Instructions for interacting with me using PR comments are available here. If you have questions or suggestions related to my behavior, please file an issue against the kubernetes/test-infra repository.

poiana avatar Mar 03 '24 22:03 poiana

/remove-lifecycle stale

Andreagit97 avatar Mar 05 '24 10:03 Andreagit97

Rotten issues close after 30d of inactivity.

Reopen the issue with /reopen.

Mark the issue as fresh with /remove-lifecycle rotten.

Provide feedback via https://github.com/falcosecurity/community. /close

poiana avatar Apr 04 '24 15:04 poiana

@poiana: Closing this issue.

In response to this:

Rotten issues close after 30d of inactivity.

Reopen the issue with /reopen.

Mark the issue as fresh with /remove-lifecycle rotten.

Provide feedback via https://github.com/falcosecurity/community. /close

Instructions for interacting with me using PR comments are available here. If you have questions or suggestions related to my behavior, please file an issue against the kubernetes/test-infra repository.

poiana avatar Apr 04 '24 15:04 poiana