Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Dump UEFI module name and type in json #91

Merged
merged 6 commits into from
Oct 5, 2024
Merged

Conversation

TakahiroHaruyama
Copy link
Contributor

Add dumping UEFI module name/type in JSON format. The data will be utilized by the new fwhunt plugin.
I don't rush at all about this merge.

@@ -370,4 +374,8 @@ void efiloader::Uefitool::dump_jsons() {
out.replace_extension("").replace_extension(".images.json");
std::ofstream out_guids(out);
out_guids << std::setw(4) << images_guids << std::endl;
// Dump module types
out.replace_extension("").replace_extension(".mod_types.json");
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

better to dump this information as part of .images.json (.modules.json) and then update dependencies builder in efixplorer that is currently using .images.json. Let's do it after the release of IDA 90 and the corresponding efixplorer update

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I merged the master update for IDA9 then changed the code to add module type into *.images.json instead of creating *.mod_types.json. Please check.

Copy link
Collaborator

@yeggor yeggor Oct 5, 2024

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

thanks! I've checked it and it works fine, although there are a few things I'd like to fix before merging this:

  • I think it will be clearer to store it in more readable format ({ "name": name, "kind": kind } instead of [name, kind]), for example:

    "FA20568B-548B-4B2B-81EF-1BA08D4A3CEC": {
      "kind": "DXE driver",
      "name": "BootScriptExecutorDxe"
    },
    "FAB5D4F4-83C0-4AAF-8480-442D11DF6CEA": {
      "kind": "DXE driver",
      "name": "VirtioScsiDxe"
    }
  • Since we are reading the data to build a sequence of modules execution from a file (which may be corrupted/outdated), we should handle exceptions (this is not related to this PR, but better add it here)

I'll add these changes and merge.

@yeggor yeggor merged commit 6fde36f into master Oct 5, 2024
3 checks passed
@yeggor yeggor deleted the save_module_type_as_json branch October 5, 2024 01:59
@TakahiroHaruyama
Copy link
Contributor Author

Thanks for the improvement and merging :-) I completely agree with you.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants