On 11/19/13 07:51, Daniel Kiper wrote:
On Tue, Nov 19, 2013 at 06:46:39AM -0500, Don Slutz wrote:
From: Don Slutz <dslutz@xxxxxxxxxxx>
Currently crash 4.0 and later using the code:
http://lists.xen.org/archives/html/xen-devel/2013-11/msg02569.html
There is some very limited documention on crashes remote ptotocol in:
http://lists.xen.org/archives/html/xen-devel/2013-11/msg02352.html
and some fixes in the attachment 0001-xen-crashd-Connect-crash-with-domain.patch
from the 1st link above.
How ever there are issues with the current code:
1) The remote protocol has a minor issue (which I have not been able to
happen) based on the fact TCP/IP is stream based protocol. This means
a RECV or a SEND may not do the fully requested size of data. In fact
the current code assumes that the amount of data that a SEND is called
with will all be read with a single RECV.
2) The most common mismatch between crash and older kernels is
phys_base. In the remote case, see if the remote server supports
vitrual memory access, and if so, see if phys_base can be retreived.
3) crash assumes that the remote system is active and can not return
currect IP and SP to do a better back trace.
4) enable a non-active mode of remote access.
This patch set attempts to fix these:
The fix for #1 I have called NIL mode (patch 1).
The fix for #2 uses get_remote_phys_base (patch 3).
The fix for #3 uses get_remote_regs (patch 5).
The fix for #4 uses special file /dev/xenmem (patch 7).
Where is this file created? In guest or in host. Is it done by udev?
Where is driver for this file?
This is a fake file, it only exists in xen-crashd.
It also REMOTE_NIL() to indicate "remote paused system".
Don Slutz (7):
Add NIL mode to remote.
remote_proc_version: NULL terminate passed buffer on error.
Add get_remote_phys_base.
Add remote_vtop.
bt: get remote live registers if possible.
Add get_remote_cr3
Add support for non-live remote.
defs.h | 8 +-
kernel.c | 25 +++-
memory.c | 25 +++-
remote.c | 462 +++++++++++++++++++++++++++++++++++++++++++++++++++++----------
x86_64.c | 24 ++++
5 files changed, 465 insertions(+), 79 deletions(-)
I have done quick review. It looks quite nice. There are two nitpicks
for me. Please do not use camelCase (I have found one in patch 3 in
struct _remote_context) and do not add Emacs directives at the end
of files (this is Xen specific stuff).
I will try and remove all camelCase.
I can remove the emacs stuff, but I know it saves me time. This is because of:
* c-basic-offset: 8
* indent-tabs-mode: t
Where as Xen:
* c-basic-offset: 4
* indent-tabs-mode: nil
So my default is the Xen one not the crash one.
-Don Slutz
Daniel
--
Crash-utility mailing list
Crash-utility@xxxxxxxxxx
https://www.redhat.com/mailman/listinfo/crash-utility