Skip to content

Make slaunch_module reentrant #11

@krystian-hebel

Description

@krystian-hebel

Currently, slaunch_module doesn't handle multiple invocations very well. On subsequent calls, it overwrites pointer to previous SINIT without freeing it, leaking memory in the process. On boot only last module is used, given that it matches the platform.

Ideally, this function should fall back to previously loaded module if new one doesn't match the platform or is in older version; otherwise it should properly free memory used by previous module.

This would allow scripts in grub.d to iterate over SINITs in /boot and create slaunch_module entry for each one, removing from user the burden of manually copying just the proper SINIT.

Metadata

Metadata

Assignees

Labels

enhancementNew feature or request

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions