From mboxrd@z Thu Jan 1 00:00:00 1970 From: Don Slutz Subject: Re: [PATCH v2 10/12] xenctx: change is_kernel_text() into is_kernel_addr(). Date: Fri, 8 Nov 2013 08:50:09 -0500 Message-ID: <527CEC11.5000400@terremark.com> References: <1383768500-4245-1-git-send-email-dslutz@terremark.com> <1383768500-4245-11-git-send-email-dslutz@terremark.com> <527B5EEC02000078001007BD@nat28.tlf.novell.com> <527C359A.5090301@terremark.com> <527CB1790200007800101139@nat28.tlf.novell.com> <1383904227.3189.53.camel@kazak.uk.xensource.com> Mime-Version: 1.0 Content-Type: text/plain; charset="us-ascii"; Format="flowed" Content-Transfer-Encoding: 7bit Return-path: Received: from mail6.bemta3.messagelabs.com ([195.245.230.39]) by lists.xen.org with esmtp (Exim 4.72) (envelope-from ) id 1VemVN-0002z1-Mc for xen-devel@lists.xenproject.org; Fri, 08 Nov 2013 13:53:45 +0000 In-Reply-To: <1383904227.3189.53.camel@kazak.uk.xensource.com> List-Unsubscribe: , List-Post: List-Help: List-Subscribe: , Sender: xen-devel-bounces@lists.xen.org Errors-To: xen-devel-bounces@lists.xen.org To: Ian Campbell Cc: Stefano Stabellini , George Dunlap , Don Slutz , Ian Jackson , Don Slutz , Jan Beulich , xen-devel List-Id: xen-devel@lists.xenproject.org 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 wrote: >>> On 11/07/13 03:35, Jan Beulich wrote: >>>>>>> On 06.11.13 at 21:08, Don Slutz 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 >> >