ff4b346ede
disk fails with UnboundLocalError: local variable 'dev_type' referenced before assignment 21678-xend-mac-fix.patch - bnc#586221 - cannot add DomU with USB host controller defined domu-usb-controller.patch (Chun Yan Liu) - Upstream patches from Jan 21151-trace-bounds-check.patch 21627-cpuidle-wrap.patch 21643-vmx-vpmu-pmc-offset.patch 21682-trace-buffer-range.patch 21683-vtd-kill-timer-conditional.patch 21693-memevent-64bit-only.patch 21695-trace-t_info-readonly.patch 21698-x86-pirq-range-check.patch 21699-p2m-query-for-type-change.patch 21700-32on64-vm86-gpf.patch 21705-trace-printk.patch 21706-trace-security.patch 21712-amd-osvw.patch 21744-x86-cpufreq-range-check.patch - bnc #599550 - Xen cannot distinguish the status of 'pause' addcommand_domstate.patch OBS-URL: https://build.opensuse.org/package/show/Virtualization/xen?expand=0&rev=63
91 lines
3.4 KiB
Diff
91 lines
3.4 KiB
Diff
# HG changeset patch
|
|
# User Keir Fraser <keir.fraser@citrix.com>
|
|
# Date 1277831922 -3600
|
|
# Node ID c5f3fe17374cead91fdaa94f60cf7b3115eaa091
|
|
# Parent 2a3a5979e3f16d77f5b526050c45acba186482b0
|
|
trace: share t_info pages only in read-only mode
|
|
|
|
There's no need to share writably the t_info pages (Dom0 only wants
|
|
[and needs] to read it)
|
|
|
|
Signed-off-by: Jan Beulich <jbeulich@novell.com>
|
|
Acked-by: George Dunlap <george.dunlap@eu.citrix.com>
|
|
|
|
--- a/tools/xenmon/xenbaked.c
|
|
+++ b/tools/xenmon/xenbaked.c
|
|
@@ -84,7 +84,7 @@ typedef struct settings_st {
|
|
} settings_t;
|
|
|
|
struct t_struct {
|
|
- struct t_info *t_info; /* Structure with information about individual buffers */
|
|
+ const struct t_info *t_info; /* Structure with information about individual buffers */
|
|
struct t_buf **meta; /* Pointers to trace buffer metadata */
|
|
unsigned char **data; /* Pointers to trace buffer data areas */
|
|
};
|
|
@@ -376,9 +376,8 @@ static struct t_struct *map_tbufs(unsign
|
|
}
|
|
|
|
/* Map t_info metadata structure */
|
|
- tbufs.t_info = xc_map_foreign_range(xc_handle, DOMID_XEN,
|
|
- tinfo_size, PROT_READ | PROT_WRITE,
|
|
- tbufs_mfn);
|
|
+ tbufs.t_info = xc_map_foreign_range(xc_handle, DOMID_XEN, tinfo_size,
|
|
+ PROT_READ, tbufs_mfn);
|
|
|
|
if ( tbufs.t_info == 0 )
|
|
{
|
|
@@ -404,7 +403,8 @@ static struct t_struct *map_tbufs(unsign
|
|
for(i=0; i<num; i++)
|
|
{
|
|
|
|
- uint32_t *mfn_list = ((uint32_t *)tbufs.t_info) + tbufs.t_info->mfn_offset[i];
|
|
+ const uint32_t *mfn_list = (const uint32_t *)tbufs.t_info
|
|
+ + tbufs.t_info->mfn_offset[i];
|
|
int j;
|
|
xen_pfn_t pfn_list[tbufs.t_info->tbuf_size];
|
|
|
|
--- a/tools/xentrace/xentrace.c
|
|
+++ b/tools/xentrace/xentrace.c
|
|
@@ -62,7 +62,7 @@ typedef struct settings_st {
|
|
} settings_t;
|
|
|
|
struct t_struct {
|
|
- struct t_info *t_info; /* Structure with information about individual buffers */
|
|
+ const struct t_info *t_info; /* Structure with information about individual buffers */
|
|
struct t_buf **meta; /* Pointers to trace buffer metadata */
|
|
unsigned char **data; /* Pointers to trace buffer data areas */
|
|
};
|
|
@@ -459,9 +459,8 @@ static struct t_struct *map_tbufs(unsign
|
|
int i;
|
|
|
|
/* Map t_info metadata structure */
|
|
- tbufs.t_info = xc_map_foreign_range(xc_handle, DOMID_XEN,
|
|
- tinfo_size, PROT_READ | PROT_WRITE,
|
|
- tbufs_mfn);
|
|
+ tbufs.t_info = xc_map_foreign_range(xc_handle, DOMID_XEN, tinfo_size,
|
|
+ PROT_READ, tbufs_mfn);
|
|
|
|
if ( tbufs.t_info == 0 )
|
|
{
|
|
@@ -487,7 +486,8 @@ static struct t_struct *map_tbufs(unsign
|
|
for(i=0; i<num; i++)
|
|
{
|
|
|
|
- uint32_t *mfn_list = ((uint32_t *)tbufs.t_info) + tbufs.t_info->mfn_offset[i];
|
|
+ const uint32_t *mfn_list = (const uint32_t *)tbufs.t_info
|
|
+ + tbufs.t_info->mfn_offset[i];
|
|
int j;
|
|
xen_pfn_t pfn_list[tbufs.t_info->tbuf_size];
|
|
|
|
--- a/xen/common/trace.c
|
|
+++ b/xen/common/trace.c
|
|
@@ -322,7 +322,7 @@ void __init init_trace_bufs(void)
|
|
|
|
for(i=0; i<T_INFO_PAGES; i++)
|
|
share_xen_page_with_privileged_guests(
|
|
- virt_to_page(t_info) + i, XENSHARE_writable);
|
|
+ virt_to_page(t_info) + i, XENSHARE_readonly);
|
|
|
|
if ( opt_tbuf_size == 0 )
|
|
{
|