Skip to content

[Feature]: Evaluate Gracefully Unloading Drivers That Panic #152

Description

@os-d

Feature Overview

Today if a driver panics, the entire FW will panic and we will not proceed booting. In some cases, this is required as the driver may be a critical security component or required for successful booting. However, in other cases, the driver may be used for non-critical activities and boot could succeed without it. In these cases, it may be valuable to gracefully unload the panicking driver and attempt to continue boot.

Solution Overview

This solution needs to be evaluated, there are many challenges here beyond just implementing the graceful unload (which may not be too technically involved), such as ensuring we catch panics in development (this may look like having a debug/release difference of behavior, though we would want automated release builds that test the panic and proceed behavior, too), telemetry in production would be important, and ensuring that a given driver can be unloaded would be critical.

The other piece of this is that today a driver executes with its own stack during the initial execution, but that stack is freed after it returns from its entry point. Future invocations of the driver, whether through events or protocol, will execute on the stack of the caller. This may need to be split out into creating a separate stack for the driver that is invoked or that scenario could be unsupported.

Finally, one other challenging piece is that all event and protocol registrations for the driver would need to be unregistered to avoid dangling pointers.

Alternatives Considered

No response

Urgency

Low

Are you going to implement the feature request?

None

Do you need maintainer feedback?

None

Anything else?

No response

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

Metadata

Metadata

Assignees

No one assigned

    Projects

    • Status
      Backlog

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions