From: Don Slutz <dslutz@verizon.com>
To: Ian Campbell <Ian.Campbell@citrix.com>, Don Slutz <dslutz@verizon.com>
Cc: George Dunlap <george.dunlap@eu.citrix.com>,
Stefano Stabellini <stefano.stabellini@eu.citrix.com>,
Ian Jackson <ian.jackson@eu.citrix.com>,
Jan Beulich <jbeulich@suse.com>,
xen-devel@lists.xen.org
Subject: Re: [PATCH v8 13/20] xenctx: change is_kernel_text() into kernel_addr().
Date: Wed, 02 Apr 2014 13:08:52 -0400 [thread overview]
Message-ID: <533C4424.8040308@terremark.com> (raw)
In-Reply-To: <1396434845.8667.310.camel@kazak.uk.xensource.com>
On 04/02/14 06:34, Ian Campbell wrote:
> On Tue, 2014-04-01 at 17:33 -0400, Don Slutz wrote:
>> On 04/01/14 10:10, Ian Campbell wrote:
>>> On Thu, 2014-03-27 at 15:05 -0400, Don Slutz wrote:
>>
>>>> kernel_end or the symbol "__brk_limit". The symbol "vgettimeofday"
>>>> is used to mark the end of where modules can be loaded.
>>> I can just about see from the vmlinux.lds.S why __brk_limit might be
>>> somewhat relevant, but where does the use of vgettimeofday come from?
>>>
>>> The 3.2 kernel on my desktop doesn't list vgettimeofday in System.map
>>> for example and in any case you can't rely on it not being moved around.
>>> (you can't really rely on __brk_limit either, but it seems less likely
>>> to move).
>> I would guess you are running a 32 bit desktop.
> No. 3.13-1-amd64 and I looked in System.map-3.13-1-amd64
> System.map-3.2.0-4-amd64 and System.map-3.9-1-amd64 which happened to be
> present in /boot.
I only find it in 2.6 kernels. Since I am dropping the module support
this symbol is no longer checked for.
>> Here is output of the same 3 stack pages in use guest that is paused:
> You keep dropping in these massive output dumps without explaining what
> they are supposed to illustrate. I have no idea what you think this is
> telling me.
This was in response to:
>>> This shows that a kernel module is using a lot of stack.
>> Does it? All I see is the four additional entries at the base, consuming
>> about 0.5k which I suppose is a lot. I suppose those are stack frames
>> corresponding to some module? Perhaps mark them as such with "unknown
>> module function"?
I was trying to tell you that the module code was using much more then 0.5k.
It is just over 2 pages. But forgot to write this sentence 1st.
Clearly what I am writing in e-mails is not at all clear to you. Will try to do better.
>>>> + return KERNEL_TEXT_ADDR;
>>>> + }
>>>> + else
>>>> + {
>>>> + if ( kernel_text &&
>>>> + (addr >= kernel_text &&
>>>> + addr <= kernel_end) )
>>>> + return KERNEL_DATA_ADDR;
>>>> + if ( kernel_mod_start &&
>>>> + (addr >= kernel_mod_start &&
>>>> + addr <= kernel_mod_end) )
>>>> + return KERNEL_MOD_ADDR;
>>>> + }
>>>> + return NOT_KERNEL_ADDR;
>>>> }
>>>>
>>>> @@ -180,7 +223,14 @@ static void print_symbol(guest_word_t addr)
>>>> if (addr==s->address)
>>>> printf(" %s", s->name);
>>>> else
>>>> - printf(" %s+%#x", s->name, (unsigned int)(addr - s->address));
>>>> + {
>>>> + unsigned long long offset = addr - s->address;
>>>> +
>>>> + if ( addr_type == KERNEL_MOD_ADDR &&
>>>> + offset > MAX_MOD_OFFSET )
>>>> + return;
>>> Shouldn't kernel_addr have not returned KERNEL_MOD_ADDR in that case?
>>>
>> I did.
> You did what?
>
I had meant to type "It". But that is also wrong. Somehow I dropped the not in
"not returned KERNEL_MOD_ADDR". What I should have said:
kernel_addr when checking for KERNEL_MOD_ADDR only does a range check.
It does not search the symbols to see if the address is close enough.
With these issues, I see no reason to attempt adding module support at this time.
If you want I can also answer the later questions.
-Don Slutz
next prev parent reply other threads:[~2014-04-02 17:08 UTC|newest]
Thread overview: 50+ messages / expand[flat|nested] mbox.gz Atom feed top
2014-03-27 19:05 [PATCH v8 00/20] xenctx: Many changes Don Slutz
2014-03-27 19:05 ` [PATCH v8 01/20] xenctx: clean up usage output Don Slutz
2014-03-27 19:05 ` [PATCH v8 02/20] xenctx: Clean up stack trace when hypercall_page not in symbol table Don Slutz
2014-03-27 19:05 ` [PATCH v8 03/20] xenctx: Add -n (--display-stack-pages) option to output larger stack Don Slutz
2014-04-01 13:19 ` Ian Campbell
2014-04-01 13:25 ` George Dunlap
2014-04-01 20:28 ` Don Slutz
2014-04-02 10:39 ` Ian Campbell
2014-03-27 19:05 ` [PATCH v8 04/20] xenctx: Add command line options -b (--bytes-per-line) and -l (--lines) Don Slutz
2014-04-01 14:30 ` Ian Campbell
2014-03-27 19:05 ` [PATCH v8 05/20] xenctx: Add command line option -D (--decode-as-ascii) Don Slutz
2014-04-01 13:27 ` Ian Campbell
2014-03-27 19:05 ` [PATCH v8 06/20] xenctx: Add command line option -t (--tag-stack-dump) Don Slutz
2014-03-27 19:05 ` [PATCH v8 07/20] xenctx: Change print_symbol to do the space before Don Slutz
2014-03-27 19:05 ` [PATCH v8 08/20] xenctx: More info on failed to map page Don Slutz
2014-03-27 19:05 ` [PATCH v8 09/20] xenctx: Add output of stack address to Call and Stack Trace Don Slutz
2014-04-01 13:28 ` Ian Campbell
2014-03-27 19:05 ` [PATCH v8 10/20] xenctx: Add -m (--memory) <maddr> option to dump memory at maddr Don Slutz
2014-04-01 13:30 ` Ian Campbell
2014-03-27 19:05 ` [PATCH v8 11/20] xenctx: Add error output if --all-vcpus (-C) and [VCPU] are both specified Don Slutz
2014-04-01 13:44 ` Ian Campbell
2014-04-01 18:24 ` Don Slutz
2014-03-27 19:05 ` [PATCH v8 12/20] xenctx: Add -d (--dump-as-stack) <daddr> option to dump memory at daddr as a stack Don Slutz
2014-04-01 13:46 ` Ian Campbell
2014-04-01 18:23 ` Don Slutz
2014-03-27 19:05 ` [PATCH v8 13/20] xenctx: change is_kernel_text() into kernel_addr() Don Slutz
2014-04-01 14:10 ` Ian Campbell
2014-04-01 21:33 ` Don Slutz
2014-04-02 10:34 ` Ian Campbell
2014-04-02 17:08 ` Don Slutz [this message]
2014-03-27 19:05 ` [PATCH v8 14/20] xenctx: Add convert of more registers to symbols Don Slutz
2014-04-01 14:11 ` Ian Campbell
2014-04-01 17:25 ` Don Slutz
2014-03-27 19:05 ` [PATCH v8 15/20] xenctx: Add output of vcpu value and state for --all-vcpus Don Slutz
2014-03-27 19:05 ` [PATCH v8 16/20] xenctx: Fix handling of !guest_protected_mode Don Slutz
2014-04-01 14:14 ` Ian Campbell
2014-04-01 18:35 ` Don Slutz
2014-04-02 10:41 ` Ian Campbell
2014-03-27 19:05 ` [PATCH v8 17/20] xenctx: Allow output for offline vcpu when specified Don Slutz
2014-04-01 14:24 ` Ian Campbell
2014-04-01 19:24 ` Don Slutz
2014-04-02 10:42 ` Ian Campbell
2014-03-27 19:05 ` [PATCH v8 18/20] xenctx: Add 16 bit output Don Slutz
2014-04-01 14:25 ` Ian Campbell
2014-04-01 18:53 ` Don Slutz
2014-03-27 19:05 ` [PATCH v8 19/20] xenctx: Fix print_ctx_32on64's print_special call Don Slutz
2014-04-01 14:27 ` Ian Campbell
2014-03-27 19:05 ` [PATCH v8 20/20] xenctx: Ensure errno is not zero on error in xc_translate_foreign_address() Don Slutz
2014-04-01 14:30 ` Ian Campbell
2014-04-01 20:49 ` Don Slutz
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=533C4424.8040308@terremark.com \
--to=dslutz@verizon.com \
--cc=Ian.Campbell@citrix.com \
--cc=george.dunlap@eu.citrix.com \
--cc=ian.jackson@eu.citrix.com \
--cc=jbeulich@suse.com \
--cc=stefano.stabellini@eu.citrix.com \
--cc=xen-devel@lists.xen.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).