[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [Xen-devel] [PATCH v2 10/12] xenctx: change is_kernel_text() into is_kernel_addr().



On 11/08/13 04:50, Ian Campbell wrote:
On Fri, 2013-11-08 at 08:40 +0000, Jan Beulich wrote:
On 08.11.13 at 01:51, Don Slutz <dslutz@xxxxxxxxxxx> wrote:
On 11/07/13 03:35, Jan Beulich wrote:
On 06.11.13 at 21:08, Don Slutz <dslutz@xxxxxxxxxxx> wrote:
+        return KERNEL_TEXT_ADDR;
       if (addr >= kernel_sinittext &&
           addr <= kernel_einittext)
-        return 1;
-    return 0;
+        return KERNEL_TEXT_ADDR;
+    if (addr >= kernel_text &&
+        addr <= kernel_end)
+        return KERNEL_DATA_ADDR;
As you supposedly filtered out all text ranges before, did you really
mean to compare to kernel_text here (rather than kernel_start)?
Yes, I did.  I think it is better to use the value that is in the system map
over the default.  It has changed:

dcs-xen-54:~/xen>grep " _text" /boot/System.map-*
/boot/System.map-2.6.18-128.el5:ffffffff80000000 A _text
/boot/System.map-3.6.11-5.fc17.x86_64:ffffffff81000000 T _text
/boot/System.map-3.8.11-100.fc17.x86_64:ffffffff81000000 T _text

But since it is a command line argument, if specified, should it be used
instead?
I guess so.
Yes, since the user may not have a symbol table for the given kernel and
it may not even be Linux. I'm sure a Windows kernel guru debugging a
Windows guest would know the right number for that version of Windows.
(IIRC the option was added by just such a guru...)
If you do not specify a symbol file, kernel_start will be used. This is the case when both are specified. If I am reading this right that is 2 votes to use kernel_start if specified otherwise kernel_text.
   -Don Slutz
  In any event - after having split out all text pieces
(hopefully), the check here should cover the whole kernel image,
no matter how the ordering between text and data is.

Jan




_______________________________________________
Xen-devel mailing list
Xen-devel@xxxxxxxxxxxxx
http://lists.xen.org/xen-devel


 


Rackspace

Lists.xenproject.org is hosted with RackSpace, monitoring our
servers 24x7x365 and backed by RackSpace's Fanatical Support®.