public inbox for devel@edk2.groups.io
 help / color / mirror / Atom feed
* [edk2-devel] A bug in the SmmCommunication V3 logic
@ 2025-04-18  6:44 Ni, Ray via groups.io
  2025-04-18  7:30 ` Kun Qin via groups.io
  0 siblings, 1 reply; 11+ messages in thread
From: Ni, Ray via groups.io @ 2025-04-18  6:44 UTC (permalink / raw)
  To: kuqin@microsoft.com; +Cc: Kinney, Michael D, devel@edk2.groups.io, Ni, Ray

[-- Attachment #1: Type: text/plain, Size: 1454 bytes --]

Hi Qin,
I think there is a bug in the SmmCommunication protocol implementation.

All 3 communication protocol calls go to the same communicate() function that tests the HeaderGuid against the V3 GUID.
But when the call is from runtime, reading the HeaderGuid using the physical address of communication buffer would cause page fault. The virtual address should be used.
The bug was not there without your patch because the communicate routines happened not to read any bytes from the communication buffer but simply pass the address to SMM. SMM expects the physical address because the virtual-to-physical mapping in SMM is identical.

The bug exists in both the SmmIpl.c in MdeModulePkg and the MmCommunicationDxe.c in StandaloneMmPkg.
The bug would cause OS boot failure if there is any communication protocol invocation after ExitBootService.

I guess the bug might not be there in your first version of patch, but was introduced when I asked you to consolidate the logic together.

Can you kindly reproduce it locally and send out a fix after confirming?

Thanks,
Ray


-=-=-=-=-=-=-=-=-=-=-=-
Groups.io Links: You receive all messages sent to this group.
View/Reply Online (#121264): https://edk2.groups.io/g/devel/message/121264
Mute This Topic: https://groups.io/mt/112327494/7686176
Group Owner: devel+owner@edk2.groups.io
Unsubscribe: https://edk2.groups.io/g/devel/unsub [rebecca@openfw.io]
-=-=-=-=-=-=-=-=-=-=-=-



[-- Attachment #2: Type: text/html, Size: 4930 bytes --]

^ permalink raw reply	[flat|nested] 11+ messages in thread

end of thread, other threads:[~2025-04-19  6:04 UTC | newest]

Thread overview: 11+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2025-04-18  6:44 [edk2-devel] A bug in the SmmCommunication V3 logic Ni, Ray via groups.io
2025-04-18  7:30 ` Kun Qin via groups.io
2025-04-18 15:58   ` Michael D Kinney via groups.io
2025-04-18 18:25     ` Kun Qin via groups.io
2025-04-18 21:33       ` Michael D Kinney via groups.io
2025-04-18 22:17         ` Kun Qin via groups.io
2025-04-18 22:22           ` Michael D Kinney via groups.io
2025-04-18 22:34             ` Kun Qin via groups.io
2025-04-18 22:37               ` Michael D Kinney via groups.io
2025-04-18 22:46                 ` Kun Qin via groups.io
2025-04-19  6:04                   ` Michael D Kinney via groups.io

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox