From: "Laszlo Ersek" <lersek@redhat.com>
To: "Ni, Ray" <ray.ni@intel.com>,
"devel@edk2.groups.io" <devel@edk2.groups.io>,
"Liu, Zhiguang" <zhiguang.liu@intel.com>
Cc: Liming Gao <gaoliming@byosoft.com.cn>,
"Wu, Jiaxin" <jiaxin.wu@intel.com>,
Ard Biesheuvel <ardb+tianocore@kernel.org>,
Sami Mujawar <Sami.Mujawar@arm.com>
Subject: Re: [edk2-devel] [PATCH] MdeModulePkg/SMM: Support to unregister SMI handler inside SMI handler
Date: Thu, 25 Jan 2024 20:25:17 +0100 [thread overview]
Message-ID: <12f76b60-adcb-5695-adf8-ae1b69bcb316@redhat.com> (raw)
In-Reply-To: <MN6PR11MB8244877AC7DE3CBD50A5ED498C7A2@MN6PR11MB8244.namprd11.prod.outlook.com>
On 1/25/24 13:05, Ni, Ray wrote:
> Laszlo,
> SMI handler is called from SmmCore.
> So SmmCore knows which handle is passed to the SMI handler.
> How about let Unregister() rejects the request coming from a SMI handler which unregisters other handles?
>
> A "gCurrentSmiHandle" can be assigned before calling the SMI handler and set to NULL when it returns.
> Unregister() compares the handle against gCurrentSmiHandle if it's not NULL.
Sounds safe enough. I don't know if it conforms to the spec however
(although we might just choose not to care about that).
Laszlo
-=-=-=-=-=-=-=-=-=-=-=-
Groups.io Links: You receive all messages sent to this group.
View/Reply Online (#114458): https://edk2.groups.io/g/devel/message/114458
Mute This Topic: https://groups.io/mt/103925794/7686176
Group Owner: devel+owner@edk2.groups.io
Unsubscribe: https://edk2.groups.io/g/devel/leave/12367111/7686176/1913456212/xyzzy [rebecca@openfw.io]
-=-=-=-=-=-=-=-=-=-=-=-
next prev parent reply other threads:[~2024-01-25 19:25 UTC|newest]
Thread overview: 12+ messages / expand[flat|nested] mbox.gz Atom feed top
2024-01-24 4:03 [edk2-devel] [PATCH] MdeModulePkg/SMM: Support to unregister SMI handler inside SMI handler Zhiguang Liu
2024-01-24 8:11 ` Ni, Ray
2024-01-24 13:06 ` Laszlo Ersek
2024-01-24 16:17 ` Ni, Ray
2024-01-24 17:15 ` Felix Polyudov via groups.io
2024-01-24 17:19 ` Laszlo Ersek
2024-01-25 10:48 ` Laszlo Ersek
2024-01-25 12:05 ` Ni, Ray
2024-01-25 19:25 ` Laszlo Ersek [this message]
2024-01-26 2:17 ` Ni, Ray
2024-03-07 6:11 ` Zhiguang Liu
2024-03-07 9:06 ` Laszlo Ersek
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-list from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=12f76b60-adcb-5695-adf8-ae1b69bcb316@redhat.com \
--to=devel@edk2.groups.io \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox