FAQ Search Today's Posts Mark Forums Read
» Video Reviews

» Linux Archive

Linux-archive is a website aiming to archive linux email lists and to make them easily accessible for linux users/developers.


» Sponsor

» Partners

» Sponsor

Go Back   Linux Archive > Redhat > Crash Utility

 
 
LinkBack Thread Tools
 
Old 07-05-2012, 03:04 PM
Daniel Kiper
 
Default xen: Read data correctly from dynamically allocated console ring too

console ring is dynamically allocated since 19543 changeset (New option
conring_size= to allow larger console ring). Take into account that
and read data correctly from it too.

Signed-off-by: Daniel Kiper <daniel.kiper@oracle.com>

diff -Npru crash-6.0.8.orig/xen_hyper_command.c crash-6.0.8/xen_hyper_command.c
--- crash-6.0.8.orig/xen_hyper_command.c 2012-06-29 16:59:18.000000000 +0200
+++ crash-6.0.8/xen_hyper_command.c 2012-07-05 16:22:35.000000000 +0200
@@ -590,24 +590,31 @@ xen_hyper_dump_log(void)
ulong conring;
char *buf;
char last;
+ uint32_t conring_size;

- conring = symbol_value("conring");
+ get_symbol_data("conring", sizeof(ulong), &conring);
get_symbol_data("conringc", sizeof(uint), &conringc);
get_symbol_data("conringp", sizeof(uint), &conringp);
+
+ if (symbol_exists("conring_size"))
+ get_symbol_data("conring_size", sizeof(uint32_t), &conring_size);
+ else
+ conring_size = XEN_HYPER_CONRING_SIZE;
+
warp = FALSE;
- if (conringp >= XEN_HYPER_CONRING_SIZE) {
- if ((start = conringp & (XEN_HYPER_CONRING_SIZE - 1))) {
+ if (conringp >= conring_size) {
+ if ((start = conringp & (conring_size - 1))) {
warp = TRUE;
}
} else {
start = 0;
}

- buf = GETBUF(XEN_HYPER_CONRING_SIZE);
- readmem(conring, KVADDR, buf, XEN_HYPER_CONRING_SIZE,
+ buf = GETBUF(conring_size);
+ readmem(conring, KVADDR, buf, conring_size,
"conring contents", FAULT_ON_ERROR);
idx = start;
- len = XEN_HYPER_CONRING_SIZE;
+ len = conring_size;
last = 0;

wrap_around:

--
Crash-utility mailing list
Crash-utility@redhat.com
https://www.redhat.com/mailman/listinfo/crash-utility
 

Thread Tools




All times are GMT. The time now is 07:39 AM.

VBulletin, Copyright ©2000 - 2014, Jelsoft Enterprises Ltd.
Content Relevant URLs by vBSEO ©2007, Crawlability, Inc.
Copyright 2007 - 2008, www.linux-archive.org