From: Julien Grall <julien.grall@arm.com>
To: Vijay Kilari <vijay.kilari@gmail.com>
Cc: xen-devel <xen-devel@lists.xenproject.org>,
Stefano Stabellini <sstabellini@kernel.org>,
Andre Przywara <andre.przywara@arm.com>
Subject: Re: arm: alloc_heap_pages allocates already allocated page
Date: Wed, 8 Feb 2017 15:42:34 +0000 [thread overview]
Message-ID: <197763e2-9feb-2cb7-e04f-28a0405cdd21@arm.com> (raw)
In-Reply-To: <2d4800ec-302a-4dfe-c95d-96190bc0f666@arm.com>
On 08/02/17 14:18, Julien Grall wrote:
> Hi,
>
> On 07/02/17 15:59, Vijay Kilari wrote:
>> On Tue, Feb 7, 2017 at 6:57 PM, Julien Grall <julien.grall@arm.com> wrote:
>>>
>>>
>>> On 07/02/2017 13:25, Vijay Kilari wrote:
>>>>
>>>> On Tue, Feb 7, 2017 at 6:30 PM, Julien Grall <julien.grall@arm.com> wrote:
>>>>>
>>>>>
>>>>> One more thing, if Xen 4.7 was able to go up to booting Dom0 without any
>>>>> patches on a NUMA board. I would recommend to try to bisect and see if
>>>>> you
>>>>> can find an offending commit.
>>>>
>>>>
>>>> Yes, with plain 4.7 panic is not seen
>>>
>>>
>>> Can you please bisect Xen? It could save us a bit of time to understand
>>> what's going on.
>>
>> ubuntu@ubuntu:~/xen_upstream_new/xen$ git bisect bad
>> 493f535a06b5b4041c0745e954780dd5d6f80581 is the first bad commit
>> commit 493f535a06b5b4041c0745e954780dd5d6f80581
>> Author: Julien Grall <julien.grall@arm.com>
>> Date: Thu Sep 15 12:28:36 2016 +0100
>>
>> xen/arm: p2m: Re-implement p2m_insert_mapping using p2m_set_entry
>>
>> The function p2m_insert_mapping can be re-implemented using the generic
>> function p2m_set_entry.
>>
>> Note that the mapping is not reverted anymore if Xen fails to insert a
>> mapping. This was added to ensure the MMIO are not kept half-mapped
>> in case of failure and to follow the x86 counterpart. This was removed
>> on the x86 part by commit c3c756bd "x86/p2m: use large pages for MMIO
>> mappings" and I think we should let the caller taking care of it.
>>
>> Finally drop the operation INSERT in apply_* as nobody is using it
>> anymore. Note that the functions could have been dropped in one go at the
>> end, however I find easier to drop the operations one by one avoiding a
>> big deletion in the patch that convert the last operation.
>>
>> Signed-off-by: Julien Grall <julien.grall@arm.com>
>> Reviewed-by: Stefano Stabellini <sstabellini@kernel.org>
>> Tested-by: Tamas K Lengyel <tamas@tklengyel.com>
>>
>
> I think I have managed to reproduce the crash at boot time though the stack
> trace is different (see below). This sounds like to me a memory corruption,
> I will dig down and see what I can find.
Hmmm after all the issue might be different. My DT was describing some
LPIs but Xen had no check. So we ended up to overrun the buffer.
This hack patch should tell whether you have LPIs described in your DT:
diff --git a/xen/arch/arm/gic.c b/xen/arch/arm/gic.c
index a5348f2..0631441 100644
--- a/xen/arch/arm/gic.c
+++ b/xen/arch/arm/gic.c
@@ -238,6 +238,10 @@ int gic_irq_xlate(const u32 *intspec, unsigned int intsize,
if ( out_type )
*out_type = intspec[2] & IRQ_TYPE_SENSE_MASK;
+ /* Be crude for now */
+ if ( *out_hwirq > 1024 )
+ return -EINVAL;
+
return 0;
}
If you hit an error, I would recommend to drop them. If not and still have the issue
few things I would recommend to try:
- A different compiler version
- Look at the state of the heap everytime you allocate/free a page
Cheers,
--
Julien Grall
_______________________________________________
Xen-devel mailing list
Xen-devel@lists.xen.org
https://lists.xen.org/xen-devel
next prev parent reply other threads:[~2017-02-08 15:42 UTC|newest]
Thread overview: 13+ messages / expand[flat|nested] mbox.gz Atom feed top
2017-02-07 8:18 arm: alloc_heap_pages allocates already allocated page Vijay Kilari
2017-02-07 10:07 ` Julien Grall
2017-02-07 11:10 ` Vijay Kilari
2017-02-07 11:28 ` Julien Grall
2017-02-07 12:41 ` Vijay Kilari
2017-02-07 12:47 ` Julien Grall
2017-02-07 13:00 ` Julien Grall
2017-02-07 13:25 ` Vijay Kilari
2017-02-07 13:27 ` Julien Grall
2017-02-07 15:59 ` Vijay Kilari
2017-02-08 14:18 ` Julien Grall
2017-02-08 15:42 ` Julien Grall [this message]
2017-02-09 6:36 ` Vijay Kilari
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=197763e2-9feb-2cb7-e04f-28a0405cdd21@arm.com \
--to=julien.grall@arm.com \
--cc=andre.przywara@arm.com \
--cc=sstabellini@kernel.org \
--cc=vijay.kilari@gmail.com \
--cc=xen-devel@lists.xenproject.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).