Xen Security Advisory 240 - Unlimited recursion in linear pagetable de-typing
-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA256
Xen Security Advisory XSA-240
version 3
Unlimited recursion in linear pagetable de-typing
UPDATES IN VERSION 3
====================
Re-base unstable patch to avoid it applying only with fuzz.
Public release.
ISSUE DESCRIPTION
=================
x86 PV guests are permitted to set up certain forms of what is often called "linear page tables", where pagetables contain references to other pagetables at the same level or higher. Certain restrictions apply in order to fit into Xen's page type handling system. An important restriction was missed, however: Stacking multiple layers of page tables of the same level on top of one another is not very useful, and the tearing down of such an arrangement involves recursion. With sufficiently many layers such recursion will result in a stack overflow, commonly resulting in Xen to crash.
IMPACT
======
A malicious or buggy PV guest may cause the hypervisor to crash, resulting in Denial of Service (DoS) affecting the entire host. Privilege escalation and information leaks cannot be excluded.
VULNERABLE SYSTEMS
==================
All Xen versions from at least 3.2 onwards are vulnerable. Earlier versions have not been checked.
Only x86 systems are affected. ARM systems are not affected.
Only x86 PV guests can leverage the vulnerability. x86 HVM guests cannot leverage the vulnerability.
MITIGATION
==========
Running only HVM guests will avoid this vulnerability.
For PV guests, the vulnerability can be avoided if the guest kernel is controlled by the host rather than guest administrator, provided that further steps are taken to prevent the guest administrator from loading code into the kernel (e.g. by disabling loadable modules etc) or from using other mechanisms which allow them to run code at kernel privilege.
CREDITS
=======
This issue was discovered by Jann Horn of Google Project Zero.
RESOLUTION
==========
Applying the appropriate attached patch series resolves this issue. The first patch fixes this known issue. The second patch in each series disables the linear pagetable option by default. It can be re-enabled by adding "pv-linear-pt=true' on the Xen command-line.
Note that neither Linux nor MiniOS use linear pagetables; NetBSD and Novell Netware, however, do use this feature when running in PV mode.
xsa240-unstable/*.patch xen-unstable xsa240-4.9/*.patch Xen 4.9.x xsa240-4.8/*.patch Xen 4.8.x xsa240-4.7/*.patch Xen 4.7.x xsa240-4.6/*.patch Xen 4.6.x xsa240-4.5/*.patch Xen 4.5.x
$ sha256sum xsa240* xsa240*/* 6ad3f6c7817496d11d846ac551d8b37fc73daf488eaa1cda614eb3b5a34f858d xsa240.meta e227126ea204d6049c8bfb694e3d2bcac10382733ca4ece1f0f7dc36c625ac1d xsa240-unstable/0001-x86-limit-linear-page-table-use-to-a-single-level.patch c6bb1f47754bf4f57bb9205509c525336ff55da8bcae8ae95415bdf1bba70209 xsa240-unstable/0002-x86-mm-Disable-PV-linear-pagetables-by-default.patch 2e8168449f8594c5faa50feb311eaa7e74b38c726853b1cfbaf2fbd4cbbdb476 xsa240-4.5/0001-x86-limit-linear-page-table-use-to-a-single-level.patch ea95ed56a5f85753a41ca1abbb4abd5ea791d7596c8a9d20ceaa53862ee5ce15 xsa240-4.5/0002-x86-mm-Disable-PV-linear-pagetables-by-default.patch f7556cc4a13cd4334d79e73861f15dd619dfd6041a3ad89865b358035d2fcff8 xsa240-4.6/0001-x86-limit-linear-page-table-use-to-a-single-level.patch 24ad9f92938c112a6fcf46177d44597c49dc213a3644ce4fd59d4df507b072d3 xsa240-4.6/0002-x86-mm-Disable-PV-linear-pagetables-by-default.patch 5a9b8e0a4e55482826e6cf820ea01fbf6674fecf19b101f4578396e3fa98a8fd xsa240-4.7/0001-x86-limit-linear-page-table-use-to-a-single-level.patch acf9744b853c1c6ac071bcf5776d8d9463781bbdf658c2fecc59ee338c094750 xsa240-4.7/0002-x86-mm-Disable-PV-linear-pagetables-by-default.patch c0c624f51fb1bd9e31a2c120343164d545ab6e709ed4bb9e5dd89b5c4c4e49f8 xsa240-4.8/0001-x86-limit-linear-page-table-use-to-a-single-level.patch 7e3c2c4a4d0ee0a29abaa7aceffbb774b1f92aa81dfa4c5d1c5c5156b6bb0a3a xsa240-4.8/0002-x86-mm-Disable-PV-linear-pagetables-by-default.patch 7769866805e47b7a2109ba1778f263ddfa126bcb0b116612f76dfaca9bf70995 xsa240-4.9/0001-x86-limit-linear-page-table-use-to-a-single-level.patch 1053cb348dc8536cb12b4aca556ddc4c015810f8f0fd21a80dff37433ec082ea xsa240-4.9/0002-x86-mm-Disable-PV-linear-pagetables-by-default.patch $
DEPLOYMENT DURING EMBARGO
=========================
Deployment of the patches and/or mitigations described above (or others which are substantially similar) is permitted during the embargo, even on public-facing systems with untrusted guest users and administrators.
But: Distribution of updated software is prohibited (except to other members of the predisclosure list).
Predisclosure list members who wish to deploy significantly different patches and/or mitigations, please contact the Xen Project Security Team.
(Note: this during-embargo deployment notice is retained in post-embargo publicly released Xen Project advisories, even though it is then no longer applicable. This is to enable the community to have oversight of the Xen Project Security Team's decisionmaking.)
For more information about permissible uses of embargoed information, consult the Xen Project community's agreed Security Policy:
http://www.xenproject.org/security-policy.html
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1
iQEcBAEBCAAGBQJZ31v9AAoJEIP+FMlX6CvZl68H/1aUvsdHsmJ00m6xF5EDDe6e FwInBpu0p6NOr0Shy6MUPYLf8iWSR7UK92HVNC3FDidkGwP9n6qRLYQQJWtNGGPt c+7/uqM9vj9J10BwUrseZQoNXWQ3AZSOc9yCHgzxPMCne5JAkD/cZda6ABwpTq8d 5X8QsgaXbKjfj988izYnqP9049os8VKoN6AR1TUt4keSheSElYO+T416Ky3b+c2V WhxGPWGZY0fFaAYLKfpTWIDU9G6ZIJ9ZMN7yXjAR+hN1pezb7afDT/sT39bjp9wy pPcOxMmvAn7F2w2WcCNJ8TKmNL9VPl9TjlnY8LrHhxqpwWmMeFZoc3q8czXfjBA= =rL4e
-----END PGP SIGNATURE-----
From 284135d10dc42543997a4e3681ef4857b5718555 Mon Sep 17 00:00:00 2001
From: Jan Beulich <[email protected]>
Date: Wed, 27 Sep 2017 11:46:52 +0100
Subject: [PATCH 1/2] x86: limit linear page table use to a single level
That's the only way that they're meant to be used. Without such a restriction arbitrarily long chains of same-level page tables can be built, tearing down of which may then cause arbitrarily deep recursion, causing a stack overflow. To facilitate this restriction, a counter is being introduced to track both the number of same-level entries in a page table as well as the number of uses of a page table in another same-level one (counting into positive and negative direction respectively, utilizing the fact that both counts can't be non-zero at the same time).
Note that the added accounting introduces a restriction on the number of times a page can be used in other same-level page tables - more than 32k of such uses are no longer possible.
Note also that some put_page_and_type[_preemptible]() calls are replaced with open-coded equivalents. This seemed preferrable to adding "parent_table" to the matrix of functions.
Note further that cross-domain same-level page table references are no longer permitted (they probably never should have been).
This is XSA-240.
---
v5: Correct placement of code addition to _put_final_page_type().
v4: Introduce and use PGT_type_equal().
v3: Add BUILD_BUG_ON()s.
v2: Fix assertions in dec_linear_*() triggering during guest shutdown
when same-level page table references still exist. Disallow cross- domain same-level page table references.
--- xen/arch/x86/domain.c | 1 + xen/arch/x86/mm.c | 172 +++++++++++++++++++++++++++++++++++++++---- xen/include/asm-x86/domain.h | 2 + xen/include/asm-x86/mm.h | 25 +++++-- 4 files changed, 177 insertions(+), 23 deletions(-)
xen/arch/x86/domain.c +1 -0
@@ -1091,6 +1091,7 @@ int arch_set_info_guest( rc = -ERESTART ;/* Fallthrough */ case -ERESTART : + v->arch.old_guest_ptpg =NULL ; v->arch.old_guest_table =pagetable_get_page (v->arch.guest_table); v->arch.guest_table =pagetable_null ();
xen/arch/x86/mm.c +156 -16
350 lines not on this page · raw message
xen/include/asm-x86/domain.h +2 -0
@@ -531,6 +531,8 @@ struct arch_vcpupagetable_t guest_table_user;/* (MFN) x86/64 user-space pagetable */ pagetable_t guest_table;/* (MFN) guest notion of cr3 */ struct page_info *old_guest_table;/* partially destructed pagetable */ +struct page_info *old_guest_ptpg;/* containing page table of the */ +/* former, if any */ /* guest_table holds a ref to the page, and also a type-count unless * shadow refcounts are in use */ pagetable_t shadow_table[4 ];/* (MFN) shadow(s) of guest */
xen/include/asm-x86/mm.h +18 -7
@@ -141,11 +141,11 @@ struct page_infou32 tlbflush_timestamp;/* -* When PGT_partial is true then this field is valid and indicates -* that PTEs in the range [0, @nr_validated_ptes) have been validated. -* An extra page reference must be acquired (or not dropped) whenever -* PGT_partial gets set, and it must be dropped when the flag gets -* cleared. This is so that a get() leaving a page in partially +* When PGT_partial is true then the first two fields are valid and +* indicate that PTEs in the range [0, @nr_validated_ptes) have been +* validated. An extra page reference must be acquired (or not dropped) +* whenever PGT_partial gets set, and it must be dropped when the flag +* gets cleared. This is so that a get() leaving a page in partially * validated state (where the caller would drop the reference acquired * due to the getting of the type [apparently] failing [-ERESTART]) * would not accidentally result in a page left with zero general
@@ -169,10 +169,18 @@ struct page_info* put_page_from_lNe() (due to the apparent failure), and hence it * must be dropped when the put operation is resumed (and completes), * but it must not be acquired if picking up the page for validation. +* +* The 3rd field, @linear_pt_count, indicates +* - by a positive value, how many same-level page table entries a page +* table has, +* - by a negative value, in how many same-level page tables a page is +* in use. */ struct { -u16 nr_validated_ptes; -s8 partial_pte; +u16 nr_validated_ptes:PAGETABLE_ORDER +1 ; + u16 :16 - PAGETABLE_ORDER - 1 - 2; +s16 partial_pte:2 ; +s16 linear_pt_count; };/*
@@ -223,6 +231,9 @@ struct page_info#define PGT_count_width PG_shift(8)#define PGT_count_mask ((1UL<<PGT_count_width)-1) +/* Are the 'type mask' bits identical? */ +#define PGT_type_equal (x, y) (!(((x) ^ (y)) & PGT_type_mask)) +/* Cleared when the owning guest 'frees' this page. */ #define _PGC_allocated PG_shift(1)#define PGC_allocated PG_mask(1, 1)
Signature · 1 line
2.14.1
From 90c648b4fd3aa4f85ca51dda693b16f28605860b Mon Sep 17 00:00:00 2001
From: George Dunlap <[email protected]>
Date: Fri, 22 Sep 2017 11:46:55 +0100
Subject: [PATCH 2/2] x86/mm: Disable PV linear pagetables by default
Allowing pagetables to point to other pagetables of the same level (often called 'linear pagetables') has been included in Xen since its inception. But it is not used by the most common PV guests (Linux, NetBSD, minios), and has been the source of a number of subtle reference-counting bugs.
Add a command-line option to control whether PV linear pagetables are allowed (disabled by default).
---
Changes since v2:
- s/_/-/; in command-line option
- Added __read_mostly
--- docs/misc/xen-command-line.markdown | 15 +++++++++++++++ xen/arch/x86/mm.c | 10 ++++++++++ 2 files changed, 25 insertions(+)
docs/misc/xen-command-line.markdown +15 -0
@@ -1422,6 +1422,21 @@ The following resources are available: CDP, one COS will corespond two CBMs other than one with CAT, due to the sum of CBMs is fixed, that means actual `cos_max` in use will automatically reduce to half when CDP is enabled. + +### pv-linear-pt +> `= <boolean>` + +> Default: `false` + +Allow PV guests to have pagetable entries pointing to other pagetables +of the same level (i.e., allowing L2 PTEs to point to other L2 pages). +This technique is often called "linear pagetables", and is sometimes +used to allow operating systems a simple way to consistently map the +current process's pagetables into its own virtual address space. + +None of the most common PV operating systems (Linux, NetBSD, MiniOS) +use this technique, but there may be custom operating systems which +do. ### rcu-idle-timer-period-ms > `= <integer>`
xen/arch/x86/mm.c +10 -0
@@ -654,6 +654,9 @@ static void dec_linear_uses(struct page_info *pg)* frame if it is mapped by a different root table. This is sufficient and * also necessary to allow validation of a root table mapping itself. */ +static bool __read_mostly pv_linear_pt_enable = false; +boolean_param ("pv-linear-pt" , pv_linear_pt_enable); +#define define_get_linear_pagetable (level) \ static int \ get_##level##_linear_pagetable( \
@@ -663,6 +666,13 @@ get_##level##_linear_pagetable( \struct page_info *page; \unsigned long pfn; \ \ +if ( !pv_linear_pt_enable ) \ + { \ +gdprintk (XENLOG_WARNING , \ +"Attempt to create linear p.t. (feature disabled)\n" ); \ +return 0 ; \ + } \ + \ if ( (level##e_get_flags(pde) & _PAGE_RW) ) \ { \ gdprintk(XENLOG_WARNING, \
Signature · 1 line
2.14.1
From 78a763b94feed5f726e8dfe953fd84ef6bc1becb Mon Sep 17 00:00:00 2001
From: Jan Beulich <[email protected]>
Date: Thu, 28 Sep 2017 15:17:29 +0100
Subject: [PATCH 1/2] x86: limit linear page table use to a single level
That's the only way that they're meant to be used. Without such a restriction arbitrarily long chains of same-level page tables can be built, tearing down of which may then cause arbitrarily deep recursion, causing a stack overflow. To facilitate this restriction, a counter is being introduced to track both the number of same-level entries in a page table as well as the number of uses of a page table in another same-level one (counting into positive and negative direction respectively, utilizing the fact that both counts can't be non-zero at the same time).
Note that the added accounting introduces a restriction on the number of times a page can be used in other same-level page tables - more than 32k of such uses are no longer possible.
Note also that some put_page_and_type[_preemptible]() calls are replaced with open-coded equivalents. This seemed preferrable to adding "parent_table" to the matrix of functions.
Note further that cross-domain same-level page table references are no longer permitted (they probably never should have been).
This is XSA-240.
--- xen/arch/x86/domain.c | 1 + xen/arch/x86/mm.c | 171 ++++++++++++++++++++++++++++++++++++++----- xen/include/asm-x86/domain.h | 2 + xen/include/asm-x86/mm.h | 25 +++++-- xen/include/asm-x86/system.h | 46 ++++++++++++ 5 files changed, 221 insertions(+), 24 deletions(-)
xen/arch/x86/domain.c +1 -0
@@ -1031,6 +1031,7 @@ int arch_set_info_guest(case -EINTR : rc = -ERESTART ;case -ERESTART : + v->arch.old_guest_ptpg =NULL ; v->arch.old_guest_table =pagetable_get_page (v->arch.guest_table); v->arch.guest_table =pagetable_null ();
xen/arch/x86/mm.c +154 -17
351 lines not on this page · raw message
xen/include/asm-x86/domain.h +2 -0
@@ -453,6 +453,8 @@ struct arch_vcpupagetable_t guest_table_user;/* (MFN) x86/64 user-space pagetable */ pagetable_t guest_table;/* (MFN) guest notion of cr3 */ struct page_info *old_guest_table;/* partially destructed pagetable */ +struct page_info *old_guest_ptpg;/* containing page table of the */ +/* former, if any */ /* guest_table holds a ref to the page, and also a type-count unless * shadow refcounts are in use */ pagetable_t shadow_table[4 ];/* (MFN) shadow(s) of guest */
xen/include/asm-x86/mm.h +18 -7
@@ -119,11 +119,11 @@ struct page_infou32 tlbflush_timestamp;/* -* When PGT_partial is true then this field is valid and indicates -* that PTEs in the range [0, @nr_validated_ptes) have been validated. -* An extra page reference must be acquired (or not dropped) whenever -* PGT_partial gets set, and it must be dropped when the flag gets -* cleared. This is so that a get() leaving a page in partially +* When PGT_partial is true then the first two fields are valid and +* indicate that PTEs in the range [0, @nr_validated_ptes) have been +* validated. An extra page reference must be acquired (or not dropped) +* whenever PGT_partial gets set, and it must be dropped when the flag +* gets cleared. This is so that a get() leaving a page in partially * validated state (where the caller would drop the reference acquired * due to the getting of the type [apparently] failing [-ERESTART]) * would not accidentally result in a page left with zero general
@@ -147,10 +147,18 @@ struct page_info* put_page_from_lNe() (due to the apparent failure), and hence it * must be dropped when the put operation is resumed (and completes), * but it must not be acquired if picking up the page for validation. +* +* The 3rd field, @linear_pt_count, indicates +* - by a positive value, how many same-level page table entries a page +* table has, +* - by a negative value, in how many same-level page tables a page is +* in use. */ struct { -u16 nr_validated_ptes; -s8 partial_pte; +u16 nr_validated_ptes:PAGETABLE_ORDER +1 ; + u16 :16 - PAGETABLE_ORDER - 1 - 2; +s16 partial_pte:2 ; +s16 linear_pt_count; };/*
@@ -201,6 +209,9 @@ struct page_info#define PGT_count_width PG_shift(9)#define PGT_count_mask ((1UL<<PGT_count_width)-1) +/* Are the 'type mask' bits identical? */ +#define PGT_type_equal (x, y) (!(((x) ^ (y)) & PGT_type_mask)) +/* Cleared when the owning guest 'frees' this page. */ #define _PGC_allocated PG_shift(1)#define PGC_allocated PG_mask(1, 1)
xen/include/asm-x86/system.h +46 -0
52 lines not on this page · raw message
Signature · 1 line
2.14.1
From 7444f8a6c1a8df082c23a0c1acc542defcffc0ad Mon Sep 17 00:00:00 2001
From: George Dunlap <[email protected]>
Date: Fri, 22 Sep 2017 11:46:55 +0100
Subject: [PATCH 2/2] x86/mm: Disable PV linear pagetables by default
Allowing pagetables to point to other pagetables of the same level (often called 'linear pagetables') has been included in Xen since its inception. But it is not used by the most common PV guests (Linux, NetBSD, minios), and has been the source of a number of subtle reference-counting bugs.
Add a command-line option to control whether PV linear pagetables are allowed (disabled by default).
---
Changes since v2:
- s/_/-/; in command-line option
- Added __read_mostly
--- docs/misc/xen-command-line.markdown | 15 +++++++++++++++ xen/arch/x86/mm.c | 9 +++++++++ 2 files changed, 24 insertions(+)
docs/misc/xen-command-line.markdown +15 -0
@@ -1137,6 +1137,21 @@ The following resources are available: L3 cache occupancy. * `cmt` instructs Xen to enable/disable Cache Monitoring Technology. * `rmid_max` indicates the max value for rmid. + +### pv-linear-pt +> `= <boolean>` + +> Default: `false` + +Allow PV guests to have pagetable entries pointing to other pagetables +of the same level (i.e., allowing L2 PTEs to point to other L2 pages). +This technique is often called "linear pagetables", and is sometimes +used to allow operating systems a simple way to consistently map the +current process's pagetables into its own virtual address space. + +None of the most common PV operating systems (Linux, NetBSD, MiniOS) +use this technique, but there may be custom operating systems which +do. ### reboot > `= t[riple] | k[bd] | a[cpi] | p[ci] | e[fi] | n[o] [, [w]arm | [c]old]`
xen/arch/x86/mm.c +9 -0
@@ -734,6 +734,9 @@ static void dec_linear_uses(struct page_info *pg)* frame if it is mapped by a different root table. This is sufficient and * also necessary to allow validation of a root table mapping itself. */ +static bool_t __read_mostly pv_linear_pt_enable =0 ; +boolean_param ("pv-linear-pt" , pv_linear_pt_enable); +#define define_get_linear_pagetable (level) \ static int \ get_##level##_linear_pagetable( \
@@ -743,6 +746,12 @@ get_##level##_linear_pagetable( \struct page_info *page; \unsigned long pfn; \ \ +if ( !pv_linear_pt_enable ) \ + { \ +MEM_LOG ("Attempt to create linear p.t. (feature disabled)" ); \ +return 0 ; \ + } \ + \ if ( (level##e_get_flags(pde) & _PAGE_RW) ) \ { \MEM_LOG ("Attempt to create linear p.t. with write perms" ); \
Signature · 1 line
2.14.1
From ce31198dd811479da34dfb66315f399dc4b98055 Mon Sep 17 00:00:00 2001
From: Jan Beulich <[email protected]>
Date: Thu, 28 Sep 2017 15:17:28 +0100
Subject: [PATCH 1/2] x86: limit linear page table use to a single level
That's the only way that they're meant to be used. Without such a restriction arbitrarily long chains of same-level page tables can be built, tearing down of which may then cause arbitrarily deep recursion, causing a stack overflow. To facilitate this restriction, a counter is being introduced to track both the number of same-level entries in a page table as well as the number of uses of a page table in another same-level one (counting into positive and negative direction respectively, utilizing the fact that both counts can't be non-zero at the same time).
Note that the added accounting introduces a restriction on the number of times a page can be used in other same-level page tables - more than 32k of such uses are no longer possible.
Note also that some put_page_and_type[_preemptible]() calls are replaced with open-coded equivalents. This seemed preferrable to adding "parent_table" to the matrix of functions.
Note further that cross-domain same-level page table references are no longer permitted (they probably never should have been).
This is XSA-240.
--- xen/arch/x86/domain.c | 1 + xen/arch/x86/mm.c | 171 ++++++++++++++++++++++++++++++++++++++----- xen/include/asm-x86/domain.h | 2 + xen/include/asm-x86/mm.h | 25 +++++-- 4 files changed, 175 insertions(+), 24 deletions(-)
xen/arch/x86/domain.c +1 -0
@@ -1131,6 +1131,7 @@ int arch_set_info_guest(case -EINTR : rc = -ERESTART ;case -ERESTART : + v->arch.old_guest_ptpg =NULL ; v->arch.old_guest_table =pagetable_get_page (v->arch.guest_table); v->arch.guest_table =pagetable_null ();
xen/arch/x86/mm.c +154 -17
351 lines not on this page · raw message
xen/include/asm-x86/domain.h +2 -0
@@ -512,6 +512,8 @@ struct arch_vcpupagetable_t guest_table_user;/* (MFN) x86/64 user-space pagetable */ pagetable_t guest_table;/* (MFN) guest notion of cr3 */ struct page_info *old_guest_table;/* partially destructed pagetable */ +struct page_info *old_guest_ptpg;/* containing page table of the */ +/* former, if any */ /* guest_table holds a ref to the page, and also a type-count unless * shadow refcounts are in use */ pagetable_t shadow_table[4 ];/* (MFN) shadow(s) of guest */
xen/include/asm-x86/mm.h +18 -7
@@ -124,11 +124,11 @@ struct page_infou32 tlbflush_timestamp;/* -* When PGT_partial is true then this field is valid and indicates -* that PTEs in the range [0, @nr_validated_ptes) have been validated. -* An extra page reference must be acquired (or not dropped) whenever -* PGT_partial gets set, and it must be dropped when the flag gets -* cleared. This is so that a get() leaving a page in partially +* When PGT_partial is true then the first two fields are valid and +* indicate that PTEs in the range [0, @nr_validated_ptes) have been +* validated. An extra page reference must be acquired (or not dropped) +* whenever PGT_partial gets set, and it must be dropped when the flag +* gets cleared. This is so that a get() leaving a page in partially * validated state (where the caller would drop the reference acquired * due to the getting of the type [apparently] failing [-ERESTART]) * would not accidentally result in a page left with zero general
@@ -152,10 +152,18 @@ struct page_info* put_page_from_lNe() (due to the apparent failure), and hence it * must be dropped when the put operation is resumed (and completes), * but it must not be acquired if picking up the page for validation. +* +* The 3rd field, @linear_pt_count, indicates +* - by a positive value, how many same-level page table entries a page +* table has, +* - by a negative value, in how many same-level page tables a page is +* in use. */ struct { -u16 nr_validated_ptes; -s8 partial_pte; +u16 nr_validated_ptes:PAGETABLE_ORDER +1 ; + u16 :16 - PAGETABLE_ORDER - 1 - 2; +s16 partial_pte:2 ; +s16 linear_pt_count; };/*
@@ -206,6 +214,9 @@ struct page_info#define PGT_count_width PG_shift(9)#define PGT_count_mask ((1UL<<PGT_count_width)-1) +/* Are the 'type mask' bits identical? */ +#define PGT_type_equal (x, y) (!(((x) ^ (y)) & PGT_type_mask)) +/* Cleared when the owning guest 'frees' this page. */ #define _PGC_allocated PG_shift(1)#define PGC_allocated PG_mask(1, 1)
Signature · 1 line
2.14.1
From eeea00c427376c269ffa34587f16fa1182d8c29d Mon Sep 17 00:00:00 2001
From: George Dunlap <[email protected]>
Date: Fri, 22 Sep 2017 11:46:55 +0100
Subject: [PATCH 2/2] x86/mm: Disable PV linear pagetables by default
Allowing pagetables to point to other pagetables of the same level (often called 'linear pagetables') has been included in Xen since its inception. But it is not used by the most common PV guests (Linux, NetBSD, minios), and has been the source of a number of subtle reference-counting bugs.
Add a command-line option to control whether PV linear pagetables are allowed (disabled by default).
---
Changes since v2:
- s/_/-/; in command-line option
- Added __read_mostly
--- docs/misc/xen-command-line.markdown | 15 +++++++++++++++ xen/arch/x86/mm.c | 9 +++++++++ 2 files changed, 24 insertions(+)
docs/misc/xen-command-line.markdown +15 -0
@@ -1231,6 +1231,21 @@ The following resources are available: the cache allocation. * `cat` instructs Xen to enable/disable Cache Allocation Technology. * `cos_max` indicates the max value for COS ID. + +### pv-linear-pt +> `= <boolean>` + +> Default: `false` + +Allow PV guests to have pagetable entries pointing to other pagetables +of the same level (i.e., allowing L2 PTEs to point to other L2 pages). +This technique is often called "linear pagetables", and is sometimes +used to allow operating systems a simple way to consistently map the +current process's pagetables into its own virtual address space. + +None of the most common PV operating systems (Linux, NetBSD, MiniOS) +use this technique, but there may be custom operating systems which +do. ### reboot > `= t[riple] | k[bd] | a[cpi] | p[ci] | P[ower] | e[fi] | n[o] [, [w]arm | [c]old]`
xen/arch/x86/mm.c +9 -0
@@ -727,6 +727,9 @@ static void dec_linear_uses(struct page_info *pg)* frame if it is mapped by a different root table. This is sufficient and * also necessary to allow validation of a root table mapping itself. */ +static bool_t __read_mostly pv_linear_pt_enable =0 ; +boolean_param ("pv-linear-pt" , pv_linear_pt_enable); +#define define_get_linear_pagetable (level) \ static int \ get_##level##_linear_pagetable( \
@@ -736,6 +739,12 @@ get_##level##_linear_pagetable( \struct page_info *page; \unsigned long pfn; \ \ +if ( !pv_linear_pt_enable ) \ + { \ +MEM_LOG ("Attempt to create linear p.t. (feature disabled)" ); \ +return 0 ; \ + } \ + \ if ( (level##e_get_flags(pde) & _PAGE_RW) ) \ { \MEM_LOG ("Attempt to create linear p.t. with write perms" ); \
Signature · 1 line
2.14.1
From ea7513a3e3f28cfec59dda6e128b6b4968685762 Mon Sep 17 00:00:00 2001
From: Jan Beulich <[email protected]>
Date: Thu, 28 Sep 2017 15:17:27 +0100
Subject: [PATCH 1/2] x86: limit linear page table use to a single level
That's the only way that they're meant to be used. Without such a restriction arbitrarily long chains of same-level page tables can be built, tearing down of which may then cause arbitrarily deep recursion, causing a stack overflow. To facilitate this restriction, a counter is being introduced to track both the number of same-level entries in a page table as well as the number of uses of a page table in another same-level one (counting into positive and negative direction respectively, utilizing the fact that both counts can't be non-zero at the same time).
Note that the added accounting introduces a restriction on the number of times a page can be used in other same-level page tables - more than 32k of such uses are no longer possible.
Note also that some put_page_and_type[_preemptible]() calls are replaced with open-coded equivalents. This seemed preferrable to adding "parent_table" to the matrix of functions.
Note further that cross-domain same-level page table references are no longer permitted (they probably never should have been).
This is XSA-240.
--- xen/arch/x86/domain.c | 1 + xen/arch/x86/mm.c | 171 ++++++++++++++++++++++++++++++++++++++----- xen/include/asm-x86/domain.h | 2 + xen/include/asm-x86/mm.h | 25 +++++-- 4 files changed, 175 insertions(+), 24 deletions(-)
xen/arch/x86/domain.c +1 -0
@@ -1237,6 +1237,7 @@ int arch_set_info_guest(case -EINTR : rc = -ERESTART ;case -ERESTART : + v->arch.old_guest_ptpg =NULL ; v->arch.old_guest_table =pagetable_get_page (v->arch.guest_table); v->arch.guest_table =pagetable_null ();
xen/arch/x86/mm.c +154 -17
351 lines not on this page · raw message
xen/include/asm-x86/domain.h +2 -0
@@ -529,6 +529,8 @@ struct arch_vcpupagetable_t guest_table_user;/* (MFN) x86/64 user-space pagetable */ pagetable_t guest_table;/* (MFN) guest notion of cr3 */ struct page_info *old_guest_table;/* partially destructed pagetable */ +struct page_info *old_guest_ptpg;/* containing page table of the */ +/* former, if any */ /* guest_table holds a ref to the page, and also a type-count unless * shadow refcounts are in use */ pagetable_t shadow_table[4 ];/* (MFN) shadow(s) of guest */
xen/include/asm-x86/mm.h +18 -7
@@ -125,11 +125,11 @@ struct page_infou32 tlbflush_timestamp;/* -* When PGT_partial is true then this field is valid and indicates -* that PTEs in the range [0, @nr_validated_ptes) have been validated. -* An extra page reference must be acquired (or not dropped) whenever -* PGT_partial gets set, and it must be dropped when the flag gets -* cleared. This is so that a get() leaving a page in partially +* When PGT_partial is true then the first two fields are valid and +* indicate that PTEs in the range [0, @nr_validated_ptes) have been +* validated. An extra page reference must be acquired (or not dropped) +* whenever PGT_partial gets set, and it must be dropped when the flag +* gets cleared. This is so that a get() leaving a page in partially * validated state (where the caller would drop the reference acquired * due to the getting of the type [apparently] failing [-ERESTART]) * would not accidentally result in a page left with zero general
@@ -153,10 +153,18 @@ struct page_info* put_page_from_lNe() (due to the apparent failure), and hence it * must be dropped when the put operation is resumed (and completes), * but it must not be acquired if picking up the page for validation. +* +* The 3rd field, @linear_pt_count, indicates +* - by a positive value, how many same-level page table entries a page +* table has, +* - by a negative value, in how many same-level page tables a page is +* in use. */ struct { -u16 nr_validated_ptes; -s8 partial_pte; +u16 nr_validated_ptes:PAGETABLE_ORDER +1 ; + u16 :16 - PAGETABLE_ORDER - 1 - 2; +s16 partial_pte:2 ; +s16 linear_pt_count; };/*
@@ -207,6 +215,9 @@ struct page_info#define PGT_count_width PG_shift(9)#define PGT_count_mask ((1UL<<PGT_count_width)-1) +/* Are the 'type mask' bits identical? */ +#define PGT_type_equal (x, y) (!(((x) ^ (y)) & PGT_type_mask)) +/* Cleared when the owning guest 'frees' this page. */ #define _PGC_allocated PG_shift(1)#define PGC_allocated PG_mask(1, 1)
Signature · 1 line
2.14.1
From 9a4b34729f1bb92eea1e1efe52e6face9f0b17ae Mon Sep 17 00:00:00 2001
From: George Dunlap <[email protected]>
Date: Fri, 22 Sep 2017 11:46:55 +0100
Subject: [PATCH 2/2] x86/mm: Disable PV linear pagetables by default
Allowing pagetables to point to other pagetables of the same level (often called 'linear pagetables') has been included in Xen since its inception. But it is not used by the most common PV guests (Linux, NetBSD, minios), and has been the source of a number of subtle reference-counting bugs.
Add a command-line option to control whether PV linear pagetables are allowed (disabled by default).
---
Changes since v2:
- s/_/-/; in command-line option
- Added __read_mostly
--- docs/misc/xen-command-line.markdown | 15 +++++++++++++++ xen/arch/x86/mm.c | 9 +++++++++ 2 files changed, 24 insertions(+)
docs/misc/xen-command-line.markdown +15 -0
@@ -1280,6 +1280,21 @@ The following resources are available: CDP, one COS will corespond two CBMs other than one with CAT, due to the sum of CBMs is fixed, that means actual `cos_max` in use will automatically reduce to half when CDP is enabled. + +### pv-linear-pt +> `= <boolean>` + +> Default: `false` + +Allow PV guests to have pagetable entries pointing to other pagetables +of the same level (i.e., allowing L2 PTEs to point to other L2 pages). +This technique is often called "linear pagetables", and is sometimes +used to allow operating systems a simple way to consistently map the +current process's pagetables into its own virtual address space. + +None of the most common PV operating systems (Linux, NetBSD, MiniOS) +use this technique, but there may be custom operating systems which +do. ### reboot > `= t[riple] | k[bd] | a[cpi] | p[ci] | P[ower] | e[fi] | n[o] [, [w]arm | [c]old]`
xen/arch/x86/mm.c +9 -0
@@ -799,6 +799,9 @@ static void dec_linear_uses(struct page_info *pg)* frame if it is mapped by a different root table. This is sufficient and * also necessary to allow validation of a root table mapping itself. */ +static bool_t __read_mostly pv_linear_pt_enable =0 ; +boolean_param ("pv-linear-pt" , pv_linear_pt_enable); +#define define_get_linear_pagetable (level) \ static int \ get_##level##_linear_pagetable( \
@@ -808,6 +811,12 @@ get_##level##_linear_pagetable( \struct page_info *page; \unsigned long pfn; \ \ +if ( !pv_linear_pt_enable ) \ + { \ +MEM_LOG ("Attempt to create linear p.t. (feature disabled)" ); \ +return 0 ; \ + } \ + \ if ( (level##e_get_flags(pde) & _PAGE_RW) ) \ { \MEM_LOG ("Attempt to create linear p.t. with write perms" ); \
Signature · 1 line
2.14.1
From 2315b8c651e0cc31c9153d09c9912b8fbe632ad2 Mon Sep 17 00:00:00 2001
From: Jan Beulich <[email protected]>
Date: Thu, 28 Sep 2017 15:17:25 +0100
Subject: [PATCH 1/2] x86: limit linear page table use to a single level
That's the only way that they're meant to be used. Without such a restriction arbitrarily long chains of same-level page tables can be built, tearing down of which may then cause arbitrarily deep recursion, causing a stack overflow. To facilitate this restriction, a counter is being introduced to track both the number of same-level entries in a page table as well as the number of uses of a page table in another same-level one (counting into positive and negative direction respectively, utilizing the fact that both counts can't be non-zero at the same time).
Note that the added accounting introduces a restriction on the number of times a page can be used in other same-level page tables - more than 32k of such uses are no longer possible.
Note also that some put_page_and_type[_preemptible]() calls are replaced with open-coded equivalents. This seemed preferrable to adding "parent_table" to the matrix of functions.
Note further that cross-domain same-level page table references are no longer permitted (they probably never should have been).
This is XSA-240.
--- xen/arch/x86/domain.c | 1 + xen/arch/x86/mm.c | 171 ++++++++++++++++++++++++++++++++++++++----- xen/include/asm-x86/domain.h | 2 + xen/include/asm-x86/mm.h | 25 +++++-- 4 files changed, 175 insertions(+), 24 deletions(-)
xen/arch/x86/domain.c +1 -0
@@ -1245,6 +1245,7 @@ int arch_set_info_guest( rc = -ERESTART ;/* Fallthrough */ case -ERESTART : + v->arch.old_guest_ptpg =NULL ; v->arch.old_guest_table =pagetable_get_page (v->arch.guest_table); v->arch.guest_table =pagetable_null ();
xen/arch/x86/mm.c +154 -17
351 lines not on this page · raw message
xen/include/asm-x86/domain.h +2 -0
@@ -531,6 +531,8 @@ struct arch_vcpupagetable_t guest_table_user;/* (MFN) x86/64 user-space pagetable */ pagetable_t guest_table;/* (MFN) guest notion of cr3 */ struct page_info *old_guest_table;/* partially destructed pagetable */ +struct page_info *old_guest_ptpg;/* containing page table of the */ +/* former, if any */ /* guest_table holds a ref to the page, and also a type-count unless * shadow refcounts are in use */ pagetable_t shadow_table[4 ];/* (MFN) shadow(s) of guest */
xen/include/asm-x86/mm.h +18 -7
@@ -125,11 +125,11 @@ struct page_infou32 tlbflush_timestamp;/* -* When PGT_partial is true then this field is valid and indicates -* that PTEs in the range [0, @nr_validated_ptes) have been validated. -* An extra page reference must be acquired (or not dropped) whenever -* PGT_partial gets set, and it must be dropped when the flag gets -* cleared. This is so that a get() leaving a page in partially +* When PGT_partial is true then the first two fields are valid and +* indicate that PTEs in the range [0, @nr_validated_ptes) have been +* validated. An extra page reference must be acquired (or not dropped) +* whenever PGT_partial gets set, and it must be dropped when the flag +* gets cleared. This is so that a get() leaving a page in partially * validated state (where the caller would drop the reference acquired * due to the getting of the type [apparently] failing [-ERESTART]) * would not accidentally result in a page left with zero general
@@ -153,10 +153,18 @@ struct page_info* put_page_from_lNe() (due to the apparent failure), and hence it * must be dropped when the put operation is resumed (and completes), * but it must not be acquired if picking up the page for validation. +* +* The 3rd field, @linear_pt_count, indicates +* - by a positive value, how many same-level page table entries a page +* table has, +* - by a negative value, in how many same-level page tables a page is +* in use. */ struct { -u16 nr_validated_ptes; -s8 partial_pte; +u16 nr_validated_ptes:PAGETABLE_ORDER +1 ; + u16 :16 - PAGETABLE_ORDER - 1 - 2; +s16 partial_pte:2 ; +s16 linear_pt_count; };/*
@@ -207,6 +215,9 @@ struct page_info#define PGT_count_width PG_shift(9)#define PGT_count_mask ((1UL<<PGT_count_width)-1) +/* Are the 'type mask' bits identical? */ +#define PGT_type_equal (x, y) (!(((x) ^ (y)) & PGT_type_mask)) +/* Cleared when the owning guest 'frees' this page. */ #define _PGC_allocated PG_shift(1)#define PGC_allocated PG_mask(1, 1)
Signature · 1 line
2.14.1
From 41d579aad2fee971e5ce0279a9b559a0fdc74452 Mon Sep 17 00:00:00 2001
From: George Dunlap <[email protected]>
Date: Fri, 22 Sep 2017 11:46:55 +0100
Subject: [PATCH 2/2] x86/mm: Disable PV linear pagetables by default
Allowing pagetables to point to other pagetables of the same level (often called 'linear pagetables') has been included in Xen since its inception. But it is not used by the most common PV guests (Linux, NetBSD, minios), and has been the source of a number of subtle reference-counting bugs.
Add a command-line option to control whether PV linear pagetables are allowed (disabled by default).
---
Changes since v2:
- s/_/-/; in command-line option
- Added __read_mostly
--- docs/misc/xen-command-line.markdown | 15 +++++++++++++++ xen/arch/x86/mm.c | 9 +++++++++ 2 files changed, 24 insertions(+)
docs/misc/xen-command-line.markdown +15 -0
@@ -1350,6 +1350,21 @@ The following resources are available: CDP, one COS will corespond two CBMs other than one with CAT, due to the sum of CBMs is fixed, that means actual `cos_max` in use will automatically reduce to half when CDP is enabled. + +### pv-linear-pt +> `= <boolean>` + +> Default: `false` + +Allow PV guests to have pagetable entries pointing to other pagetables +of the same level (i.e., allowing L2 PTEs to point to other L2 pages). +This technique is often called "linear pagetables", and is sometimes +used to allow operating systems a simple way to consistently map the +current process's pagetables into its own virtual address space. + +None of the most common PV operating systems (Linux, NetBSD, MiniOS) +use this technique, but there may be custom operating systems which +do. ### reboot > `= t[riple] | k[bd] | a[cpi] | p[ci] | P[ower] | e[fi] | n[o] [, [w]arm | [c]old]`
xen/arch/x86/mm.c +9 -0
@@ -800,6 +800,9 @@ static void dec_linear_uses(struct page_info *pg)* frame if it is mapped by a different root table. This is sufficient and * also necessary to allow validation of a root table mapping itself. */ +static bool __read_mostly pv_linear_pt_enable = false; +boolean_param ("pv-linear-pt" , pv_linear_pt_enable); +#define define_get_linear_pagetable (level) \ static int \ get_##level##_linear_pagetable( \
@@ -809,6 +812,12 @@ get_##level##_linear_pagetable( \struct page_info *page; \unsigned long pfn; \ \ +if ( !pv_linear_pt_enable ) \ + { \ +MEM_LOG ("Attempt to create linear p.t. (feature disabled)" ); \ +return 0 ; \ + } \ + \ if ( (level##e_get_flags(pde) & _PAGE_RW) ) \ { \MEM_LOG ("Attempt to create linear p.t. with write perms" ); \
Signature · 1 line
2.14.1
From 867988237d3e472fe2c99e81ae733e103422566c Mon Sep 17 00:00:00 2001
From: Jan Beulich <[email protected]>
Date: Thu, 28 Sep 2017 15:17:25 +0100
Subject: [PATCH 1/2] x86: limit linear page table use to a single level
That's the only way that they're meant to be used. Without such a restriction arbitrarily long chains of same-level page tables can be built, tearing down of which may then cause arbitrarily deep recursion, causing a stack overflow. To facilitate this restriction, a counter is being introduced to track both the number of same-level entries in a page table as well as the number of uses of a page table in another same-level one (counting into positive and negative direction respectively, utilizing the fact that both counts can't be non-zero at the same time).
Note that the added accounting introduces a restriction on the number of times a page can be used in other same-level page tables - more than 32k of such uses are no longer possible.
Note also that some put_page_and_type[_preemptible]() calls are replaced with open-coded equivalents. This seemed preferrable to adding "parent_table" to the matrix of functions.
Note further that cross-domain same-level page table references are no longer permitted (they probably never should have been).
This is XSA-240.
--- xen/arch/x86/domain.c | 1 + xen/arch/x86/mm.c | 171 ++++++++++++++++++++++++++++++++++++++----- xen/include/asm-x86/domain.h | 2 + xen/include/asm-x86/mm.h | 25 +++++-- 4 files changed, 175 insertions(+), 24 deletions(-)
xen/arch/x86/domain.c +1 -0
@@ -1226,6 +1226,7 @@ int arch_set_info_guest( rc = -ERESTART ;/* Fallthrough */ case -ERESTART : + v->arch.old_guest_ptpg =NULL ; v->arch.old_guest_table =pagetable_get_page (v->arch.guest_table); v->arch.guest_table =pagetable_null ();
xen/arch/x86/mm.c +154 -17
351 lines not on this page · raw message
xen/include/asm-x86/domain.h +2 -0
@@ -527,6 +527,8 @@ struct arch_vcpupagetable_t guest_table_user;/* (MFN) x86/64 user-space pagetable */ pagetable_t guest_table;/* (MFN) guest notion of cr3 */ struct page_info *old_guest_table;/* partially destructed pagetable */ +struct page_info *old_guest_ptpg;/* containing page table of the */ +/* former, if any */ /* guest_table holds a ref to the page, and also a type-count unless * shadow refcounts are in use */ pagetable_t shadow_table[4 ];/* (MFN) shadow(s) of guest */
xen/include/asm-x86/mm.h +18 -7
@@ -124,11 +124,11 @@ struct page_infou32 tlbflush_timestamp;/* -* When PGT_partial is true then this field is valid and indicates -* that PTEs in the range [0, @nr_validated_ptes) have been validated. -* An extra page reference must be acquired (or not dropped) whenever -* PGT_partial gets set, and it must be dropped when the flag gets -* cleared. This is so that a get() leaving a page in partially +* When PGT_partial is true then the first two fields are valid and +* indicate that PTEs in the range [0, @nr_validated_ptes) have been +* validated. An extra page reference must be acquired (or not dropped) +* whenever PGT_partial gets set, and it must be dropped when the flag +* gets cleared. This is so that a get() leaving a page in partially * validated state (where the caller would drop the reference acquired * due to the getting of the type [apparently] failing [-ERESTART]) * would not accidentally result in a page left with zero general
@@ -152,10 +152,18 @@ struct page_info* put_page_from_lNe() (due to the apparent failure), and hence it * must be dropped when the put operation is resumed (and completes), * but it must not be acquired if picking up the page for validation. +* +* The 3rd field, @linear_pt_count, indicates +* - by a positive value, how many same-level page table entries a page +* table has, +* - by a negative value, in how many same-level page tables a page is +* in use. */ struct { -u16 nr_validated_ptes; -s8 partial_pte; +u16 nr_validated_ptes:PAGETABLE_ORDER +1 ; + u16 :16 - PAGETABLE_ORDER - 1 - 2; +s16 partial_pte:2 ; +s16 linear_pt_count; };/*
@@ -206,6 +214,9 @@ struct page_info#define PGT_count_width PG_shift(9)#define PGT_count_mask ((1UL<<PGT_count_width)-1) +/* Are the 'type mask' bits identical? */ +#define PGT_type_equal (x, y) (!(((x) ^ (y)) & PGT_type_mask)) +/* Cleared when the owning guest 'frees' this page. */ #define _PGC_allocated PG_shift(1)#define PGC_allocated PG_mask(1, 1)
Signature · 1 line
2.14.1
From e614979ce054044d9e19023f1ef10dae6e38baf4 Mon Sep 17 00:00:00 2001
From: George Dunlap <[email protected]>
Date: Fri, 22 Sep 2017 11:46:55 +0100
Subject: [PATCH 2/2] x86/mm: Disable PV linear pagetables by default
Allowing pagetables to point to other pagetables of the same level (often called 'linear pagetables') has been included in Xen since its inception. But it is not used by the most common PV guests (Linux, NetBSD, minios), and has been the source of a number of subtle reference-counting bugs.
Add a command-line option to control whether PV linear pagetables are allowed (disabled by default).
---
Changes since v2:
- s/_/-/; in command-line option
- Added __read_mostly
--- docs/misc/xen-command-line.markdown | 15 +++++++++++++++ xen/arch/x86/mm.c | 10 ++++++++++ 2 files changed, 25 insertions(+)
docs/misc/xen-command-line.markdown +15 -0
@@ -1374,6 +1374,21 @@ The following resources are available: CDP, one COS will corespond two CBMs other than one with CAT, due to the sum of CBMs is fixed, that means actual `cos_max` in use will automatically reduce to half when CDP is enabled. + +### pv-linear-pt +> `= <boolean>` + +> Default: `false` + +Allow PV guests to have pagetable entries pointing to other pagetables +of the same level (i.e., allowing L2 PTEs to point to other L2 pages). +This technique is often called "linear pagetables", and is sometimes +used to allow operating systems a simple way to consistently map the +current process's pagetables into its own virtual address space. + +None of the most common PV operating systems (Linux, NetBSD, MiniOS) +use this technique, but there may be custom operating systems which +do. ### reboot > `= t[riple] | k[bd] | a[cpi] | p[ci] | P[ower] | e[fi] | n[o] [, [w]arm | [c]old]`
xen/arch/x86/mm.c +10 -0
@@ -814,6 +814,9 @@ static void dec_linear_uses(struct page_info *pg)* frame if it is mapped by a different root table. This is sufficient and * also necessary to allow validation of a root table mapping itself. */ +static bool __read_mostly pv_linear_pt_enable = false; +boolean_param ("pv-linear-pt" , pv_linear_pt_enable); +#define define_get_linear_pagetable (level) \ static int \ get_##level##_linear_pagetable( \
@@ -823,6 +826,13 @@ get_##level##_linear_pagetable( \struct page_info *page; \unsigned long pfn; \ \ +if ( !pv_linear_pt_enable ) \ + { \ +gdprintk (XENLOG_WARNING , \ +"Attempt to create linear p.t. (feature disabled)\n" ); \ +return 0 ; \ + } \ + \ if ( (level##e_get_flags(pde) & _PAGE_RW) ) \ { \ gdprintk(XENLOG_WARNING, \
Signature · 1 line
2.14.1
_______________________________________________
Xen-devel mailing list
[email protected]
https://lists.xen.org/xen-devel