Thread (37 messages) 37 messages, 13 authors, 2021-08-02

Re: Runtime Memory Validation in Intel-TDX and AMD-SNP

From: Erdem Aktas <hidden>
Date: 2021-07-27 01:36:14
Also in: linux-mm

On Mon, Jul 26, 2021 at 4:54 PM Kirill A. Shutemov [off-list ref] wrote:
quoted
Is not the above code will accept the pages that are already accepted?
No. This code will get called for all UNACCEPTED ranges in EFI table.
If such memory is accepted it is a bug.
quoted
It is accepting the pages in the same 2MB region that is before start
and after end. We do not know what code/data is stored on those pages,
right? This might cause security issues depending on what is stored on
those pages.
As I told above, it only get called for unaccepted memory and nothing can
be stored there before the point.
Thanks Kirill! You are right, it looks like I messed up with
round_up/down in my mind. Thanks for the clarification.
Yes, because we constructed the bitmap this way. Non-2M-aligned chunks get
accepted when we accept upfront when we populate the bitmap.

See mark_unaccepted().

(mark_unaccepted() has few bugs that will be fixed in the next version)

Have you looked at what __accept_pages() does? It only accept unaccepted
pages, according to the bitmap.
Ahh, makes sense!
Thanks for the explanation and sorry for my confusion, Kirill!

-Erdem
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help