From: Andrew Cooper <andrew.cooper3@citrix.com>
To: Tomasz Wroblewski <tomasz.wroblewski@citrix.com>
Cc: xen-devel@lists.xenproject.org, dgdegra@tycho.nsa.gov,
Jan Beulich <JBeulich@suse.com>
Subject: Re: [PATCH] Fix boot crash on xsm/flask enabled builds when no policy module is present
Date: Tue, 27 Aug 2013 09:50:35 +0100 [thread overview]
Message-ID: <521C685B.6060707@citrix.com> (raw)
In-Reply-To: <521B89AC.1040509@citrix.com>
On 26/08/2013 18:00, Tomasz Wroblewski wrote:
>
>
> The shaky manually constructed call graph for the assertion failure:
>
> setup.c: init_idle_domain
> schedule.c: scheduler_init
> domain.c: domain_create
> domain.c: alloc_domain_struct
> domain.c: alloc_xenheap_pages
> ..
> page_alloc.c: alloc_heap_pages
> flushtlb.h: flush_tlb_mask
> flushtlb.h: flush_mask
> smp.c: flush_area_mask - hits ASSERT because interrupts are disabled here
>
> I apparently can't get a real stacktrace because adding
> dump_execution_state in flush_area_mask just causes the "Unknown
> interrupt" error, similarily to what hitting the ASSERT fail does. I
> printed the assert condition manually to verify it tho and interrupts
> are disabled there so its bound to fail.
>
Just for reference here, as I went digging in the code.
dump_execution_state() makes use of run_in_exception_handler() which
makes use of the ud2 instruction to get its hands on an exception frame,
for the purpose of dumping the state.
The "Unknown Interrupt" means that the CPU is still running on the early
boot IDT, set up in xen/arch/x86/boot/x86_64.S which does a blanket
ignore on all interrupts, including exceptions.
We should probably see about setting up and using the arch traps earlier
in boot. Failing that, an early_invalid_opcode() handler could at least
hint that it might have hit an early bug, and give some details.
~Andrew
prev parent reply other threads:[~2013-08-27 8:50 UTC|newest]
Thread overview: 15+ messages / expand[flat|nested] mbox.gz Atom feed top
2013-08-26 10:03 [PATCH] Fix boot crash on xsm/flask enabled builds when no policy module is present Tomasz Wroblewski
2013-08-26 10:52 ` Andrew Cooper
2013-08-26 13:27 ` Daniel De Graaf
2013-08-26 13:32 ` Tomasz Wroblewski
2013-08-26 11:12 ` Jan Beulich
2013-08-26 12:24 ` Tomasz Wroblewski
2013-08-26 12:41 ` Andrew Cooper
2013-08-26 13:00 ` Jan Beulich
2013-08-26 13:34 ` Tomasz Wroblewski
2013-08-26 17:00 ` Tomasz Wroblewski
2013-08-27 7:13 ` Jan Beulich
2013-08-27 7:23 ` Tomasz Wroblewski
2013-08-27 7:47 ` [PATCH] xmalloc: make whole pages xfree() clear the order field (ab)used by xmalloc() Jan Beulich
2013-09-09 11:14 ` Keir Fraser
2013-08-27 8:50 ` Andrew Cooper [this message]
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=521C685B.6060707@citrix.com \
--to=andrew.cooper3@citrix.com \
--cc=JBeulich@suse.com \
--cc=dgdegra@tycho.nsa.gov \
--cc=tomasz.wroblewski@citrix.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).