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

Re: [Xen-ia64-devel] [PATCH] Faulty protection key handling


  • To: xen-ia64-devel@xxxxxxxxxxxxxxxxxxx
  • From: Dietmar Hahn <dietmar.hahn@xxxxxxxxxxxxxxxxxxx>
  • Date: Thu, 26 Apr 2007 11:07:26 +0200
  • Delivery-date: Thu, 26 Apr 2007 02:06:30 -0700
  • Domainkey-signature: s=s768; d=fujitsu-siemens.com; c=nofws; q=dns; b=B3Z32NVodAclnVmmMMEuyjaxEIx1dkUZzpsV1/DW1HC1GMY6RPNBR3pa13nNFBIf9B29+2L34M2Dcgv3wLnP85fjDynUW2QJytnSyu3LykkjhsBMoxR/0MMNRuAwMS53;
  • List-id: Discussion of the ia64 port of Xen <xen-ia64-devel.lists.xensource.com>

Am Mittwoch, 25. April 2007 schrieb Dietmar Hahn:
> Hi,
>
> I played around with the minios and protection key bit in the psr register
> and got 3 different behaviors.
> 1.
> mov cr.ipsr = ...  (pk bit set)
> ...
> rfi
>
> leads to a hard reboot of the hypervisor. I looked at the rfi emulation and
> found, that the pk bit remains untouched. So the protection key stuff is
> switched on and the hypervisor and dom0 get some problems.
> This seems to be a real critical case. You can test this simply with the
> minios by changing line 130 in minios/arch/ia64/ia64.S to
> movl  r16=STARTUP_PSR | IA64_PSR_PK.
>
> 2.
> mov r2 = ...  (pk bit set)
> ;;
> mov psr.l = r2
>
> Nothing happend. In the source the pk bit is ignored.
>
> 3.
> ssm psr.pk
>
> leads to a crash of the domU with illegal op which seems to be the right
> thing.
>
> I think fixes are needed here for case 1 and 2. If the pk bit is set the
> domain should be paniced.
>

Hi,

attached is a patch, which handles setting psr.pk from domU the same way in 
all 3 cases named above. Always the domU is paniced with illegal op.
Thanks.

Dietmar.





Attachment: pkr.patch
Description: Text Data

_______________________________________________
Xen-ia64-devel mailing list
Xen-ia64-devel@xxxxxxxxxxxxxxxxxxx
http://lists.xensource.com/xen-ia64-devel

 


Rackspace

Lists.xenproject.org is hosted with RackSpace, monitoring our
servers 24x7x365 and backed by RackSpace's Fanatical Support®.