From: "Kun Qin" <kuqin12@gmail.com>
To: devel@edk2.groups.io
Cc: Jiewen Yao <jiewen.yao@intel.com>,
Eric Dong <eric.dong@intel.com>, Ray Ni <ray.ni@intel.com>,
Jian J Wang <jian.j.wang@intel.com>,
Liming Gao <gaoliming@byosoft.com.cn>
Subject: [PATCH v1 0/1] SMM memory management: Inspect memory guarded with pool headers
Date: Tue, 15 Mar 2022 20:59:53 -0700 [thread overview]
Message-ID: <20220316035954.1146-1-kuqin12@gmail.com> (raw)
REF: https://bugzilla.tianocore.org/show_bug.cgi?id=3488
Current free pool routine from PiSmmCore will inspect memory guard status
for target buffer without considering pool headers. This could lead to
`IsMemoryGuarded` function to return incorrect results.
i.e. A 0-sized pool that is configured to be near tail guard page, it
could cause the returned region points into a guard page, which is legal.
However, trying to free this 0 sized pool will cause `IsMemoryGuarded` to
access guard page, which leads to page fault.
This change will inspect memory guarded with pool headers. This can avoid
errors when a pool content happens to be on a page boundary.
Patch v1 branch: https://github.com/kuqin12/edk2/tree/mm_zero_sized_pool
Cc: Jiewen Yao <jiewen.yao@intel.com>
Cc: Eric Dong <eric.dong@intel.com>
Cc: Ray Ni <ray.ni@intel.com>
Cc: Jian J Wang <jian.j.wang@intel.com>
Cc: Liming Gao <gaoliming@byosoft.com.cn>
Kun Qin (1):
MdeModulePkg: PiSmmCore: Inspect memory guarded with pool headers
MdeModulePkg/Core/PiSmmCore/Pool.c | 10 +++++-----
1 file changed, 5 insertions(+), 5 deletions(-)
--
2.35.1.windows.2
next reply other threads:[~2022-03-16 4:00 UTC|newest]
Thread overview: 6+ messages / expand[flat|nested] mbox.gz Atom feed top
2022-03-16 3:59 Kun Qin [this message]
2022-03-16 3:59 ` [PATCH v1 1/1] MdeModulePkg: PiSmmCore: Inspect memory guarded with pool headers Kun Qin
2022-03-18 1:20 ` 回复: [edk2-devel] " gaoliming
2022-03-28 21:57 ` Kun Qin
2022-04-21 20:50 ` Kun Qin
2022-04-22 5:47 ` Wang, Jian J
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=20220316035954.1146-1-kuqin12@gmail.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