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

Re: [Xen-devel] dom0 alignment check panic due to EFLAGS.AC been set



Thank you for your reply.

I admit xen4.0.1 is old, but from other bug reports in xen-devel,

> http://lists.xen.org/archives/html/xen-devel/2013-01/msg02285.html
> http://old-list-archives.xen.org/archives/html/xen-devel/2011-11/msg00827.html
> http://bugs.debian.org/cgi-bin/bugreport.cgi?bug=660425

I tend to believe it still exists, and from
http://lists.xen.org/archives/html/xen-devel/2013-01/msg02285.html, I
think maybe there hasn't been any specific patch to fix this EFLAGS.AC
problem.

It is obviously this EFLAGS.AC panic is caused by 3 conditions:

1. CPU EFLAGS reg AC bit been set, which I don't know why
2. CR0 AM mask allow this alignment check panic, which is by default behavior
3. Current CPL is 3, in which Dom0 is running

I tried to study the arch/x86/x86_64/entry.S, I guess the
create_bounce_frame is called when Xen switch to dom0, and it did
unset the CPU EFLAGS AC bit

create_bounce_frame:
...
.Lft13: movq  %rax,(%rsi)               # RCX
        /* Rewrite our stack frame and return to guest-OS mode. */
        /* IA32 Ref. Vol. 3: TF, VM, RF and NT flags are cleared on trap. */
        /* Also clear AC: alignment checks shouldn't trigger in kernel mode. */
        movl  $TRAP_syscall,UREGS_entry_vector+8(%rsp)
        andl  $~(X86_EFLAGS_AC|X86_EFLAGS_VM|X86_EFLAGS_RF|\
                 X86_EFLAGS_NT|X86_EFLAGS_TF),UREGS_eflags+8(%rsp)
...

and also alignment check won't happen when running in Xen, which CPL is 0.

Someone also reported in mail list that a 2.6.24 pv kernel never panic
in alignment check, but when he changed to 2.6.32 pv kernel, it
happened often. So, I guess it is a dom0 kernel bug, isn't it?

jeremy, konrad, could you take a look at this?


BRgs
jerry


On Sat, Jun 1, 2013 at 6:59 PM, Pasi Kärkkäinen <pasik@xxxxxx> wrote:
> On Sat, Jun 01, 2013 at 05:27:27PM +0800, Ma JieYue wrote:
>>
>> We found some mail may be related to this problem,
>>
>> http://lists.xen.org/archives/html/xen-devel/2013-01/msg02285.html
>> http://old-list-archives.xen.org/archives/html/xen-devel/2011-11/msg00827.html
>> http://bugs.debian.org/cgi-bin/bugreport.cgi?bug=660425
>>
>> but all these posts reported a domU panic (maybe PV domU) , while mine
>> is related to dom0
>>
>>
>> The Xen version is 4.0.1 and dom0 kernel comes from jeremy's git tree
>>
>
> I suggest upgrading your Xen hypervisor.. 4.0.1 is very old,
> and not even the latest on 4.0.x branch.
>
> Currently Xen 4.2.2 is the latest stable release.
>
>> http://git.kernel.org/?p=linux/kernel/git/jeremy/xen.git;a=commit;h=ae333e97552c81ab10395ad1ffc6d6daaadb144a
>>
>> It is xen-2.6.32.36 version of jeremy's dom0 git tree, so I guess
>> maybe it is too old to be related with CPU SMAP feature
>>
>
> Jeremy's xen.git is not maintained anymore, so it doesn't have the latest
> xen related fixes and features, and also it's lacking security fixes,
> so I don't recommend using it anymore.
>
> You should switch to mainline Linux 3.x kernel, which should be better in 
> every way.
>
>>
>>
>> Any help is appreciated, thanks.
>>
>>
>> Best regards,
>>
>> jerry
>>
>
>
> -- Pasi
>

_______________________________________________
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®.