-
Notifications
You must be signed in to change notification settings - Fork 104
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
Resolve deadlock in RustBootServicesAllocatorDxe #358
Merged
makubacki
merged 1 commit into
microsoft:release/202302
from
joschock:personal/joschock/fix_rust_allocator_deadlock
Nov 15, 2023
Merged
Resolve deadlock in RustBootServicesAllocatorDxe #358
makubacki
merged 1 commit into
microsoft:release/202302
from
joschock:personal/joschock/fix_rust_allocator_deadlock
Nov 15, 2023
Conversation
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
github-actions
bot
added
impact:non-functional
Does not have a functional impact
impact:testing
Affects testing
labels
Nov 14, 2023
joschock
force-pushed
the
personal/joschock/fix_rust_allocator_deadlock
branch
from
November 14, 2023 18:50
433e3f0
to
40d9fc4
Compare
makubacki
approved these changes
Nov 14, 2023
makubacki
reviewed
Nov 14, 2023
joschock
force-pushed
the
personal/joschock/fix_rust_allocator_deadlock
branch
4 times, most recently
from
November 14, 2023 22:25
aa69266
to
8a1ea6b
Compare
Javagedes
approved these changes
Nov 15, 2023
makubacki
force-pushed
the
personal/joschock/fix_rust_allocator_deadlock
branch
from
November 15, 2023 21:08
0d34ce4
to
c058aad
Compare
ProjectMuBot
referenced
this pull request
in microsoft/mu_tiano_platforms
Nov 17, 2023
Introduces 5 new commits in [Common/MU](https://github.com/microsoft/mu_plus.git). <details> <summary>Commits</summary> <ul> <li><a href="https://github.com/microsoft/mu_plus/commit/61f7188ab5afcbe36c687bd46fb29fead955124d">61f718</a> Inspect `mLoggerInfo` before accessing in the event callback (<a href="https://github.com/microsoft/mu_plus/pull/345">#345</a>)</li> <li><a href="https://github.com/microsoft/mu_plus/commit/2591f7aa3ba4f8ccaf25aad6b123a62b035be799">2591f7</a> pip: bump edk2-pytool-extensions from 0.26.0 to 0.26.2 (<a href="https://github.com/microsoft/mu_plus/pull/360">#360</a>)</li> <li><a href="https://github.com/microsoft/mu_plus/commit/feed5579b26049764f7eaa234d5b335ee9665c4a">feed55</a> Resolve deadlock in RustBootServicesAllocatorDxe (<a href="https://github.com/microsoft/mu_plus/pull/358">#358</a>)</li> <li><a href="https://github.com/microsoft/mu_plus/commit/1edf7275bd0a0c1757740a21e26e8d0ddecfc2ae">1edf72</a> Fix rust advlogger deadlock (<a href="https://github.com/microsoft/mu_plus/pull/356">#356</a>)</li> <li><a href="https://github.com/microsoft/mu_plus/commit/14c187b8ac4858d154612cd67a96820f78fe5584">14c187</a> Add SetProtocol command to force devices to Report Mode (<a href="https://github.com/microsoft/mu_plus/pull/361">#361</a>)</li> </ul> </details> Signed-off-by: Project Mu Bot <[email protected]>
makubacki
referenced
this pull request
in microsoft/mu_tiano_platforms
Nov 18, 2023
Introduces 5 new commits in [Common/MU](https://github.com/microsoft/mu_plus.git). <details> <summary>Commits</summary> <ul> <li><a href="https://github.com/microsoft/mu_plus/commit/feed5579b26049764f7eaa234d5b335ee9665c4a">feed55</a> Resolve deadlock in RustBootServicesAllocatorDxe (<a href="https://github.com/microsoft/mu_plus/pull/358">#358</a>)</li> <li><a href="https://github.com/microsoft/mu_plus/commit/1edf7275bd0a0c1757740a21e26e8d0ddecfc2ae">1edf72</a> Fix rust advlogger deadlock (<a href="https://github.com/microsoft/mu_plus/pull/356">#356</a>)</li> <li><a href="https://github.com/microsoft/mu_plus/commit/14c187b8ac4858d154612cd67a96820f78fe5584">14c187</a> Add SetProtocol command to force devices to Report Mode (<a href="https://github.com/microsoft/mu_plus/pull/361">#361</a>)</li> </ul> </details> Signed-off-by: Project Mu Bot <[email protected]>
kenlautner
pushed a commit
that referenced
this pull request
Dec 14, 2023
## Description Fix an issue where rust boot services allocator implementation could deadlock if memory allocations were attempted at different TPLs. Deadlock occurs in following scenario: 1. Task running at low TPL initiates an allocation request. 2. While that allocation is in progress and the lock is held, an interrupt occurs, and a new task executes at a higher TPL 3. new task attempts an allocation. Deadlock occurs because the higher TPL task cannot acquire the lock because it is held by the lower TPL task, and the lower TPL task cannot make forward progress because it has been interrupted by the higher TPL task. To resolve this, this PR updates the allocation implementation to remove the spinlock. An AtomicPtr is used to give well-ordered access to the bootservices pointer used as the basis for the allocation implementation. Other aspects of the implementation (i.e. creation of the allocation tracker) are already thread-safe or are the responsibility of the boot services implementation. PR also contains some minor style cleanup. - [ ] Impacts functionality? - [ ] Impacts security? - [ ] Breaking change? - [x] Includes tests? - RustBootServicesAllocatorDxe unit tests updated to accommodate new implementation. - [ ] Includes documentation? ## How This Was Tested Verified boot on QEMU. ## Integration Instructions N/A
kenlautner
pushed a commit
that referenced
this pull request
Dec 20, 2023
## Description Fix an issue where rust boot services allocator implementation could deadlock if memory allocations were attempted at different TPLs. Deadlock occurs in following scenario: 1. Task running at low TPL initiates an allocation request. 2. While that allocation is in progress and the lock is held, an interrupt occurs, and a new task executes at a higher TPL 3. new task attempts an allocation. Deadlock occurs because the higher TPL task cannot acquire the lock because it is held by the lower TPL task, and the lower TPL task cannot make forward progress because it has been interrupted by the higher TPL task. To resolve this, this PR updates the allocation implementation to remove the spinlock. An AtomicPtr is used to give well-ordered access to the bootservices pointer used as the basis for the allocation implementation. Other aspects of the implementation (i.e. creation of the allocation tracker) are already thread-safe or are the responsibility of the boot services implementation. PR also contains some minor style cleanup. - [ ] Impacts functionality? - [ ] Impacts security? - [ ] Breaking change? - [x] Includes tests? - RustBootServicesAllocatorDxe unit tests updated to accommodate new implementation. - [ ] Includes documentation? ## How This Was Tested Verified boot on QEMU. ## Integration Instructions N/A
ProjectMuBot
referenced
this pull request
in microsoft/mu_tiano_platforms
Feb 6, 2024
Introduces 84 new commits in [Common/MU](https://github.com/microsoft/mu_plus.git). <details> <summary>Commits</summary> <ul> <li><a href="https://github.com/microsoft/mu_plus/commit/aee3120915d9811fecb6f8f86f3c1e97adf57ed6">aee312</a> Update readme for the 202308 release</li> <li><a href="https://github.com/microsoft/mu_plus/commit/0e9ec1e6e2c06c0c0e9730869dd0c667df889b87">0e9ec1</a> Updated override for DisplayEngineDxe.inf</li> <li><a href="https://github.com/microsoft/mu_plus/commit/c8771a2f1d74d772faade363e6895d4aa981e26d">c8771a</a> Updated Readme to include changes made since the last release</li> <li><a href="https://github.com/microsoft/mu_plus/commit/22cf122e60c409a035a89fd9bc2fc54fb2f3fd2a">22cf12</a> TEMP COMMIT: use test branches for submodules</li> <li><a href="https://github.com/microsoft/mu_plus/commit/8f57057e10ac45110328f04a35eb03b77f4d31be">8f5705</a> Add HiiKeyboardLayout crate to support UEFI HII Keyboard Layouts (<a href="https://github.com/microsoft/mu_plus/pull/342">#342</a>)</li> <li><a href="https://github.com/microsoft/mu_plus/commit/d881e0bafc2b8360a3a2c20b2d9ed22a1422d366">d881e0</a> TpmTestingPkg: Add InputChannelLib (<a href="https://github.com/microsoft/mu_plus/pull/352">#352</a>)</li> <li><a href="https://github.com/microsoft/mu_plus/commit/1114f7d8fecad3353ab74613e7120f32176df446">1114f7</a> Repo File Sync: MuDevOpsWrapper.yml - Add code coverage calculation parameter (<a href="https://github.com/microsoft/mu_plus/pull/349">#349</a>)</li> <li><a href="https://github.com/microsoft/mu_plus/commit/dd3fde8efe4ac5c6b2f40e5c21101bb98b00016d">dd3fde</a> AdvLoggerPkg: Add PanicLib instance (<a href="https://github.com/microsoft/mu_plus/pull/348">#348</a>)</li> <li><a href="https://github.com/microsoft/mu_plus/commit/f4a54346dff7ec10234b580239f2d5dca3f9db61">f4a543</a> Add HID Keyboard support to UefiHidDxe (<a href="https://github.com/microsoft/mu_plus/pull/347">#347</a>)</li> <li><a href="https://github.com/microsoft/mu_plus/commit/610c0c1b167054db6366d1494a8098ac70772b4c">610c0c</a> Add log retrieval info to main readme (<a href="https://github.com/microsoft/mu_plus/pull/355">#355</a>)</li> <li><a href="https://github.com/microsoft/mu_plus/commit/9c591f3251ad34f4f7074796609b4b26d0fdcab0">9c591f</a> Repo File Sync: Update to Mu DevOps 7.2.0 (<a href="https://github.com/microsoft/mu_plus/pull/357">#357</a>)</li> <li><a href="https://github.com/microsoft/mu_plus/commit/59b8047e9036a352a88fc0d02e7113d2beba6f7d">59b804</a> Fixed logic related to DxeCore only advanced logger (<a href="https://github.com/microsoft/mu_plus/pull/359">#359</a>)</li> <li><a href="https://github.com/microsoft/mu_plus/commit/825d5ef66ca5008f5c39859c49a2176a75d59fe7">825d5e</a> Inspect `mLoggerInfo` before accessing in the event callback (<a href="https://github.com/microsoft/mu_plus/pull/345">#345</a>)</li> <li><a href="https://github.com/microsoft/mu_plus/commit/e0982bb83fe14127000cffdb2d5ee47a396b4311">e0982b</a> Resolve deadlock in RustBootServicesAllocatorDxe (<a href="https://github.com/microsoft/mu_plus/pull/358">#358</a>)</li> <li><a href="https://github.com/microsoft/mu_plus/commit/da5b6b2779722335e0010681f43c30e22083ca5b">da5b6b</a> Fix rust advlogger deadlock (<a href="https://github.com/microsoft/mu_plus/pull/356">#356</a>)</li> <li><a href="https://github.com/microsoft/mu_plus/commit/641bdd79a00e78f77a71104400f9871ef5677bc5">641bdd</a> Add SetProtocol command to force devices to Report Mode (<a href="https://github.com/microsoft/mu_plus/pull/361">#361</a>)</li> <li><a href="https://github.com/microsoft/mu_plus/commit/29de4df8a957f6da4a5f86c838111e566892bbb0">29de4d</a> GitHub Action: Bump actions/github-script from 6 to 7 (<a href="https://github.com/microsoft/mu_plus/pull/364">#364</a>)</li> <li><a href="https://github.com/microsoft/mu_plus/commit/51de1edca89895a4f1c27c794da8364905cd3f72">51de1e</a> Integration steps for [email protected]</li> <li><a href="https://github.com/microsoft/mu_plus/commit/641b6a9ab44398b00ade162fa154fe951afe0d88">641b6a</a> Repo File Sync: synced file(s) with microsoft/mu_devops</li> <li><a href="https://github.com/microsoft/mu_plus/commit/04025428304728493a5befbacfdcbc1de482ea3f">040254</a> Use New Stack Cookie Library (<a href="https://github.com/microsoft/mu_plus/pull/367">#367</a>)</li> <li><a href="https://github.com/microsoft/mu_plus/commit/ab13309c02b2eea7e71a6b6951241e37b3efe6aa">ab1330</a> Repo File Sync: synced file(s) with microsoft/mu_devops (<a href="https://github.com/microsoft/mu_plus/pull/369">#369</a>)</li> <li><a href="https://github.com/microsoft/mu_plus/commit/4614581b5b32374867cf759f3aaef15303d37c51">461458</a> Add Unaccepted Memory Type to Memory Protection Test App (<a href="https://github.com/microsoft/mu_plus/pull/371">#371</a>)</li> <li><a href="https://github.com/microsoft/mu_plus/commit/eb29cd2dfd96dd7cb7808b61d5daf0bb6326c5f9">eb29cd</a> TpmReplay: Add crypto agile log format support</li> <li><a href="https://github.com/microsoft/mu_plus/commit/8a91507cbdfba96e769375544284ca41ac7ddf04">8a9150</a> TpmReplay: Add UEFI variable decode support</li> <li><a href="https://github.com/microsoft/mu_plus/commit/d614e5b60dc2abdc0bc57fffa17ff18c6f77d4a2">d614e5</a> TpmTestingPkg/tcg_platform.py: Add SHA1 support</li> <li><a href="https://github.com/microsoft/mu_plus/commit/43c02644eda1bd22e6f78d7cc07ad8d6fd27720f">43c026</a> TpmReplay: Use a local logger</li> <li><a href="https://github.com/microsoft/mu_plus/commit/a58a7370aa00f5fa996417130c32d2e820cd3bb8">a58a73</a> TpmReplay: Add variable data hex view to log</li> <li><a href="https://github.com/microsoft/mu_plus/commit/f4a32ae462439d3823250948ea8660558efc9723">f4a32a</a> TpmTestingPkg/TpmReplayPei/Readme.md: Add new log and variable details</li> <li><a href="https://github.com/microsoft/mu_plus/commit/132d3583f7738fc4c15f884f4c1488614174f4cf">132d35</a> Remove locks from RustAdvancedLoggerDxe</li> <li><a href="https://github.com/microsoft/mu_plus/commit/0c369c29dbca0ec60f9907ea2fe4af60084a62c0">0c369c</a> Add function!() macro that yields current function name</li> <li><a href="https://github.com/microsoft/mu_plus/commit/7e7fd4084626134bf4c5b2aa0c9e98e073093347">7e7fd4</a> Add 'std' feature to RustAdvancedLoggerDxe which enables use of std::println instead of AdvLoggerProtocol - useful for test environments.</li> <li><a href="https://github.com/microsoft/mu_plus/commit/c209c243f2b40990c91c10df3ae4a270736ab17b">c209c2</a> Create separate FrameBufferMemDrawLib inf for PEI and DXE (<a href="https://github.com/microsoft/mu_plus/pull/373">#373</a>)</li> <li><a href="https://github.com/microsoft/mu_plus/commit/6876d73890b39bab36d7e92d7b3cc758c81cf93a">6876d7</a> MemoryProtectionTestApp: Separate Reset Method Init to Arch Specific Files (<a href="https://github.com/microsoft/mu_plus/pull/376">#376</a>)</li> <li><a href="https://github.com/microsoft/mu_plus/commit/ff8f8d35b36bbe4569c391033c7b110c5cc1c43d">ff8f8d</a> MsCorePkg/SecureBootKeyStoreLib: Add Library implementation (<a href="https://github.com/microsoft/mu_plus/pull/377">#377</a>)</li> <li><a href="https://github.com/microsoft/mu_plus/commit/a9a60670433c82635d8cd0841aed995fcee1454b">a9a606</a> pip: update to latest</li> <li><a href="https://github.com/microsoft/mu_plus/commit/2967422499962f355db17e2ba73d81694fc34439">296742</a> Minor debug print updates for DxePagingAuditTestApp (<a href="https://github.com/microsoft/mu_plus/pull/382">#382</a>)</li> <li><a href="https://github.com/microsoft/mu_plus/commit/ce3708db055619fdc4ca870773ef3d84d4b60a67">ce3708</a> DxePagingAudit: Update MemoryOutsideEfiMemoryMapIsInaccessible Test (<a href="https://github.com/microsoft/mu_plus/pull/381">#381</a>)</li> <li><a href="https://github.com/microsoft/mu_plus/commit/81cb602b3389821ea868d4e316c3f2d7d4853001">81cb60</a> GitHub Action: Bump actions/setup-python from 4 to 5 (<a href="https://github.com/microsoft/mu_plus/pull/383">#383</a>)</li> <li><a href="https://github.com/microsoft/mu_plus/commit/1c47d4a9aa60ddc690ba48dcdf5c8c087a494d67">1c47d4</a> Adding policy check for advanced file logger (<a href="https://github.com/microsoft/mu_plus/pull/384">#384</a>)</li> <li><a href="https://github.com/microsoft/mu_plus/commit/1c3b493b1aad8ab0b2fca5e5a4449f25059066a2">1c3b49</a> Add header guards missing in some files</li> <li><a href="https://github.com/microsoft/mu_plus/commit/ab2aa4d045b4a868cb10940193d370ab124ada4e">ab2aa4</a> MsWheaPkg/MsWheaEarlyStorageLib: Remove unused static function</li> <li><a href="https://github.com/microsoft/mu_plus/commit/7e75ea6ba6f8dc4684916f4979814fa9fc485418">7e75ea</a> MsWheaPkg/MsWheaEarlyStorageLib: Remove unsigned comparisons to zero</li> <li><a href="https://github.com/microsoft/mu_plus/commit/0e6136517ad67955a8f659ecf44f04a5a161e359">0e6136</a> MsGraphicsPkg/SimpleUIToolKit: Move array bounds check before access (<a href="https://github.com/microsoft/mu_plus/pull/386">#386</a>)</li> <li><a href="https://github.com/microsoft/mu_plus/commit/57a966eb9868f828c82ddd537e0cbdd542e2dabd">57a966</a> Implement a new version of UefiHidDxeV2 with significant improvements to unit test capability and general architecture. (<a href="https://github.com/microsoft/mu_plus/pull/374">#374</a>)</li> <li><a href="https://github.com/microsoft/mu_plus/commit/de375655dcd0bc59ddc0deee8a32d3285ba9dbc2">de3756</a> Updated CISettings.py for pipeline testing</li> <li><a href="https://github.com/microsoft/mu_plus/commit/e7665f1338708daf51e7d9e5a90d50edde959daa">e7665f</a> Update readme for the 202311 release</li> <li><a href="https://github.com/microsoft/mu_plus/commit/d084bbafe43dc7acf4c016dfafaba73f5932fa86">d084bb</a> Added patch notes for the release</li> <li><a href="https://github.com/microsoft/mu_plus/commit/345d45e3ac5b90f3bd0c7fa864645bea2a614fde">345d45</a> TEMP COMMIT: Updated submodules to point to the 2311_Staging branches</li> <li><a href="https://github.com/microsoft/mu_plus/commit/22485651a0184f889d47e838dc334730d251df44">224856</a> pip: bump edk2-pytool-library from 0.19.7 to 0.19.8 (<a href="https://github.com/microsoft/mu_plus/pull/391">#391</a>)</li> <li><a href="https://github.com/microsoft/mu_plus/commit/14e3a7e8063241c1c3f10eec405f4ebfd4545605">14e3a7</a> Rust Dependency: Update mockall requirement from 0.11.4 to 0.12.0 (<a href="https://github.com/microsoft/mu_plus/pull/392">#392</a>)</li> <li><a href="https://github.com/microsoft/mu_plus/commit/3876161653b33dd3f63c41f87a3fd66f186b454f">387616</a> Repo File Sync: Update GitHub actions in CodeQL workflow (<a href="https://github.com/microsoft/mu_plus/pull/396">#396</a>)</li> <li><a href="https://github.com/microsoft/mu_plus/commit/cb0bfb00f8253d112d2b27f50d76080209fe26b5">cb0bfb</a> pip: bump edk2-pytool-extensions from 0.26.3 to 0.26.4 (<a href="https://github.com/microsoft/mu_plus/pull/397">#397</a>)</li> <li><a href="https://github.com/microsoft/mu_plus/commit/4da1abcbcb73d9f0c7563fb94bf999643ec57573">4da1ab</a> Add PeiCore method to find AdvancedLogger log buffer if LoggerInfo is… (<a href="https://github.com/microsoft/mu_plus/pull/389">#389</a>)</li> <li><a href="https://github.com/microsoft/mu_plus/commit/e226d27cc6b7fb962b59bdf4eb9390b9e628d6c3">e226d2</a> pip: bump regex from 2023.10.3 to 2023.12.25 (<a href="https://github.com/microsoft/mu_plus/pull/398">#398</a>)</li> <li><a href="https://github.com/microsoft/mu_plus/commit/74cbde47afda456bc6f00f4ca4aa1f7134365dd4">74cbde</a> DxePagingAudit: Always Write Out All Files</li> <li><a href="https://github.com/microsoft/mu_plus/commit/1552e199f61be38c9d6deaeb6db4eebec889be94">1552e1</a> FlatPageTableLib: Add a Dump Table Function</li> <li><a href="https://github.com/microsoft/mu_plus/commit/c2c460f6ff53c3ffacb7892f925e620ed8f8b2fd">c2c460</a> FlatPageTableLib: Update GetRegionAccessAttributes()</li> <li><a href="https://github.com/microsoft/mu_plus/commit/27c1a73333926e1945728f33588c82f5d9822e9b">27c1a7</a> DxePagingAudit: Pre-allocate Memory For Maps in Shell Tests</li> <li><a href="https://github.com/microsoft/mu_plus/commit/7cf6eb4ecf3d424690586ae05b07e8d5da33455c">7cf6eb</a> DxePagingAudit: Add Function to Check Attributes Using GetRegionAccessAttributes()</li> <li><a href="https://github.com/microsoft/mu_plus/commit/61974f87fe0bc4962886b6e123687fe4da1c2967">61974f</a> DxePagingAudit: Update Shell Tests to Use the Validate Function</li> <li><a href="https://github.com/microsoft/mu_plus/commit/674ed4681057ab28be96616500eacb34bc4a9514">674ed4</a> Rust Dependency: Update scroll requirement from 0.11 to 0.12 (<a href="https://github.com/microsoft/mu_plus/pull/399">#399</a>)</li> <li><a href="https://github.com/microsoft/mu_plus/commit/13f2350370490831dd5750f8e49b8384bd2ee117">13f235</a> DxePagingAudit: Skip Stack Publishing if Stack Info Isn't Valid (<a href="https://github.com/microsoft/mu_plus/pull/400">#400</a>)</li> <li><a href="https://github.com/microsoft/mu_plus/commit/1fe0ab702995ff2885cdd67d238475f925414e13">1fe0ab</a> Fix DxePagingAuditTestApp Typo, Update FlatPageTableLib AARCH64 IsPageReadable() Check (<a href="https://github.com/microsoft/mu_plus/pull/402">#402</a>)</li> <li><a href="https://github.com/microsoft/mu_plus/commit/ad7b45a1ba9a56d710d02a7bc5b00377dd9a901b">ad7b45</a> Remove Pre-Split MemoryProtectionTestApp Files (<a href="https://github.com/microsoft/mu_plus/pull/405">#405</a>)</li> <li><a href="https://github.com/microsoft/mu_plus/commit/a19c8f19441370bff59cb6c5aae071ed7e0c2550">a19c8f</a> Add prefix for advanced logger memory message entries (<a href="https://github.com/microsoft/mu_plus/pull/388">#388</a>)</li> <li><a href="https://github.com/microsoft/mu_plus/commit/af59b6c082b9b4ebac0f96543c3aeaa0e449bde5">af59b6</a> .git-blame-ignore-revs: Ignore Line Ending and Uncrustify only commits (<a href="https://github.com/microsoft/mu_plus/pull/404">#404</a>)</li> <li><a href="https://github.com/microsoft/mu_plus/commit/2841d8e1c2a5eec55c696c0817ada2d64e8aab3e">2841d8</a> Fixing uninitialized variable build error (<a href="https://github.com/microsoft/mu_plus/pull/406">#406</a>)</li> <li><a href="https://github.com/microsoft/mu_plus/commit/41000b344e143d1dfbdbd1912f41497bf9608d31">41000b</a> pip: bump edk2-pytool-library from 0.19.8 to 0.19.9 (<a href="https://github.com/microsoft/mu_plus/pull/407">#407</a>)</li> <li><a href="https://github.com/microsoft/mu_plus/commit/de28d44946778394c9004aa2235ac01bd604d34c">de28d4</a> Wrap advanced logger buffer cursor when the logging area is full (<a href="https://github.com/microsoft/mu_plus/pull/408">#408</a>)</li> <li><a href="https://github.com/microsoft/mu_plus/commit/345c05818db7b8d27273043b22075e972c3751dd">345c05</a> Updated submodule branches to release 202311 and made compatibility changes associated with that</li> <li><a href="https://github.com/microsoft/mu_plus/commit/5d2471f48f6a638601c1cb9a105f650ce8cb928d">5d2471</a> Removed references to libraries that no longer exist</li> <li><a href="https://github.com/microsoft/mu_plus/commit/b39e5ccd5a72ce34cc7892edc99e3c9479baa898">b39e5c</a> Updated CISettings.py to use the edk2toolext codeql helpers (<a href="https://github.com/microsoft/mu_plus/pull/414">#414</a>)</li> <li><a href="https://github.com/microsoft/mu_plus/commit/6d5e0c5ff29037bbd02f20ccc37e4a25c4b5e806">6d5e0c</a> Add call to HdwPortInitialize() when instantiating logger in DXE (<a href="https://github.com/microsoft/mu_plus/pull/411">#411</a>)</li> <li><a href="https://github.com/microsoft/mu_plus/commit/3c47b5f8e2f2bce5533fe446be011938445103db">3c47b5</a> Fixing Advanced logger wrapping unit test (<a href="https://github.com/microsoft/mu_plus/pull/417">#417</a>)</li> <li><a href="https://github.com/microsoft/mu_plus/commit/d567b5e74c50c5fa814722e703174c55a5c285fb">d567b5</a> Adding a more adapt python tooling for Advanced Logger v4 (<a href="https://github.com/microsoft/mu_plus/pull/415">#415</a>)</li> <li><a href="https://github.com/microsoft/mu_plus/commit/5e8ac1d37eb330cebef1c5b8f2f0fcd9a4a74738">5e8ac1</a> Repo File Sync: Add Cargo features to Makefile.toml (<a href="https://github.com/microsoft/mu_plus/pull/409">#409</a>)</li> <li><a href="https://github.com/microsoft/mu_plus/commit/bd05d55d9c2d6dc6b057f795a27f67d1c0bfc0c4">bd05d5</a> AdvLoggerPkg: 64-bit SEC & PEI C Code changes</li> <li><a href="https://github.com/microsoft/mu_plus/commit/6d7c66583426a3b7d0978cb4e1e38ec92ce1561d">6d7c66</a> AdvLoggerPkg/SecDebugAgent: Update for 64-bit</li> <li><a href="https://github.com/microsoft/mu_plus/commit/cf46ce4a55be2ca552c1cc29743635d1edd243dd">cf46ce</a> GitHub Action: Bump actions/cache from 3 to 4 (<a href="https://github.com/microsoft/mu_plus/pull/412">#412</a>)</li> <li><a href="https://github.com/microsoft/mu_plus/commit/cd90897ac68d593c387800aebda9492e26f93519">cd9089</a> Update pip-requirements.txt (<a href="https://github.com/microsoft/mu_plus/pull/421">#421</a>)</li> <li><a href="https://github.com/microsoft/mu_plus/commit/2ea56de87830b3d8f280432c3461b4508f62a39e">2ea56d</a> GitHub Action: Bump robinraju/release-downloader from 1.8 to 1.9 (<a href="https://github.com/microsoft/mu_plus/pull/425">#425</a>)</li> <li><a href="https://github.com/microsoft/mu_plus/commit/1b10bac37eeb213ff99978bc051ed8b73608a014">1b10ba</a> Repo File Sync: synced file(s) with microsoft/mu_devops (<a href="https://github.com/microsoft/mu_plus/pull/427">#427</a>)</li> <li><a href="https://github.com/microsoft/mu_plus/commit/a3d2d5b54c1ad16215ed3b137cdb27618cda0f86">a3d2d5</a> pip: bump edk2-pytool-extensions from 0.27.0 to 0.27.2 (<a href="https://github.com/microsoft/mu_plus/pull/429">#429</a>)</li> <li><a href="https://github.com/microsoft/mu_plus/commit/c9d74b38897beb2993235ee14ef7fa86038c5e1d">c9d74b</a> Repo File Sync: 202311 Branch Transition Updates (<a href="https://github.com/microsoft/mu_plus/pull/430">#430</a>)</li> </ul> </details> Signed-off-by: Project Mu Bot <[email protected]>
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Labels
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Description
Fix an issue where rust boot services allocator implementation could deadlock if memory allocations were attempted at different TPLs. Deadlock occurs in following scenario:
Deadlock occurs because the higher TPL task cannot acquire the lock because it is held by the lower TPL task, and the lower TPL task cannot make forward progress because it has been interrupted by the higher TPL task.
To resolve this, this PR updates the allocation implementation to remove the spinlock. An AtomicPtr is used to give well-ordered access to the bootservices pointer used as the basis for the allocation implementation. Other aspects of the implementation (i.e. creation of the allocation tracker) are already thread-safe or are the responsibility of the boot services implementation.
PR also contains some minor style cleanup.
How This Was Tested
Verified boot on QEMU.
Integration Instructions
N/A