From: David Woodhouse <dwmw2@infradead.org>
To: xen-devel <xen-devel@lists.xenproject.org>
Cc: "Stefano Stabellini" <sstabellini@kernel.org>,
"Julien Grall" <julien@xen.org>, "Wei Liu" <wl@xen.org>,
"Andrew Cooper" <andrew.cooper3@citrix.com>,
"Ian Jackson" <ian.jackson@eu.citrix.com>,
"George Dunlap" <george.dunlap@citrix.com>,
"Xia, Hongyan" <hongyxia@amazon.com>,
"Jan Beulich" <jbeulich@suse.com>,
"Volodymyr Babchuk" <Volodymyr_Babchuk@epam.com>,
"Roger Pau Monné" <roger.pau@citrix.com>
Subject: [Xen-devel] [PATCH 0/2] Handle
Date: Thu, 19 Mar 2020 21:17:51 +0000 [thread overview]
Message-ID: <759b48cc361af1136e3cf1658f3dcb1d2937db9c.camel@infradead.org> (raw)
[-- Attachment #1.1: Type: text/plain, Size: 1366 bytes --]
There are cases where pages can get freed with free_heap_pages() when
in fact they were never properly initialised in the heap — they may
have been allocated from the boot allocator, simply assigned directly
to dom0 as part of its initrd, etc.
We have plans to make vmap available during early boot, which would
exacerbate this situation a tiny bit more, as a few more page tables
would stand a small chance of being allocated by the boot allocator and
freed later.
Resolve this by introducing a new page state, PGC_state_uninitialised,
expanding the PGC_state to 3 bits (8 possible values) by subsuming the
PGC_broken bit into it and eliminating the redundant possible
combinations of PGC_broken and various states.
Pages which find their way into free_heap_pages() while still in
PGC_state_uninitialised can thus be detected and properly
rehabilitated, basically by passing them through init_heap_pages().
David Woodhouse (2):
xen/mm: fold PGC_broken into PGC_state bits
xen/mm: Introduce PGC_state_uninitialised
xen/arch/x86/domctl.c | 2 +-
xen/arch/x86/mm.c | 3 +-
xen/common/page_alloc.c | 110 +++++++++++++++++++++++++++++------------------
xen/include/asm-arm/mm.h | 39 +++++++++++------
xen/include/asm-x86/mm.h | 37 +++++++++++-----
5 files changed, 125 insertions(+), 66 deletions(-)
[-- Attachment #1.2: smime.p7s --]
[-- Type: application/x-pkcs7-signature, Size: 5174 bytes --]
[-- Attachment #2: Type: text/plain, Size: 157 bytes --]
_______________________________________________
Xen-devel mailing list
Xen-devel@lists.xenproject.org
https://lists.xenproject.org/mailman/listinfo/xen-devel
next reply other threads:[~2020-03-19 21:18 UTC|newest]
Thread overview: 16+ messages / expand[flat|nested] mbox.gz Atom feed top
2020-03-19 21:17 David Woodhouse [this message]
2020-03-19 21:21 ` [Xen-devel] [PATCH 1/2] xen/mm: fold PGC_broken into PGC_state bits David Woodhouse
2020-03-19 21:21 ` [Xen-devel] [PATCH 2/2] xen/mm: Introduce PGC_state_uninitialised David Woodhouse
2020-03-20 13:33 ` Paul Durrant
2020-03-20 13:53 ` Jan Beulich
2020-03-20 15:17 ` David Woodhouse
2020-03-23 8:49 ` Paul Durrant
2020-03-23 10:45 ` David Woodhouse
2020-03-23 9:34 ` Julien Grall
2020-03-23 10:55 ` David Woodhouse
2020-03-24 10:08 ` Julien Grall
2020-03-24 17:55 ` David Woodhouse
2020-03-24 18:34 ` Julien Grall
2020-03-31 12:10 ` Jan Beulich
2020-03-20 13:17 ` [Xen-devel] [PATCH 1/2] xen/mm: fold PGC_broken into PGC_state bits Paul Durrant
2020-03-31 12:00 ` Jan Beulich
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-all 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=759b48cc361af1136e3cf1658f3dcb1d2937db9c.camel@infradead.org \
--to=dwmw2@infradead.org \
--cc=Volodymyr_Babchuk@epam.com \
--cc=andrew.cooper3@citrix.com \
--cc=george.dunlap@citrix.com \
--cc=hongyxia@amazon.com \
--cc=ian.jackson@eu.citrix.com \
--cc=jbeulich@suse.com \
--cc=julien@xen.org \
--cc=roger.pau@citrix.com \
--cc=sstabellini@kernel.org \
--cc=wl@xen.org \
--cc=xen-devel@lists.xenproject.org \
/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;
as well as URLs for NNTP newsgroup(s).