gramineproject / graphene

Graphene / Graphene-SGX - a library OS for Linux multi-process applications, with Intel SGX support
https://grapheneproject.io
GNU Lesser General Public License v3.0
771 stars 261 forks source link

[LibOS] Use a lock in `shim_debug` #2560

Closed pwmarcz closed 3 years ago

pwmarcz commented 3 years ago

Description of the changes

This solves a small TODO: the global debug map list was not protected by any lock. I'm not sure if that ever caused problems, but now it should be correct.

In addition, I took the opportunity to convert the global variable name to g_*, and use standard list.h instead of ad-hoc lists.

How to test this PR?

Existing tests should be enough: they include GDB integration, as well as various fork and exec scenarios.


This change is Reviewable